struct CGXBrush
The CGXBrush class is a wrapper for the LOGBRUSH structure. CGXBrush can be written to the application profile and loaded from it. Serialization is also supported.
CGXBrush also adds support for 33 predefined patterns you can use in your grid.
The following attributes are provided by the CGXBrush class:
-
Style: Specifies the brush type.
-
Hatch: Specifies the hatch type.
-
Pattern: Specifies the pattern type. Objective Grid offers 18 predefined patterns.
-
Pattern Color: This is the foreground color of the pattern. If the brush is solid, the cell will be filled with this color.
- Background Color: This is the background of the pattern. If the pattern is empty, the cell will be filled with this color.
Normally, a CGXBrush object is used to specify the interior brush of a cell:
SetStyleRange(
CGXRange(2,2),
CGXStyle()
.SetInterior( CGXBrush().SetColor(RGB(255,0,0) )
);
Two provided inline-methods enable you to serialize a CGXBrush object with the << and >> operators:
ar << brush
-- Or --
ar >> brush;