Home | Trees | Index | Help |
|
---|
Package wx :: Class Brush |
|
object
--+ |Object
--+ |GDIObject
--+ | Brush
A brush is a drawing tool for filling in areas. It is used for
painting the background of rectangles, ellipses, etc. when drawing on
a wx.DC
. It has a colour and a style.
Warning:
Do not create instances of wx.Brush before the wx.App
object has been created because, depending on the platform,
required internal data structures may not have been initialized
yet. Instead create your brushes in the app's OnInit or as they
are needed for drawing.
Note:
On monochrome displays all brushes are white, unless the colour really is black.
See Also:
wx.BrushList
, wx.DC
, wx.DC.SetBrush
Method Summary | |
---|---|
Brush |
Constructs a brush from a wx.Colour object and a style.The style parameter may be one of the following: |
__del__(self)
| |
__nonzero__(self)
| |
Colour |
Returns the wx.Colour of the brush. |
Bitmap |
Returns the stiple wx.Bitmap of the brush. |
int |
Returns the style of the brush. |
bool |
Is the current style a hatch type? |
bool |
Returns True if the brush is initialised and valid. |
bool |
Returns True if the brush is initialised and valid. |
Set the brush's wx.Colour . | |
Sets the stipple wx.Bitmap . | |
Sets the style of the brush. |
Property Summary | |
---|---|
Colour : See GetColour and SetColour | |
Stipple : See GetStipple and SetStipple | |
Style : See GetStyle and SetStyle | |
thisown : The membership flag |
Method Details |
---|
__init__(self,
colour,
style=SOLID)
|
Style | Meaning |
---|---|
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. |
colour
style
wx.GDIObject.__init__
See Also:
GetColour(self)Returns the
|
GetStipple(self)Returns the stiple
|
GetStyle(self)Returns the style of the brush. See
|
IsHatch(self)Is the current style a hatch type?
|
IsOk(self)Returns True if the brush is initialised and valid.
|
Ok(self)Returns True if the brush is initialised and valid.
|
SetColour(self, col)Set the brush's
|
SetStipple(self, stipple)Sets the stipple
|
SetStyle(self, style)Sets the style of the brush. See
|
Property Details |
---|
Colour |
StippleSee
|
Style |
thisownThe membership flag |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:07:19 2007 | http://epydoc.sf.net |