wx.lib.agw.piectrl.PieCtrl¶
PieCtrl is somewhat a “static” control, that you may create in order to display
a simple pie chart on a Panel or similar.
Class Hierarchy¶
Control Appearance¶
Known Subclasses¶
wx.lib.agw.piectrl.ProgressPie
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Draws all the sectors of |
|
Draws the |
|
Returns the orientation angle for |
|
Returns the |
|
Returns the |
|
Returns the height (in pixels) of the |
|
Returns the |
|
Returns the angles associated to all segments. |
|
Returns the angle at which the first sector starts, in radians. |
|
Returns whether the |
|
Handles the |
|
Handles the |
|
Recreates the |
|
Sets the orientation angle for |
|
Sets the |
|
Sets the |
|
Sets the height (in pixels) of the |
|
Sets the angle at which the first sector starts. |
|
Sets whether the |
Class API¶
- class PieCtrl(wx.Window)¶
PieCtrlis somewhat a “static” control, that you may create in order to display a simple pie chart on aPanelor similar.
Methods¶
- __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name='PieCtrl')¶
Default class constructor.
- Parameters:
parent – the
PieCtrlparent. Must not beNone;id – window identifier. A value of -1 indicates a default value;
pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
style – the window style (unused);
name – the window name.
- DrawParts(self, dc, cx, cy, w, h)¶
Draws the
PieCtrlexternal edges.- Parameters:
dc – an instance of
wx.DC;cx – the part x coordinate;
cy – the part y coordinate;
w – the control’s width;
h – the control’s height.
- GetPartAngles(self)¶
Returns the angles associated to all segments.
- GetRotationAngle(self)¶
Returns the angle at which the first sector starts, in radians.
- OnPaint(self, event)¶
Handles the
wx.EVT_PAINTevent forPieCtrl.- Parameters:
event – a
PaintEventevent to be processed.
- OnSize(self, event)¶
Handles the
wx.EVT_SIZEevent forPieCtrl.- Parameters:
event – a
wx.SizeEventevent to be processed.
- SetAngle(self, angle)¶
Sets the orientation angle for
PieCtrl.- Parameters:
angle – the orientation angle for
PieCtrl, in radians.
- SetBackColour(self, colour)¶
Sets the
PieCtrlbackground colour.- Parameters:
colour – a valid
wx.Colourobject.
- SetBackground(self, bmp)¶
Sets the
PieCtrlbackground image.- Parameters:
bmp – a valid
wx.Bitmapobject.
- SetHeight(self, value)¶
Sets the height (in pixels) of the
PieCtrl.- Parameters:
value – the new height of the widget, in pixels.
- SetRotationAngle(self, angle)¶
Sets the angle at which the first sector starts.
- Parameters:
angle – the first sector angle, in radians.