.. wxPython Phoenix documentation

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

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.Point2D:

==========================================================================================================================================
|phoenix_title|  **wx.Point2D**
==========================================================================================================================================





|

|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>Point2D</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/Point2DDouble_inheritance.png" alt="Inheritance diagram of Point2D" 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="Point2DDouble.html" title="Point2DDouble" alt="" coords="4,5,120,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.Point2D.__init__`                                                     
:meth:`~wx.Point2D.Get`                                                          Get() . (x,y)
:meth:`~wx.Point2D.GetCrossProduct`                                              
:meth:`~wx.Point2D.GetDistance`                                                  
:meth:`~wx.Point2D.GetDistanceSquare`                                            
:meth:`~wx.Point2D.GetDotProduct`                                                
:meth:`~wx.Point2D.GetFloor`                                                     
:meth:`~wx.Point2D.GetIM`                                                        Returns an immutable representation of the ``wx.Point2D`` object, based on ``namedtuple``.
:meth:`~wx.Point2D.GetRounded`                                                   
:meth:`~wx.Point2D.GetVectorAngle`                                               
:meth:`~wx.Point2D.GetVectorLength`                                              
:meth:`~wx.Point2D.Normalize`                                                    
:meth:`~wx.Point2D.SetVectorAngle`                                               
:meth:`~wx.Point2D.SetVectorLength`                                              
:meth:`~wx.Point2D.__getitem__`                                                  
:meth:`~wx.Point2D.__len__`                                                      
:meth:`~wx.Point2D.__nonzero__`                                                  
:meth:`~wx.Point2D.__reduce__`                                                   
:meth:`~wx.Point2D.__repr__`                                                     
:meth:`~wx.Point2D.__setitem__`                                                  
:meth:`~wx.Point2D.__str__`                                                      
:meth:`~wx.Point2D.__ne__`                                                       
:meth:`~wx.Point2D.__imul__`                                                     
:meth:`~wx.Point2D.__iadd__`                                                     
:meth:`~wx.Point2D.__sub__`                                                      
:meth:`~wx.Point2D.__isub__`                                                     
:meth:`~wx.Point2D.__idiv__`                                                     
:meth:`~wx.Point2D.__eq__`                                                       
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.Point2D.IM`                                                           See :meth:`~wx.Point2D.GetIM`
:attr:`~wx.Point2D.VectorAngle`                                                  See :meth:`~wx.Point2D.GetVectorAngle` and :meth:`~wx.Point2D.SetVectorAngle`
:attr:`~wx.Point2D.VectorLength`                                                 See :meth:`~wx.Point2D.GetVectorLength` and :meth:`~wx.Point2D.SetVectorLength`
:attr:`~wx.Point2D.m_x`                                                          A public C++ attribute of type :ref:`~wx.Double`.
:attr:`~wx.Point2D.m_y`                                                          A public C++ attribute of type :ref:`~wx.Double`.
================================================================================ ================================================================================


|


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


.. class:: wx.Point2D(object)

   **Possible constructors**::

       Point2DDouble()
       
       Point2DDouble(x, y)
       
       Point2DDouble(pt)
       
       Point2DDouble(pt)
       



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



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self)`
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, x, y)`
      
      
      
      
      :param `x`: 
      :type `x`: wx.Double
      :param `y`: 
      :type `y`: wx.Double
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, pt)`
      
      
      
      
      :param `pt`: 
      :type `pt`: Point2DDouble
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, pt)`
      
      
      
      
      :param `pt`: 
      :type `pt`: wx.Point
      
      
      
      
      
      
      **~~~**






   .. method:: Get(self)

                      Get() . (x,y)

                      Return the x and y properties as a tuple. 

      :rtype: :ref:`PyObject`








   .. method:: GetCrossProduct(self, vec)




      :param `vec`: 
      :type `vec`: Point2DDouble




      :rtype: :ref:`wx.Double`








   .. method:: GetDistance(self, pt)




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




      :rtype: :ref:`wx.Double`








   .. method:: GetDistanceSquare(self, pt)




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




      :rtype: :ref:`wx.Double`








   .. method:: GetDotProduct(self, vec)




      :param `vec`: 
      :type `vec`: Point2DDouble




      :rtype: :ref:`wx.Double`








   .. method:: GetFloor(self)



      :rtype: `tuple`







      :returns: 

         ( `x`, `y` ) 








   .. method:: GetIM(self)

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



   .. method:: GetRounded(self)



      :rtype: `tuple`







      :returns: 

         ( `x`, `y` ) 








   .. method:: GetVectorAngle(self)



      :rtype: :ref:`wx.Double`








   .. method:: GetVectorLength(self)



      :rtype: :ref:`wx.Double`








   .. method:: Normalize(self)






   .. method:: SetVectorAngle(self, degrees)




      :param `degrees`: 
      :type `degrees`: wx.Double







   .. method:: SetVectorLength(self, length)




      :param `length`: 
      :type `length`: wx.Double







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




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







   .. method:: __imul__(self)




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







   .. method:: __iadd__(self)




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







   .. method:: __sub__(self)






   .. method:: __isub__(self)




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







   .. method:: __idiv__(self)




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







   .. method:: __eq__(self)




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







   .. attribute:: IM

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


   .. attribute:: VectorAngle

      See :meth:`~wx.Point2D.GetVectorAngle` and :meth:`~wx.Point2D.SetVectorAngle`


   .. attribute:: VectorLength

      See :meth:`~wx.Point2D.GetVectorLength` and :meth:`~wx.Point2D.SetVectorLength`


   .. attribute:: m_x

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


   .. attribute:: m_y

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

