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



.. _wx.Rect2D:

==========================================================================================================================================
|phoenix_title|  **wx.Rect2D**
==========================================================================================================================================

`Rect2DDouble`       is an axis-aligned rectangle; each side of the rect is parallel to the X or Y axis. 
         

The rectangle is either defined by the top left and bottom right corner, or by the top left corner and size. 

A point is contained within the rectangle if left <=  ``m_x``   < right and top <=   ``m_y``   < bottom; thus, it is a half open interval. 


         



.. note:: 

   `Rect2DDouble`       has subtle differences from :ref:`wx.Rect`  in how its edge and corner functions work. With `Rect2DDouble`     , there are two counterparts:

   -  ``SetXXX``   functions, which keep the other corners at their position whenever sensible 
   -  ``MoveXXX``   functions, which keep the size of the rectangle and move the other corners appropriately   










|

|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>Rect2D</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/Rect2DDouble_inheritance.svg" alt="Inheritance diagram of Rect2D" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="Rect2DDouble.html" title="Rect2DDouble" alt="" coords="5,5,140,34"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.Rect2D.__init__`                                                      Default constructor.
:meth:`~wx.Rect2D.ConstrainTo`                                                   Resizes the rectangle to fit within the dimensions of another rectangle.
:meth:`~wx.Rect2D.Contains`                                                      Returns ``True`` if the given point is inside the rectangle (or on its boundary) and ``False`` otherwise.
:meth:`~wx.Rect2D.CreateIntersection`                                            Returns the intersecting rectangle of this rectangle with another one.
:meth:`~wx.Rect2D.CreateUnion`                                                   Returns the union of this rectangle with another one.
:meth:`~wx.Rect2D.Deflate`                                                       This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
:meth:`~wx.Rect2D.Get`                                                           Get() . (x, y, width, height)
:meth:`~wx.Rect2D.GetBottom`                                                     Returns the bottom point of the rectangle.
:meth:`~wx.Rect2D.GetCentre`                                                     Returns the centre point of the rectangle.
:meth:`~wx.Rect2D.GetHeight`                                                     Returns the height.
:meth:`~wx.Rect2D.GetIM`                                                         Returns an immutable representation of the ``wx.Rect2D`` object, based on ``namedtuple``.
:meth:`~wx.Rect2D.GetLeft`                                                       Returns the left point of the rectangle (the same as :meth:`~Rect2D.GetX` ).
:meth:`~wx.Rect2D.GetLeftBottom`                                                 Returns the position of the bottom left corner.
:meth:`~wx.Rect2D.GetLeftTop`                                                    Returns the position of the top left corner of the rectangle, same as :meth:`~Rect2D.GetPosition` .
:meth:`~wx.Rect2D.GetOutCode`                                                    Returns the relative location of a point to the rectangle (e.g., inside or to the left of it).
:meth:`~wx.Rect2D.GetPosition`                                                   Returns the position.
:meth:`~wx.Rect2D.GetRight`                                                      Returns the right point of the rectangle.
:meth:`~wx.Rect2D.GetRightBottom`                                                Returns the position of the bottom right corner.
:meth:`~wx.Rect2D.GetRightTop`                                                   Returns the position of the top right corner.
:meth:`~wx.Rect2D.GetSize`                                                       Returns the size.
:meth:`~wx.Rect2D.GetTop`                                                        Returns the top point of the rectangle (the same as :meth:`~Rect2D.GetY` ).
:meth:`~wx.Rect2D.GetWidth`                                                      Returns the width.
:meth:`~wx.Rect2D.GetX`                                                          Returns the left position of the rectangle.
:meth:`~wx.Rect2D.GetY`                                                          Returns the top position of the rect.
:meth:`~wx.Rect2D.HaveEqualSize`                                                 Returns ``True`` if another rectangle has the same width and height.
:meth:`~wx.Rect2D.Inflate`                                                       This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
:meth:`~wx.Rect2D.Inset`                                                         Offsets the rectangle by  ``x``   and   ``y`` , but maintains the bottom right corner.
:meth:`~wx.Rect2D.Interpolate`                                                   
:meth:`~wx.Rect2D.Intersect`                                                     Constrains the rectangle to the intersection of another rectangle.
:meth:`~wx.Rect2D.Intersects`                                                    Returns ``True`` if this rectangle has a non-empty intersection with the rectangle `rect`  and ``False`` otherwise.
:meth:`~wx.Rect2D.IsEmpty`                                                       Returns ``True`` if this rectangle has a width or height less than or equal to 0 and ``False`` otherwise.
:meth:`~wx.Rect2D.MoveBottomTo`                                                  Set the bottom edge of the rectangle, preserving the height.
:meth:`~wx.Rect2D.MoveCentreTo`                                                  An alias for :meth:`~Rect2D.MoveCentreTo` .
:meth:`~wx.Rect2D.MoveLeftBottomTo`                                              Set the bottom-left point of the rectangle, while preserving the width and height of the rectangle.
:meth:`~wx.Rect2D.MoveLeftTo`                                                    Sets the left position, which may adjust the width of the rectangle.
:meth:`~wx.Rect2D.MoveLeftTopTo`                                                 Set the top-left point of the rectangle, while preserving the width and height of the rectangle.
:meth:`~wx.Rect2D.MoveRightBottomTo`                                             Set the bottom-right point of the rectangle, while preserving the width and height of the rectangle.
:meth:`~wx.Rect2D.MoveRightTo`                                                   Set the right side of the rectangle, preserving the width.
:meth:`~wx.Rect2D.MoveRightTopTo`                                                Set the top-right point of the rectangle, while preserving the width and height of the rectangle.
:meth:`~wx.Rect2D.MoveTopTo`                                                     Set the top edge of the rectangle, preserving the height.
:meth:`~wx.Rect2D.Offset`                                                        Moves the rectangle by the specified offset.
:meth:`~wx.Rect2D.Scale`                                                         
:meth:`~wx.Rect2D.SetBottom`                                                     Set the bottom edge of the rectangle.
:meth:`~wx.Rect2D.SetCentre`                                                     Recenters (i.e., moves) the rectangle to the given point.
:meth:`~wx.Rect2D.SetHeight`                                                     Sets the height.
:meth:`~wx.Rect2D.SetLeft`                                                       Set the left side of the rectangle.
:meth:`~wx.Rect2D.SetLeftBottom`                                                 Set the bottom-left point of the rectangle.
:meth:`~wx.Rect2D.SetLeftTop`                                                    Set the top-left point of the rectangle.
:meth:`~wx.Rect2D.SetRight`                                                      Set the right side of the rectangle.
:meth:`~wx.Rect2D.SetRightBottom`                                                Set the bottom-right point of the rectangle.
:meth:`~wx.Rect2D.SetRightTop`                                                   Set the top-right point of the rectangle.
:meth:`~wx.Rect2D.SetTop`                                                        Set the top edge of the rectangle.
:meth:`~wx.Rect2D.SetWidth`                                                      Sets the width.
:meth:`~wx.Rect2D.ToRect`                                                        Returns the rectangle as a :ref:`wx.Rect`.
:meth:`~wx.Rect2D.Union`                                                         Expands the rectangle to the union with another rectangle.
:meth:`~wx.Rect2D.__bool__`                                                      
:meth:`~wx.Rect2D.__getitem__`                                                   
:meth:`~wx.Rect2D.__len__`                                                       
:meth:`~wx.Rect2D.__nonzero__`                                                   
:meth:`~wx.Rect2D.__reduce__`                                                    
:meth:`~wx.Rect2D.__repr__`                                                      
:meth:`~wx.Rect2D.__setitem__`                                                   
:meth:`~wx.Rect2D.__str__`                                                       
:meth:`~wx.Rect2D.__ne__`                                                        Inequality operator.
:meth:`~wx.Rect2D.__eq__`                                                        Equality operator.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.Rect2D.Bottom`                                                        See :meth:`~wx.Rect2D.GetBottom` and :meth:`~wx.Rect2D.SetBottom`
:attr:`~wx.Rect2D.Centre`                                                        See :meth:`~wx.Rect2D.GetCentre` and :meth:`~wx.Rect2D.SetCentre`
:attr:`~wx.Rect2D.Height`                                                        See :meth:`~wx.Rect2D.GetHeight` and :meth:`~wx.Rect2D.SetHeight`
:attr:`~wx.Rect2D.IM`                                                            See :meth:`~wx.Rect2D.GetIM`
:attr:`~wx.Rect2D.Left`                                                          See :meth:`~wx.Rect2D.GetLeft` and :meth:`~wx.Rect2D.SetLeft`
:attr:`~wx.Rect2D.LeftBottom`                                                    See :meth:`~wx.Rect2D.GetLeftBottom` and :meth:`~wx.Rect2D.SetLeftBottom`
:attr:`~wx.Rect2D.LeftTop`                                                       See :meth:`~wx.Rect2D.GetLeftTop` and :meth:`~wx.Rect2D.SetLeftTop`
:attr:`~wx.Rect2D.Position`                                                      See :meth:`~wx.Rect2D.GetPosition`
:attr:`~wx.Rect2D.Right`                                                         See :meth:`~wx.Rect2D.GetRight` and :meth:`~wx.Rect2D.SetRight`
:attr:`~wx.Rect2D.RightBottom`                                                   See :meth:`~wx.Rect2D.GetRightBottom` and :meth:`~wx.Rect2D.SetRightBottom`
:attr:`~wx.Rect2D.RightTop`                                                      See :meth:`~wx.Rect2D.GetRightTop` and :meth:`~wx.Rect2D.SetRightTop`
:attr:`~wx.Rect2D.Size`                                                          See :meth:`~wx.Rect2D.GetSize`
:attr:`~wx.Rect2D.Top`                                                           See :meth:`~wx.Rect2D.GetTop` and :meth:`~wx.Rect2D.SetTop`
:attr:`~wx.Rect2D.Width`                                                         See :meth:`~wx.Rect2D.GetWidth` and :meth:`~wx.Rect2D.SetWidth`
:attr:`~wx.Rect2D.X`                                                             See :meth:`~wx.Rect2D.GetX`
:attr:`~wx.Rect2D.Y`                                                             See :meth:`~wx.Rect2D.GetY`
:attr:`~wx.Rect2D.m_height`                                                      A public C++ attribute of type `~wx.Double`     .
:attr:`~wx.Rect2D.m_width`                                                       A public C++ attribute of type `~wx.Double`     .
:attr:`~wx.Rect2D.m_x`                                                           A public C++ attribute of type `~wx.Double`     .
:attr:`~wx.Rect2D.m_y`                                                           A public C++ attribute of type `~wx.Double`     .
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.Rect2D(object)

   **Possible constructors**::

       Rect2DDouble() -> None
       
       Rect2DDouble(x, y, width, height) -> None
       
       Rect2DDouble(rect) -> None
       
   
   Rect2DDouble is an axis-aligned rectangle; each side of the rect is
   parallel to the X or Y axis.



   .. method:: __init__(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default constructor. 
                       
      
      Initializes to zero the internal `m_x`, `m_y`, `m_width`  and `m_height`  members. 
                       
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, x, y, width, height)`
      
      Creates a `Rect2DDouble`       object from `x`, `y`, `width`  and `height`  values. 
                       
      
      
      :param `x`: 
      :type `x`: wx.Double
      :param `y`: 
      :type `y`: wx.Double
      :param `width`: 
      :type `width`: wx.Double
      :param `height`: 
      :type `height`: wx.Double
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, rect)`
      
      Constructs a `Rect2DDouble`       from a :ref:`wx.Rect`. 
                       
      
      
                      
      
      
      :param `rect`: 
      :type `rect`: wx.Rect
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      .. versionadded:: 4.3/wxWidgets-3.3.0  
           
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: ConstrainTo(self, rect)

      Resizes the rectangle to fit within the dimensions of another rectangle. 
                 


      :param `rect`: 
      :type `rect`: Rect2DDouble




      :rtype: `None`     








   .. method:: Contains(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Contains** `(self, pt)`
      
      Returns ``True`` if the given point is inside the rectangle (or on its boundary) and ``False`` otherwise. 
                       
      
      
      :param `pt`: 
      :type `pt`: Point2DDouble
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Contains** `(self, rect)`
      
      Returns ``True`` if the given rectangle is completely inside this rectangle (or touches its boundary) and ``False`` otherwise. 
                       
      
      
      :param `rect`: 
      :type `rect`: Rect2DDouble
      
      
      
      
      :rtype: `bool`
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: CreateIntersection(self, otherRect)

      Returns the intersecting rectangle of this rectangle with another one. 
                 


      :param `otherRect`: 
      :type `otherRect`: Rect2DDouble




      :rtype: `Rect2DDouble`     








   .. method:: CreateUnion(self, otherRect)

      Returns the union of this rectangle with another one. 
                 


      :param `otherRect`: 
      :type `otherRect`: Rect2DDouble




      :rtype: `Rect2DDouble`     








   .. method:: Deflate(self, *args, **kw)

      This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
                  


      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Deflate** `(self, d)`
      
      
      
      
      :param `d`: 
      :type `d`: wx.Size
      
      
      
      
      :rtype: `Rect2DDouble`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Deflate** `(self, d)`
      
      
      
      
      :param `d`: 
      :type `d`: wx.Double
      
      
      
      
      :rtype: `Rect2DDouble`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Deflate** `(self, dx, dy)`
      
      
      
      
      :param `dx`: 
      :type `dx`: wx.Double
      :param `dy`: 
      :type `dy`: wx.Double
      
      
      
      
      :rtype: `Rect2DDouble`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Get(self)

                      Get() . (x, y, width, height)

                      Return the rectangle's properties as a tuple. 

      :rtype: `Any`     








   .. method:: GetBottom(self)

      Returns the bottom point of the rectangle. 
                 

      :rtype: `float`








   .. method:: GetCentre(self)

      Returns the centre point of the rectangle. 
                 

      :rtype: `Point2DDouble`     








   .. method:: GetHeight(self)

      Returns the height. 
                 


                

      :rtype: `float`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: GetIM(self)

      Returns an immutable representation of the ``wx.Rect2D`` object, based on ``namedtuple``.
      
      This new object is hashable and can be used as a dictionary key,
      be added to sets, etc.  It can be converted back into a real ``wx.Rect2D``
      with a simple statement like this: ``obj = wx.Rect2D(imObj)``.



   .. method:: GetLeft(self)

      Returns the left point of the rectangle (the same as :meth:`GetX` ). 
                 

      :rtype: `float`








   .. method:: GetLeftBottom(self)

      Returns the position of the bottom left corner. 
                 

      :rtype: `Point2DDouble`     








   .. method:: GetLeftTop(self)

      Returns the position of the top left corner of the rectangle, same as :meth:`GetPosition` . 
                 

      :rtype: `Point2DDouble`     








   .. method:: GetOutCode(self, pt)

      Returns the relative location of a point to the rectangle (e.g., inside or to the left of it). 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: :ref:`wx.OutCode`








   .. method:: GetPosition(self)

      Returns the position. 
                 

      :rtype: `Point2DDouble`     








   .. method:: GetRight(self)

      Returns the right point of the rectangle. 
                 

      :rtype: `float`








   .. method:: GetRightBottom(self)

      Returns the position of the bottom right corner. 
                 

      :rtype: `Point2DDouble`     








   .. method:: GetRightTop(self)

      Returns the position of the top right corner. 
                 

      :rtype: `Point2DDouble`     








   .. method:: GetSize(self)

      Returns the size. 
                 

      :rtype: :ref:`wx.Size`








   .. method:: GetTop(self)

      Returns the top point of the rectangle (the same as :meth:`GetY` ). 
                 

      :rtype: `float`








   .. method:: GetWidth(self)

      Returns the width. 
                 


                

      :rtype: `float`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: GetX(self)

      Returns the left position of the rectangle. 
                 


                

      :rtype: `float`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: GetY(self)

      Returns the top position of the rect. 
                 


                

      :rtype: `float`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: HaveEqualSize(self, rect)

      Returns ``True`` if another rectangle has the same width and height. 
                 


      :param `rect`: 
      :type `rect`: Rect2DDouble




      :rtype: `bool`








   .. method:: Inflate(self, *args, **kw)

      This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
                  


      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Inflate** `(self, d)`
      
      
      
      
      :param `d`: 
      :type `d`: wx.Size
      
      
      
      
      :rtype: `Rect2DDouble`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Inflate** `(self, d)`
      
      
      
      
      :param `d`: 
      :type `d`: wx.Double
      
      
      
      
      :rtype: `Rect2DDouble`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Inflate** `(self, dx, dy)`
      
      
      
      
      :param `dx`: 
      :type `dx`: wx.Double
      :param `dy`: 
      :type `dy`: wx.Double
      
      
      
      
      :rtype: `Rect2DDouble`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Inset(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Inset** `(self, x, y)`
      
      Offsets the rectangle by  ``x``   and   ``y`` , but maintains the bottom right corner.  
                       
      
      
                      
      
      
      :param `x`: 
      :type `x`: wx.Double
      :param `y`: 
      :type `y`: wx.Double
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      .. note:: 
      
         This will affect the width and height of the rectangle.   
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Inset** `(self, left, top, right, bottom)`
      
      
      
      
      :param `left`: 
      :type `left`: wx.Double
      :param `top`: 
      :type `top`: wx.Double
      :param `right`: 
      :type `right`: wx.Double
      :param `bottom`: 
      :type `bottom`: wx.Double
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Interpolate(self, widthfactor, heightfactor)




      :param `widthfactor`: 
      :type `widthfactor`: wx.int
      :param `heightfactor`: 
      :type `heightfactor`: wx.int




      :rtype: `Point2DDouble`     








   .. method:: Intersect(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Intersect** `(self, otherRect)`
      
      Constrains the rectangle to the intersection of another rectangle. 
                       
      
      
      :param `otherRect`: 
      :type `otherRect`: Rect2DDouble
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Intersect** `(src1, src2, dest)`
      
      Returns the intersecting rectangle of two rectangles. 
                       
      
      
      :param `src1`: 
      :type `src1`: Rect2DDouble
      :param `src2`: 
      :type `src2`: Rect2DDouble
      :param `dest`: 
      :type `dest`: Rect2DDouble
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Intersects(self, rect)

      Returns ``True`` if this rectangle has a non-empty intersection with the rectangle `rect`  and ``False`` otherwise. 
                 


      :param `rect`: 
      :type `rect`: Rect2DDouble




      :rtype: `bool`








   .. method:: IsEmpty(self)

      Returns ``True`` if this rectangle has a width or height less than or equal to 0 and ``False`` otherwise. 
                 

      :rtype: `bool`








   .. method:: MoveBottomTo(self, n)

      Set the bottom edge of the rectangle, preserving the height. 
                 


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     








   .. method:: MoveCentreTo(self, pt)

      An alias for :meth:`MoveCentreTo` . 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     








   .. method:: MoveLeftBottomTo(self, pt)

      Set the bottom-left point of the rectangle, while preserving the width and height of the rectangle. 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     








   .. method:: MoveLeftTo(self, n)

      Sets the left position, which may adjust the width of the rectangle. 
                 


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     








   .. method:: MoveLeftTopTo(self, pt)

      Set the top-left point of the rectangle, while preserving the width and height of the rectangle. 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     








   .. method:: MoveRightBottomTo(self, pt)

      Set the bottom-right point of the rectangle, while preserving the width and height of the rectangle. 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     








   .. method:: MoveRightTo(self, n)

      Set the right side of the rectangle, preserving the width. 
                 


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     








   .. method:: MoveRightTopTo(self, pt)

      Set the top-right point of the rectangle, while preserving the width and height of the rectangle. 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     








   .. method:: MoveTopTo(self, n)

      Set the top edge of the rectangle, preserving the height. 
                 


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     








   .. method:: Offset(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Offset** `(self, pt)`
      
      Moves the rectangle by the specified offset. 
                       
      
      If X of `pt`  is positive, the rectangle is moved to the right, if Y of `pt`  is positive, it is moved to the bottom, otherwise it is moved to the left or top respectively. 
                       
      
      
      :param `pt`: 
      :type `pt`: Point2DDouble
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Offset** `(self, dx, dy)`
      
      This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. 
                       
      
      
                      
      
      
      :param `dx`: 
      :type `dx`: wx.Double
      :param `dy`: 
      :type `dy`: wx.Double
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      .. versionadded:: 4.3/wxWidgets-3.3.0  
           
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Scale(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Scale** `(self, f)`
      
      
      
      
      :param `f`: 
      :type `f`: wx.Double
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Scale** `(self, num, denum)`
      
      
      
      
      :param `num`: 
      :type `num`: wx.int
      :param `denum`: 
      :type `denum`: wx.int
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: SetBottom(self, n)

      Set the bottom edge of the rectangle. 
                 


                


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     







      .. note:: 

         This will preserve the top position and alter the height of the rectangle. Use :meth:`MoveBottomTo`   to only move the bottom.   








   .. method:: SetCentre(self, pt)

      Recenters (i.e., moves) the rectangle to the given point. 
                 


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     








   .. method:: SetHeight(self, h)

      Sets the height. 
                 


                


      :param `h`: 
      :type `h`: wx.Double




      :rtype: `None`     







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: SetLeft(self, n)

      Set the left side of the rectangle. 
                 


                


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     







      .. note:: 

         This will preserve the width of the rectangle. Use :meth:`MoveLeftTo`   to change the left position of the rectangle, adjusting its width accordingly.   








   .. method:: SetLeftBottom(self, pt)

      Set the bottom-left point of the rectangle. 
                 


                


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     







      .. note:: 

         This will alter the width and height of the rectangle. Use :meth:`MoveLeftBottomTo`   to only move the left bottom corner.   








   .. method:: SetLeftTop(self, pt)

      Set the top-left point of the rectangle. 
                 


                


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     







      .. note:: 

         This will alter the height of the rectangle. Use :meth:`MoveLeftTopTo`   to only move the top.   








   .. method:: SetRight(self, n)

      Set the right side of the rectangle. 
                 


                


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     







      .. note:: 

         This will preserve the left position and alter the width of the rectangle. Use :meth:`MoveRightTo`   to only move the bottom.   








   .. method:: SetRightBottom(self, pt)

      Set the bottom-right point of the rectangle. 
                 


                


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     







      .. note:: 

         This will alter the width and height of the rectangle. Use :meth:`MoveRightBottomTo`   to only move the right bottom corner.   








   .. method:: SetRightTop(self, pt)

      Set the top-right point of the rectangle. 
                 


                


      :param `pt`: 
      :type `pt`: Point2DDouble




      :rtype: `None`     







      .. note:: 

         This will alter the width and height of the rectangle. Use :meth:`MoveRightTopTo`   to only move the right top corner.   








   .. method:: SetTop(self, n)

      Set the top edge of the rectangle. 
                 


                


      :param `n`: 
      :type `n`: wx.Double




      :rtype: `None`     







      .. note:: 

         This will alter the height of the rectangle. Use :meth:`MoveTopTo`   to only move the top.   








   .. method:: SetWidth(self, w)

      Sets the width. 
                 


                


      :param `w`: 
      :type `w`: wx.Double




      :rtype: `None`     







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: ToRect(self)

      Returns the rectangle as a :ref:`wx.Rect`. 
                 


                

      :rtype: :ref:`wx.Rect`







      .. versionadded:: 4.3/wxWidgets-3.3.0  
     








   .. method:: Union(self, *args, **kw)



      |overload| **Overloaded Implementations:**

      :html:`<hr class="overloadsep" /><br />`

      
      **Union** `(self, otherRect)`
      
      Expands the rectangle to the union with another rectangle. 
                       
      
      
      :param `otherRect`: 
      :type `otherRect`: Rect2DDouble
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Union** `(self, pt)`
      
      Expands the rectangle to include the point at  ``pt`` .  
                       
      
      
      :param `pt`: 
      :type `pt`: Point2DDouble
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **Union** `(src1, src2, dest)`
      
      Returns the union rectangle of two rectangles. 
                       
      
      
      :param `src1`: 
      :type `src1`: Rect2DDouble
      :param `src2`: 
      :type `src2`: Rect2DDouble
      :param `dest`: 
      :type `dest`: Rect2DDouble
      
      
      
      
      :rtype: `None`     
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: __bool__(self)




   .. method:: __getitem__(self, idx)




   .. method:: __len__(self)




   .. method:: __nonzero__(self)




   .. method:: __reduce__(self)




   .. method:: __repr__(self)




   .. method:: __setitem__(self, idx, val)




   .. method:: __str__(self)




   .. method:: __ne__(self, rect)

      Inequality operator. 
                 


      :param `rect`: 
      :type `rect`: Rect2DDouble




      :rtype: `bool`








   .. method:: __eq__(self, rect)

      Equality operator. 
                 


      :param `rect`: 
      :type `rect`: Rect2DDouble




      :rtype: `bool`








   .. attribute:: Bottom

      See :meth:`~wx.Rect2D.GetBottom` and :meth:`~wx.Rect2D.SetBottom`


   .. attribute:: Centre

      See :meth:`~wx.Rect2D.GetCentre` and :meth:`~wx.Rect2D.SetCentre`


   .. attribute:: Height

      See :meth:`~wx.Rect2D.GetHeight` and :meth:`~wx.Rect2D.SetHeight`


   .. attribute:: IM

      See :meth:`~wx.Rect2D.GetIM`


   .. attribute:: Left

      See :meth:`~wx.Rect2D.GetLeft` and :meth:`~wx.Rect2D.SetLeft`


   .. attribute:: LeftBottom

      See :meth:`~wx.Rect2D.GetLeftBottom` and :meth:`~wx.Rect2D.SetLeftBottom`


   .. attribute:: LeftTop

      See :meth:`~wx.Rect2D.GetLeftTop` and :meth:`~wx.Rect2D.SetLeftTop`


   .. attribute:: Position

      See :meth:`~wx.Rect2D.GetPosition`


   .. attribute:: Right

      See :meth:`~wx.Rect2D.GetRight` and :meth:`~wx.Rect2D.SetRight`


   .. attribute:: RightBottom

      See :meth:`~wx.Rect2D.GetRightBottom` and :meth:`~wx.Rect2D.SetRightBottom`


   .. attribute:: RightTop

      See :meth:`~wx.Rect2D.GetRightTop` and :meth:`~wx.Rect2D.SetRightTop`


   .. attribute:: Size

      See :meth:`~wx.Rect2D.GetSize`


   .. attribute:: Top

      See :meth:`~wx.Rect2D.GetTop` and :meth:`~wx.Rect2D.SetTop`


   .. attribute:: Width

      See :meth:`~wx.Rect2D.GetWidth` and :meth:`~wx.Rect2D.SetWidth`


   .. attribute:: X

      See :meth:`~wx.Rect2D.GetX`


   .. attribute:: Y

      See :meth:`~wx.Rect2D.GetY`


   .. attribute:: m_height

      A public C++ attribute of type `~wx.Double`     .


   .. attribute:: m_width

      A public C++ attribute of type `~wx.Double`     .


   .. attribute:: m_x

      A public C++ attribute of type `~wx.Double`     .


   .. attribute:: m_y

      A public C++ attribute of type `~wx.Double`     .

