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



.. _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>
   </div>
   <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,104,35"/> </map> 
   </p>

|


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

      **~~~**

      
      **__init__** `(self)`
      
      Initializes to zero the x and y members.                   
      
      
      
      
      **~~~**

      
      **__init__** `(self, x, y)`
      
      Initializes the point with the given coordinates.                  
      
      
      :param `x`: 
      :type `x`: float
      :param `y`: 
      :type `y`: float
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, pt)`
      
      Converts the given :ref:`wx.Point`  (with integer coordinates) to a :ref:`wx.RealPoint`.                  
      
      
      :param `pt`: 
      :type `pt`: wx.Point
      
      
      
      
      
      
      **~~~**






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

      **~~~**

      
      **__iadd__** `(self)`
      
      
      
      
      :param `sz`: 
      :type `sz`: wx.Size
      
      
      
      
      
      
      **~~~**

      
      **__iadd__** `(self)`
      
      
      
      
      :param `pt`: 
      :type `pt`: wx.RealPoint
      
      
      
      
      
      
      **~~~**






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



      |overload| Overloaded Implementations:

      **~~~**

      
      **__isub__** `(self)`
      
      
      
      
      :param `sz`: 
      :type `sz`: wx.Size
      
      
      
      
      
      
      **~~~**

      
      **__isub__** `(self)`
      
      
      
      
      :param `pt`: 
      :type `pt`: wx.RealPoint
      
      
      
      
      
      
      **~~~**






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

