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

==========================================================================================================================================
|phoenix_title|  **wx.RealPoint**
==========================================================================================================================================

A :ref:`wx.RealPoint`  is a useful data structure for graphics operations.          

It contains floating point `x`  and `y`  members. See :ref:`wx.Point`  for an integer version. 

Note that the coordinates stored inside a :ref:`wx.RealPoint`  object may be negative and that :ref:`wx.RealPoint`  functions do not perform any check against negative values. 







         



.. seealso:: :ref:`wx.Point`    







|

|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>RealPoint</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.RealPoint_inheritance.png" alt="Inheritance diagram of RealPoint" 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="wx.RealPoint.html" title="wx.RealPoint" alt="" coords="5,5,112,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.RealPoint.__init__`                                                   Initializes to zero the x and y members.
:meth:`~wx.RealPoint.Get`                                                        Return the point's properties as a tuple.
:meth:`~wx.RealPoint.GetIM`                                                      Returns an immutable representation of the ``wx.RealPoint`` object, based on ``namedtuple``.
:meth:`~wx.RealPoint.__bool__`                                                   
:meth:`~wx.RealPoint.__eq__`                                                     
:meth:`~wx.RealPoint.__getitem__`                                                
:meth:`~wx.RealPoint.__len__`                                                    
:meth:`~wx.RealPoint.__mul__`                                                    
:meth:`~wx.RealPoint.__ne__`                                                     
:meth:`~wx.RealPoint.__nonzero__`                                                
:meth:`~wx.RealPoint.__reduce__`                                                 
:meth:`~wx.RealPoint.__repr__`                                                   
:meth:`~wx.RealPoint.__setitem__`                                                
:meth:`~wx.RealPoint.__str__`                                                    
:meth:`~wx.RealPoint.__iadd__`                                                   
:meth:`~wx.RealPoint.__isub__`                                                   
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.RealPoint.IM`                                                         See :meth:`~wx.RealPoint.GetIM`
:attr:`~wx.RealPoint.x`                                                          A public C++ attribute of type ``float``. X coordinate of this point.                  
:attr:`~wx.RealPoint.y`                                                          A public C++ attribute of type ``float``. Y coordinate of this point.                  
================================================================================ ================================================================================


|


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


.. class:: wx.RealPoint(object)

   **Possible constructors**::

       RealPoint()
       
       RealPoint(x, y)
       
       RealPoint(pt)
       
   
   A RealPoint is a useful data structure for graphics operations.



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



      |overload| Overloaded Implementations:

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

      
      **__init__** `(self)`
      
      Initializes to zero the x and y members.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, x, y)`
      
      Initializes the point with the given coordinates.                  
      
      
      :param `x`: 
      :type `x`: float
      :param `y`: 
      :type `y`: float
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, pt)`
      
      Converts the given :ref:`wx.Point`  (with integer coordinates) to a :ref:`wx.RealPoint`.                  
      
      
      :param `pt`: 
      :type `pt`: wx.Point
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: Get(self)

      Return the point's properties as a tuple. 

      :rtype: `tuple`







      :returns: 

         ( `x`, `y` ) 








   .. method:: GetIM(self)

      Returns an immutable representation of the ``wx.RealPoint`` 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.RealPoint``
      with a simple statement like this: ``obj = wx.RealPoint(imObj)``.



   .. method:: __bool__(self)




   .. method:: __eq__(self, other)



      :rtype: `bool`








   .. method:: __getitem__(self, idx)




   .. method:: __len__(self)




   .. method:: __mul__(self, d)



      :rtype: :ref:`wx.RealPoint`








   .. method:: __ne__(self, other)



      :rtype: `bool`








   .. method:: __nonzero__(self)




   .. method:: __reduce__(self)




   .. method:: __repr__(self)




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




   .. method:: __str__(self)




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



      |overload| Overloaded Implementations:

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

      
      **__iadd__** `(self)`
      
      
      
      
      :param `sz`: 
      :type `sz`: wx.Size
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__iadd__** `(self)`
      
      
      
      
      :param `pt`: 
      :type `pt`: wx.RealPoint
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






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



      |overload| Overloaded Implementations:

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

      
      **__isub__** `(self)`
      
      
      
      
      :param `sz`: 
      :type `sz`: wx.Size
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__isub__** `(self)`
      
      
      
      
      :param `pt`: 
      :type `pt`: wx.RealPoint
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. attribute:: IM

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


   .. attribute:: x

      A public C++ attribute of type ``float``. X coordinate of this point.                  


   .. attribute:: y

      A public C++ attribute of type ``float``. Y coordinate of this point.                  

