.. 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.Point2D:
==========================================================================================================================================
|phoenix_title| **wx.Point2D**
==========================================================================================================================================
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
Point2D:
|
|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.__bool__`
: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 `~wx.Double` .
:attr:`~wx.Point2D.m_y` A public C++ attribute of type `~wx.Double` .
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.Point2D(object)
**Possible constructors**::
Point2DDouble() -> None
Point2DDouble(x : float, y : float) -> None
Point2DDouble(pt : Point2DDouble) -> None
Point2DDouble(pt : Point) -> None
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
:rtype: `None`
:html:`
`
**__init__** `(self, x : float, y : float)`
:param `x`:
:type `x`: wx.Double
:param `y`:
:type `y`: wx.Double
:rtype: `None`
:html:`
`
**__init__** `(self, pt : Point2DDouble)`
:param `pt`:
:type `pt`: Point2DDouble
:rtype: `None`
:html:`
`
**__init__** `(self, pt : Point)`
:param `pt`:
:type `pt`: wx.Point
:rtype: `None`
:html:`
`
.. method:: Get(self)
Get() . (x,y)
Return the x and y properties as a tuple.
:rtype: `Any`
.. method:: GetCrossProduct(self, vec : Point2DDouble)
:param `vec`:
:type `vec`: Point2DDouble
:rtype: `float`
.. method:: GetDistance(self, pt : Point2DDouble)
:param `pt`:
:type `pt`: Point2DDouble
:rtype: `float`
.. method:: GetDistanceSquare(self, pt : Point2DDouble)
:param `pt`:
:type `pt`: Point2DDouble
:rtype: `float`
.. method:: GetDotProduct(self, vec : Point2DDouble)
:param `vec`:
:type `vec`: Point2DDouble
:rtype: `float`
.. method:: GetFloor(self)
:rtype: :ref:`Tuple[int, int]`
.. 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: :ref:`Tuple[int, int]`
.. method:: GetVectorAngle(self)
:rtype: `float`
.. method:: GetVectorLength(self)
:rtype: `float`
.. method:: Normalize(self)
:rtype: `None`
.. method:: SetVectorAngle(self, degrees : float)
:param `degrees`:
:type `degrees`: wx.Double
:rtype: `None`
.. method:: SetVectorLength(self, length : float)
:param `length`:
:type `length`: wx.Double
:rtype: `None`
.. 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)
: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 `~wx.Double` .
.. attribute:: m_y
A public C++ attribute of type `~wx.Double` .