wx.lib.floatcanvas.FCObjects.Group¶
A group of other FloatCanvas Objects
Not all DrawObject methods may apply here.
Note that if an object is in more than one group, it will get drawn more than once.
Class Hierarchy¶
Known Superclasses¶
wx.lib.floatcanvas.FCObjects.DrawObject
Methods Summary¶
Default class constructor. |
|
Add an object to the group. |
|
Add objects to the group. |
|
Bind an event to the Group object |
|
Calculate the bounding box. |
|
Moves the object by delta, where delta is a (dx, dy) pair. |
|
Set the Color |
|
Set the FillColor |
|
Set the FillStyle |
|
Set the LineColor |
|
Set the LineStyle |
|
Set the LineWidth |
Class API¶
- class Group(DrawObject)¶
A group of other FloatCanvas Objects
Not all DrawObject methods may apply here.
Note that if an object is in more than one group, it will get drawn more than once.
Methods¶
- __init__(self, ObjectList=[], InForeground=False, IsVisible=True)¶
Default class constructor.
- Parameters:
ObjectList (list) – a list of
DrawObject
to be groupedInForeground (boolean) – keep in foreground
IsVisible (boolean) – keep it visible
- AddObject(self, obj)¶
Add an object to the group.
- Parameters:
obj (DrawObject) – object to add
- AddObjects(self, Objects)¶
Add objects to the group.
- Parameters:
Objects (list) – a list of
DrawObject
to be grouped
- Bind(self, Event, CallBackFun)¶
Bind an event to the Group object
- Parameters:
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
- CalcBoundingBox(self)¶
Calculate the bounding box.
- Move(self, Delta)¶
Moves the object by delta, where delta is a (dx, dy) pair.
- Parameters:
Delta – is a (dx, dy) pair ideally a NumPy array of shape (2, )
- SetColor(self, Color)¶
Set the Color
- Parameters:
Color – see
SetColor
for valid values
- SetFillColor(self, Color)¶
Set the FillColor
- Parameters:
FillColor – see
SetColor
for valid values
- SetFillStyle(self, FillStyle)¶
Set the FillStyle
- Parameters:
FillStyle – see
SetFillStyle
for valid values
- SetLineColor(self, Color)¶
Set the LineColor
- Parameters:
LineColor – see
SetColor
for valid values
- SetLineStyle(self, LineStyle)¶
Set the LineStyle
- Parameters:
LineStyle – see
SetLineStyle
for valid values
- SetLineWidth(self, LineWidth)¶
Set the LineWidth
- Parameters:
LineWidth (integer) – line width in pixels