PNMBrush

Inheritance:

Methods of PNMBrush:

Methods of ReferenceCount:

Constants in PNMBrush:

makeImage
static PointerTo< PNMBrush > PNMBrush::make_image(PNMImage const &image, double xc, double yc, PNMBrush::BrushEffect effect = (BE_blend));

Description: 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.

makePixel
static PointerTo< PNMBrush > PNMBrush::make_pixel(LVecBase4d const &color, PNMBrush::BrushEffect effect = (BE_blend));

Description: Returns a new brush that paints a single pixel of the indicated color on a border, or paints a solid color in an interior.

makeSpot
static PointerTo< PNMBrush > PNMBrush::make_spot(LVecBase4d const &color, double radius, bool fuzzy, PNMBrush::BrushEffect effect = (BE_blend));

Description: 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.

makeTransparent
static PointerTo< PNMBrush > PNMBrush::make_transparent(void);

Description: 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.

getClassType
static TypeHandle ReferenceCount::get_class_type(void);

Undocumented function.

getRefCount
int ReferenceCount::get_ref_count(void) const;

Description: Returns the current reference count.

ref
void ReferenceCount::ref(void) const;

Description: 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.
This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.

testRefCountIntegrity
bool ReferenceCount::test_ref_count_integrity(void) const;

Description: Does some easy checks to make sure that the reference count isn't completely bogus. Returns true if ok, false otherwise.

testRefCountNonzero
bool ReferenceCount::test_ref_count_nonzero(void) const;

Description: Does some easy checks to make sure that the reference count isn't zero, or completely bogus. Returns true if ok, false otherwise.

unref
bool ReferenceCount::unref(void) const;

Description: 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; plus, we don't have a virtual destructor anyway.) However, see the helper function unref_delete().
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.
This function is const, even though it changes the object, because generally fiddling with an object's reference count isn't considered part of fiddling with the object. An object might be const in other ways, but we still need to accurately count the number of references to it.
The return value is true if the new reference count is nonzero, false if it is zero.