PNMBrush¶
-
class PNMBrush¶
Bases:
ReferenceCountThis class is used to control the shape and color of the drawing operations performed by a
PNMPainterobject.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
digraph inheritance0669356fd6 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "PNMBrush" [URL="acron.core.PNMBrush.html#acron.core.PNMBrush",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "ReferenceCount" -> "PNMBrush" [arrowsize=0.75,style=""]; "ReferenceCount" [URL="acron.core.ReferenceCount.html#acron.core.ReferenceCount",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ReferenceCount" [arrowsize=0.75,style=""]; }-
enum BrushEffect¶
-
enumerator BE_set = 0¶
-
enumerator BE_blend = 1¶
-
enumerator BE_darken = 2¶
-
enumerator BE_lighten = 3¶
-
enumerator BE_add = 4¶
-
enumerator BE_set = 0¶
- static PNMBrush.make_image()¶
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 PNMBrush.make_pixel()¶
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 PNMBrush.make_spot()¶
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 PNMBrush.make_transparent()¶
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.
-
enum BrushEffect¶