This is the base class for all the objects that can be drawn.
One must subclass from this (and an assortment of Mixins) to create
a new DrawObject, see for example Circle
.
wx.lib.floatcanvas.FCObjects.Arc
, wx.lib.floatcanvas.FCObjects.Arrow
, wx.lib.floatcanvas.FCObjects.ArrowLine
, wx.lib.floatcanvas.FCObjects.Bitmap
, wx.lib.floatcanvas.FCObjects.Circle
, wx.lib.floatcanvas.FCObjects.Group
, wx.lib.floatcanvas.FCObjects.Line
, wx.lib.floatcanvas.FCObjects.PieChart
, wx.lib.floatcanvas.FCObjects.Point
, wx.lib.floatcanvas.FCObjects.PointSet
, wx.lib.floatcanvas.FCObjects.Polygon
, wx.lib.floatcanvas.FCObjects.RectEllipse
, wx.lib.floatcanvas.FCObjects.ScaledBitmap
, wx.lib.floatcanvas.FCObjects.ScaledBitmap2
, wx.lib.floatcanvas.FCObjects.ScaledText
, wx.lib.floatcanvas.FCObjects.ScaledTextBox
, wx.lib.floatcanvas.FCObjects.SquarePoint
, wx.lib.floatcanvas.FCObjects.Text
Default class constructor. |
|
Bind an event to the DrawObject |
|
Hide the object. |
|
Put the object in the background. |
|
Put the object in the foreground. |
|
Set the brush for this DrawObject |
|
Set the Color - this method is overridden in the subclasses |
|
Set the FillColor - this method is overridden in the subclasses |
|
Set the FillStyle - this method is overridden in the subclasses |
|
Set the brush used for hit test, do not call directly. |
|
Set the pen used for hit test, do not call directly. |
|
Set the LineColor - this method is overridden in the subclasses |
|
Set the LineStyle - this method is overridden in the subclasses |
|
Set the LineWidth |
|
Set the Pen for this DrawObject |
|
Show the object. |
|
Unbind all events |
DrawObject
¶This is the base class for all the objects that can be drawn.
One must subclass from this (and an assortment of Mixins) to create
a new DrawObject, see for example Circle
.
__init__
(self, InForeground = False, IsVisible = True)¶Default class constructor.
InForeground (boolean) – Define if object should be in foreground or not
IsVisible (boolean) – Define if object should be visible
Bind
(self, Event, CallBackFun)¶Bind an event to the DrawObject
Event – see below for supported event types
EVT_FC_LEFT_DOWN
EVT_FC_LEFT_UP
EVT_FC_LEFT_DCLICK
EVT_FC_MIDDLE_DOWN
EVT_FC_MIDDLE_UP
EVT_FC_MIDDLE_DCLICK
EVT_FC_RIGHT_DOWN
EVT_FC_RIGHT_UP
EVT_FC_RIGHT_DCLICK
EVT_FC_ENTER_OBJECT
EVT_FC_LEAVE_OBJECT
CallBackFun – the call back function for the event
Hide
(self)¶Hide the object.
PutInBackground
(self)¶Put the object in the background.
PutInForeground
(self)¶Put the object in the foreground.
SetBrush
(self, FillColor, FillStyle)¶Set the brush for this DrawObject
FillColor – see SetColor
for valid entries
FillStyle – see SetFillStyle
for valid entries
SetColor
(self, Color)¶Set the Color - this method is overridden in the subclasses
Color –
use one of the following values any valid entry from
wx.ColourDatabase
Green
White
Black
Grey
MediumGrey
LightGrey
Cyan
Red
SetFillColor
(self, FillColor)¶Set the FillColor - this method is overridden in the subclasses
FillColor – see SetColor
for valid values
SetFillStyle
(self, FillStyle)¶Set the FillStyle - this method is overridden in the subclasses
FillStyle (string) – following is a list of valid values:
Style |
Description |
---|---|
|
Transparent fill |
|
Solid fill |
|
Bi Diagonal hatch fill |
|
Cross Diagonal hatch fill |
|
F Diagonal hatch fill |
|
Cross hatch fill |
|
Horizontal hatch fill |
|
Vertical hatch fill |
SetHitBrush
(self, HitColor)¶Set the brush used for hit test, do not call directly.
HitColor – see SetColor
SetHitPen
(self, HitColor, LineWidth)¶Set the pen used for hit test, do not call directly.
HitColor – see SetColor
LineWidth (integer) – the line width in pixels
SetLineColor
(self, LineColor)¶Set the LineColor - this method is overridden in the subclasses
LineColor – see SetColor
for valid values
SetLineStyle
(self, LineStyle)¶Set the LineStyle - this method is overridden in the subclasses
LineStyle – Use one of the following values or None
:
Style |
Description |
---|---|
|
Solid line |
|
A transparent line |
|
Dotted line |
|
Dashed line (long) |
|
Dashed line (short) |
|
Dash-dot-dash line |
SetLineWidth
(self, LineWidth)¶Set the LineWidth
LineWidth (integer) – sets the line width in pixel
SetPen
(self, LineColor, LineStyle, LineWidth)¶Set the Pen for this DrawObject
LineColor – see SetColor
for valid entries
LineStyle – see SetLineStyle
for valid entries
LineWidth (integer) – the width in pixels
Show
(self)¶Show the object.
UnBindAll
(self)¶Unbind all events
Note
Currently only removes one from each list