PNMBrush
from panda3d.core import PNMBrush
- class PNMBrush
Bases:
Bases:
ReferenceCount
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.
Inheritance diagram
-
enum BrushEffect
-
enumerator BE_set = 0
-
enumerator BE_blend = 1
-
enumerator BE_darken = 2
-
enumerator BE_lighten = 3
-
enumerator BE_set = 0
- static makeImage(image: PNMImage, xc: float, yc: float, effect: BrushEffect) PNMBrush
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 makePixel(color: LColorf, effect: BrushEffect) PNMBrush
Returns a new brush that paints a single pixel of the indicated color on a border, or paints a solid color in an interior.
-
enum BrushEffect