Panda3D
|
This class is used to control the shape and color of the drawing operations performed by a PNMPainter object. More...
Public Types | |
enum | BrushEffect { BE_set = 0, BE_blend = 1, BE_darken = 2, BE_lighten = 3 } |
Static Public Member Functions | |
static PNMBrush | makeImage (const PNMImage image, float xc, float yc, PNMBrush::BrushEffect effect) |
Returns a new brush that paints with the indicated image. More... | |
static PNMBrush | makePixel (const LColorf color, PNMBrush::BrushEffect effect) |
Returns a new brush that paints a single pixel of the indicated color on a border, or paints a solid color in an interior. More... | |
static PNMBrush | makeSpot (const LColorf color, float radius, bool fuzzy, PNMBrush::BrushEffect effect) |
Returns a new brush that paints a spot of the indicated color and radius. More... | |
static PNMBrush | makeTransparent () |
Returns a new brush that does not paint anything. More... | |
![]() | |
static TypeHandle | getClassType () |
Additional Inherited Members | |
![]() | |
int | getRefCount () |
Returns the current reference count. More... | |
ref () | |
Explicitly increments the reference count. More... | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. More... | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. More... | |
bool | unref () |
Explicitly decrements the reference count. More... | |
![]() | |
int | ref_count |
The current reference count. More... | |
This class is used to control the shape and color of the drawing operations performed by a PNMPainter object.
Normally, you don't create a PNMBrush directly; instead, use one of the static PNMBrush::make_*() methods provided here.
A PNMBrush is used to draw the border of a polygon or rectangle, as well as for filling its interior. When it is used to draw a border, the brush is "smeared" over the border; when it is used to fill the interior, it is tiled through the interior.
enum BrushEffect |
|
static |
Returns a new brush that paints with the indicated image.
xc and yc indicate the pixel in the center of the brush.
The brush makes a copy of the image; it is safe to deallocate or modify the image after making this call.
|
static |
Returns a new brush that paints a single pixel of the indicated color on a border, or paints a solid color in an interior.
|
static |
Returns a new brush that paints a spot of the indicated color and radius.
If fuzzy is true, the spot is fuzzy; otherwise, it is hard-edged.
|
static |
Returns a new brush that does not paint anything.
Can be used as either a pen or a fill brush to make borderless or unfilled shapes, respectively.