A brush is a drawing tool for filling in areas. It is used for painting
the background of rectangles, ellipses, etc within a
DeviceContext. It has a colour and a style.
The following predefined brushes are available everywhere once the
application has started.
On a monochrome display, Widgets shows all brushes as white unless the
colour is really black.
Do not initialize brushes before the program commences, since other
required structures may not have been set up yet. Instead, reference them
using methods which create them if necessary.
Default constructor. The brush will be uninitialised, and “is_ok” will
return false.
Constructs a brush from a colour object and a fill style.
Brush.new(%(arg-type)String% colour_name, Integer style)Constructs a brush from a colour name and a fill style.
Brush.new(%(arg-type)Bitmap% stipple_bitmap)Constructs a stippled brush using a bitmap. The brush style will
automatically be set to Wx::STIPPLE
The style for a brush may be one of the following constants:
Wx::TRANSPARENT
: Transparent (no fill).Wx::SOLID
: Solid.Wx::STIPPLE
: Uses a bitmap as a stipple.Wx::BDIAGONAL_HATCH
: Backward diagonal hatch.Wx::CROSSDIAG_HATCH
: Cross-diagonal hatch.Wx::FDIAGONAL_HATCH
: Forward diagonal hatch.Wx::CROSS_HATCH
: Cross hatch.Wx::HORIZONTAL_HATCH
: Horizontal hatch.Wx::VERTICAL_HATCH
: Vertical hatch.Returns this brush’s colour.
Returns the stipple bitmap used by this brush
Returns the integer fill-style constant for this brush.
Returns true
if this brush has any of the hatched fill styles.
Returns true
if this brush is properly initialized and ready for use.
Sets the fill colour used by this brush, by using a Colour
object, a colour name, or a set of red/green/blue components.
Sets the stipple bitmap to be used by this brush.
Sets the fill style to be used by this brush. See Brush.new
for a list of the available styles.
[This page automatically generated from the Textile source at 2023-06-09 00:45:36 +0000]