LOGBRUSH


typedef struct tagLOGBRUSH {
    short  lbStyle;    
    long   lbColor;
    short  lbHatch;
    long   lbBkColor;
    long   lbhcmXform;
} LOGBRUSH;

Contains style and color information for a brush.

lbStyle

Brush style. GDI requires that drivers support at least the following brush styles:

Value

Meaning

BS_SOLID (0)

Single solid or dithered color.

BS_HOLLOW (1)

No color or pattern.

BS_HATCHED (2)

A predefined pattern.

BS_PATTERN (3)

Pattern specified by a given bitmap.


lbColor

Foreground color for brushes having BS_SOLID and BS_HATCHED values. For BS_PATTERN values, this member is the address of a global memory object that contains the device-dependent bitmap. Brush colors are specified as physical colors. For palette-capable devices, this member specifies a physical-color index if the high-order byte is 0xFF. For the BS_HOLLOW value, this member is zero.

lbHatch

Brush pattern for brushes having the BS_HATCHED style, or the handle of the device-dependent pattern bitmap for brushes having the BS_PATTERN style. For BS_SOLID and BS_HOLLOW values, this member is zero.

For BS_HATCHED brushes, this member specifies a brush pattern. It can be one of these values:

Value

Meaning

HS_HORIZONTAL

Horizontal hatch

HS_VERTICAL

Vertical hatch

HS_FDIAGONAL

45-degree upward hatch (left to right)

HS_BDIAGONAL

45-degree downward hatch (left to right)

HS_CROSS

Horizontal and vertical cross hatch

HS_DIAGCROSS

45-degree cross hatch


lbBkColor

Background color for brushes having the BS_HATCHED style. Brush colors are specified as physical colors. For palette-capable devices, this member specifies a physical color index if the high-order byte is 0xFF.

lbhcmXform

Transform for image color matching.

See also EnumObj