.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2018 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

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>RectangleShape</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.lib.ogl.basic.RectangleShape_inheritance.png" alt="Inheritance diagram of RectangleShape" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.ogl.basic.RectangleShape.html" title="wx.lib.ogl.basic.RectangleShape" alt="" coords="9,160,231,189"/> <area shape="rect" id="node2" href="wx.lib.ogl.basic.Shape.html" title="wx.lib.ogl.basic.Shape" alt="" coords="39,83,200,112"/> <area shape="rect" id="node3" href="wx.lib.ogl.basic.ShapeEvtHandler.html" title="wx.lib.ogl.basic.ShapeEvtHandler" alt="" coords="5,5,235,35"/> </map> 
   </p>

|


|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 heigth.
: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 heigth.
      
      :param `h`: heigth 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


