Phoenix Logo

phoenix_title wx.lib.ogl.basic.RectangleShape

The wx.RectangleShape class has rounded or square corners.


class_hierarchy Class Hierarchy

Inheritance diagram for class RectangleShape:


super_classes Known Superclasses

wx.lib.ogl.basic.Shape


method_summary Methods Summary

__init__ Default class constructor
GetBoundingBoxMin Get the bounding box minimum.
GetCornerRadius Get the radius of the rectangle’s rounded corners.
GetHeight Get the height.
GetPerimeterPoint Get the perimeter point.
GetWidth Get the width.
OnDraw The draw handler.
SetCornerRadius Set the radius of the rectangle’s rounded corners.
SetHeight Set the heigth.
SetSize Set the size.
SetWidth Set the width.

api 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 heigth.

Parameters:h – heigth 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