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;
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. |
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. |
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.