Specifies the attributes, mask, and bits of brushes for the DIB engine. There are separate structures for 1bpp, 4bpp, 8bpp, 16bpp, 24bpp, and 32bpp displays.
typedef struct { BYTE dp1BrushFlags; BYTE dp1BrushBpp; WORD dp1BrushStyle; DWORD dp1FgColor; WORD dp1Hatch; DWORD dp1BgColor; BYTE dp1BrushMono [BRUSHSIZE*4]; BYTE dp1BrushMask [BRUSHSIZE*4]; BYTE dp1BrushBits [BRUSHSIZE*4]; } DIB_Brush1; typedef struct { BYTE dp4BrushFlags; BYTE dp4BrushBpp; WORD dp4BrushStyle; DWORD dp4FgColor; WORD dp4Hatch; DWORD dp4BgColor; BYTE dp4BrushMono [BRUSHSIZE*4]; BYTE dp4BrushMask [BRUSHSIZE*4]; BYTE dp4BrushBits [BRUSHSIZE*4]; } DIB_Brush4; typedef struct { BYTE dp8BrushFlags; BYTE dp8BrushBpp; WORD dp8BrushStyle; DWORD dp8FgColor; WORD dp8Hatch; DWORD dp8BgColor; BYTE dp8BrushMono [BRUSHSIZE*4]; BYTE dp8BrushMask [BRUSHSIZE*4]; BYTE dp8BrushBits [BRUSHSIZE*8]; } DIB_Brush8; typedef struct { BYTE dp16BrushFlags; BYTE dp16BrushBpp; WORD dp16BrushStyle; DWORD dp16FgColor; WORD dp16Hatch; DWORD dp16BgColor; BYTE dp16BrushMono [BRUSHSIZE*4]; BYTE dp16BrushMask [BRUSHSIZE*4]; BYTE dp16BrushBits [BRUSHSIZE*16]; } DIB_Brush16; typedef struct { BYTE dp24BrushFlags; BYTE dp24BrushBpp; WORD dp24BrushStyle; DWORD dp24FgColor; WORD dp24Hatch; DWORD dp24BgColor; BYTE dp24BrushMono [BRUSHSIZE*4]; BYTE dp24BrushMask [BRUSHSIZE*4]; BYTE dp24BrushBits [BRUSHSIZE*24]; } DIB_Brush24; typedef struct { BYTE dp32BrushFlags; BYTE dp32BrushBpp; WORD dp32BrushStyle; DWORD dp32FgColor; WORD dp32Hatch; DWORD dp32BgColor; BYTE dp32BrushMono [BRUSHSIZE*4]; BYTE dp32BrushMask [BRUSHSIZE*4]; BYTE dp32BrushBits [BRUSHSIZE*32]; } DIB_Brush32;
dpxBrushFlags
Flags describing the brush. Must be one of the following:
COLORSOLID | Color part is solid. |
MONOSOLID | Monochrome part is solid. |
PATTERNMONO | Pattern brush came from a monochrome bitmap. |
MONOVALID | Monochrome part is valid. |
MASKVALID | Transparency mask part is valid. |
PRIVATEDATA | Vendor specific bit for pens and brushes. |
dpxBrushBpp
The number of bits per pixel. Must be 1, 4, 8, 16, 24, or 32.
dpxBrushStyle
Style of the brush. Must be one of the following:
Value | Meaning |
BS_SOLID (0) | Solid brush. |
BS_NULL (1) | Same as BS_HOLLOW. |
BS_HOLLOW (1) | Hollow brush. |
BS_HATCHED (2) | Hatched brush. |
BS_PATTERN (3) | Pattern brush defined by a memory bitmap. |
BS_INDEXED (4) | Indexed brush. |
BS_DIBPATTERN (5) | A pattern brush defined by a device-independent bitmap (DIB) specification. |
BS_DIBPATTERNPT (6) | A pattern brush defined by a device-independent bitmap (DIB) specification. |
BS_PATTERN8X8 (7) | Same meaning as BS_PATTERN. |
BS_DIBPATTERN8X8 (8) | Same meaning as BS_DIBPATTERN. |
dpxFgColor
Foreground color. For the dp8FgColor member of DIB_Brush8, the color is a logical color if the brush style is BS_SOLID or BS_PATTERN. If the brush style is BS_HATCHED, dp8FgColor contains a physical color.
dpxHatch
Specifies a hatch style. The meaning depends on the brush style defined by dpxBrushStyle.
If dpxBrushStyle is BS_DIBPATTERN, the dpxHatch member contains a handle to a packed DIB. If dpxBrushStyle is BS_DIBPATTERNPT, the dpxHatch member contains a pointer to a packed DIB.
If dpxBrushStyle is BS_HATCHED, the dpxHatch member specifies the orientation of the lines used to create the hatch. It can be one of the following values:
Value | Meaning |
HS_BDIAGONAL | A 45-degree upward, left-to-right hatch |
HS_CROSS | Horizontal and vertical cross-hatch |
HS_DIAGCROSS | 45-degree crosshatch |
HS_FDIAGONAL | A 45-degree downward, left-to-right hatch |
HS_HORIZONTAL | Horizontal hatch |
HS_VERTICAL | Vertical hatch |
If dpxBrushStyle is BS_PATTERN, dpxHatch is a handle to the bitmap that defines the pattern.
If dpxBrushStyle is BS_SOLID or BS_HOLLOW, dpxHatch is ignored.
dpxBgColor
Background color. This member is only used with BS_HATCHED style brushes and it is a physical color.
dpxBrushMono
Bits describing monochrome version of the brush.
dpxBrushMask
Bits describing the transparency mask (hatch pattern) portion of the brush.
dpxBrushBits
The bits describing the brush. The size is 8 rows by 8 columns with either 1, 4, 8, 16, 24, or 32 bits per pixel.