.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.ogl.basic
.. highlight:: python
.. _wx.lib.ogl.basic.RectangleShape:
==========================================================================================================================================
|phoenix_title| **wx.lib.ogl.basic.RectangleShape**
==========================================================================================================================================
The :class:`wx.RectangleShape` class has rounded or square corners.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
RectangleShape:
|
|sub_classes| Known Subclasses
==============================
:class:`wx.lib.ogl.basic.ControlPoint`, :class:`wx.lib.ogl.basic.TextShape`, :class:`wx.lib.ogl.bmpshape.BitmapShape`, :class:`wx.lib.ogl.composit.CompositeShape`, :class:`wx.lib.ogl.divided.DividedShape`, :class:`wx.lib.ogl.drawn.DrawnShape`, :class:`wx.lib.ogl.lines.LabelShape`
|
|super_classes| Known Superclasses
==================================
:class:`wx.lib.ogl.basic.Shape`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.ogl.basic.RectangleShape.__init__` Default class constructor
:meth:`~wx.lib.ogl.basic.RectangleShape.GetBoundingBoxMin` Get the bounding box minimum.
:meth:`~wx.lib.ogl.basic.RectangleShape.GetCornerRadius` Get the radius of the rectangle's rounded corners.
:meth:`~wx.lib.ogl.basic.RectangleShape.GetHeight` Get the height.
:meth:`~wx.lib.ogl.basic.RectangleShape.GetPerimeterPoint` Get the perimeter point.
:meth:`~wx.lib.ogl.basic.RectangleShape.GetWidth` Get the width.
:meth:`~wx.lib.ogl.basic.RectangleShape.OnDraw` The draw handler.
:meth:`~wx.lib.ogl.basic.RectangleShape.SetCornerRadius` Set the radius of the rectangle's rounded corners.
:meth:`~wx.lib.ogl.basic.RectangleShape.SetHeight` Set the height.
:meth:`~wx.lib.ogl.basic.RectangleShape.SetSize` Set the size.
:meth:`~wx.lib.ogl.basic.RectangleShape.SetWidth` Set the width.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: RectangleShape(Shape)
The :class:`wx.RectangleShape` class has rounded or square corners.
.. method:: __init__(self, w = 0.0, h = 0.0)
Default class constructor
:param float `w`: the width
:param float `h`: the height
.. method:: GetBoundingBoxMin(self)
Get the bounding box minimum.
.. method:: GetCornerRadius(self)
Get the radius of the rectangle's rounded corners.
.. method:: GetHeight(self)
Get the height.
.. method:: GetPerimeterPoint(self, x1, y1, x2, y2)
Get the perimeter point.
:param `x1`: ???
:param `y1`: ???
:param `x2`: ???
:param `y2`: ???
.. method:: GetWidth(self)
Get the width.
.. method:: OnDraw(self, dc)
The draw handler.
.. method:: SetCornerRadius(self, rad)
Set the radius of the rectangle's rounded corners.
:param `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.
.. method:: SetHeight(self, h)
Set the height.
:param `h`: height to be set
.. method:: SetSize(self, x, y, recursive = False)
Set the size.
:param `x`: the width
:param `y`: the height
:param `recursive`: not used
.. method:: SetWidth(self, w)
Set the width.
:param `w`: width to be set