wx.lib.ogl.basic.RectangleShape¶
The wx.RectangleShape
class has rounded or square corners.
Class Hierarchy¶
Known Subclasses¶
wx.lib.ogl.basic.ControlPoint
, wx.lib.ogl.basic.TextShape
, wx.lib.ogl.bmpshape.BitmapShape
, wx.lib.ogl.composit.CompositeShape
, wx.lib.ogl.divided.DividedShape
, wx.lib.ogl.drawn.DrawnShape
, wx.lib.ogl.lines.LabelShape
Known Superclasses¶
Methods Summary¶
Default class constructor |
|
Get the bounding box minimum. |
|
Get the radius of the rectangle’s rounded corners. |
|
Get the height. |
|
Get the perimeter point. |
|
Get the width. |
|
The draw handler. |
|
Set the radius of the rectangle’s rounded corners. |
|
Set the height. |
|
Set the size. |
|
Set the width. |
Class API¶
- class RectangleShape(Shape)¶
The
wx.RectangleShape
class has rounded or square corners.
Methods¶
- __init__(self, w=0.0, h=0.0)¶
Default class constructor
- Parameters:
w (float) – the width
h (float) – the height
- GetBoundingBoxMin(self)¶
Get the bounding box minimum.
- GetCornerRadius(self)¶
Get the radius of the rectangle’s rounded corners.
- GetHeight(self)¶
Get the height.
- GetPerimeterPoint(self, x1, y1, x2, y2)¶
Get the perimeter point.
- Parameters:
x1 – ???
y1 – ???
x2 – ???
y2 – ???
- GetWidth(self)¶
Get the width.
- OnDraw(self, dc)¶
The draw handler.
- SetCornerRadius(self, rad)¶
Set the radius of the rectangle’s rounded corners.
- Parameters:
rad – If the radius is zero, a non-rounded rectangle will be drawn. If the radius is negative, the value is the proportion of the smaller dimension of the rectangle.
- SetHeight(self, h)¶
Set the height.
- Parameters:
h – height to be set
- SetSize(self, x, y, recursive=False)¶
Set the size.
- Parameters:
x – the width
y – the height
recursive – not used
- SetWidth(self, w)¶
Set the width.
- Parameters:
w – width to be set