The PAINTBRUSH structure holds information about the paintbrush.
Size of this structure.
Flags that indicate which structure members contain valid information. Possible values are:
|PBF_ALL||All fields contain valid data.|
|PBF_TOUCH||The Touch field contains valid data.|
|PBF_DIAMETER||The nDiameter field contains valid data.|
|PBF_HARDNESS||The Hardness field contains valid data.|
|PBF_SPACING||The nSpacing field contains valid data.|
|PBF_DENSITY||The nDensity field contains valid data.|
|PBF_OPACITY||The nOpacity field contains valid data.|
|PBF_FADEOUTRATE||The nFadeOutRate field contains valid data.|
|PBF_TEXTURE||The pTexture field contains valid data.|
Structure that contains information about the touch properties. For more information on these properties, refer to PAINTTOUCH.
Value indicating the diameter of the brush, in pixels. Valid values are between 1 and 200.
Structure that contains information about the hardness of the brush. For more information, refer to PAINTHARDNESS.
Value indicating the spacing of the discrete drops of the paintbrush, or how frequently the brush tip touches the painting surface during a stroke. When the spacing is 30, this means that the brush tip will touch the painting surface once every 30 pixels. Valid values are between (1-1000).
Value indicating the amount of paint the brush applies with each stroke. Increasing the density of the brush is comparable to increasing the number of bristles in the brush. With more bristles, more paint is applied in a stroke. Similarly, decreasing the density decreases the number of bristles in the brush. With fewer bristles, less paint is applied in a stroke. Valid values are 1 to 100 and represent a percentage. A value of 100% results in the surface being completely covered with paint. A value of 1% results in very little paint being applied to the surface.
Value indicating the transparency of the brush touch when combined with the painting canvas. Valid values are between (0-255). A color or an image with an opacity of 255 is transparent. A color or an image with an opacity of 0 is completely opaque (solid).
Value indicating the rate at which the brush contents will fade (become more transparent). Valid values are between (0-10000). 0 means no fade-out will occur. Other values (1-10000) will increase the transparency of the brush contents every nSpacing pixels, until total fade-out is reached.
Pointer to the bitmap handle that references the bitmap used to simulate paper texture. This makes it appear as if the painting is done on paper having that texture. The BITMAPHANDLE pointer should still be valid after setting this field.
The default values for this structure are:
nSize = sizeof (PAINTBRUSH)
Touch.nContentsType = PAINT_TOUCH_CONTENTS_COLOR
Touch.crColor = RGB(0, 0, 0)
Touch.nShape = PAINT_TOUCH_SHAPE_CIRCLE
Touch.pBitmap = NULL
Touch.crTransparentColor = RGB(0, 0, 0)
nDiameter = 1
Hardness.nDistributionType = PAINT_HARDNESS_DISTRB_TYPE_0
Hardness.nValue = 1
nSpacing = 1
nDensity = 100
nOpacity = 0
nFadeOutRate = 0
pTexture = NULL
pPAINTBRUSH is a pointer to a PAINTBRUSH structure.