This class is used to control the shape and color of the drawing operations performed by a PNMPainter object.
More...
|
static PNMBrush | makeImage (const PNMImage image, float xc, float yc, PNMBrush::BrushEffect effect) |
| Returns a new brush that paints with the indicated image. xc and yc indicate the pixel in the center of the brush. 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. If fuzzy is true, the spot is fuzzy; otherwise, it is hard-edged. More...
|
|
static PNMBrush | makeTransparent () |
| 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. More...
|
|
Static Public Member Functions inherited from ReferenceCount |
static TypeHandle | getClassType () |
|
|
Public Member Functions inherited from ReferenceCount |
int | getRefCount () |
| Returns the current reference count. More...
|
|
| ref () |
| Explicitly increments the reference count. User code should avoid using ref() and unref() directly, which can result in missed reference counts. Instead, let a PointerTo object manage the reference counting automatically. More...
|
|
bool | testRefCountIntegrity () |
| Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise. More...
|
|
bool | testRefCountNonzero () |
| Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise. More...
|
|
bool | unref () |
| Explicitly decrements the reference count. Note that the object will not be implicitly deleted by unref() simply because the reference count drops to zero. (Having a member function delete itself is problematic.) However, see the helper function unref_delete(). 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.