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

Inheritance diagram for class
RealPoint:
|
|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() -> None
RealPoint(x : float, y : float) -> None
RealPoint(pt : Point) -> None
A RealPoint is a useful data structure for graphics operations.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__init__** `(self)`
Initializes to zero the x and y members.
:rtype: `None`
:html:`
`
**__init__** `(self, x : float, y : float)`
Initializes the point with the given coordinates.
:param `x`:
:type `x`: float
:param `y`:
:type `y`: float
:rtype: `None`
:html:`
`
**__init__** `(self, pt : Point)`
Converts the given :ref:`wx.Point` (with integer coordinates) to a :ref:`wx.RealPoint`.
:param `pt`:
:type `pt`: wx.Point
:rtype: `None`
:html:`
`
.. 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: RealPoint)
:rtype: `bool`
.. method:: __getitem__(self, idx)
.. method:: __len__(self)
.. method:: __mul__(self, d: float)
:rtype: :ref:`wx.RealPoint`
.. method:: __ne__(self, other: RealPoint)
: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:`
`
**__iadd__** `(self)`
:param `sz`:
:type `sz`: wx.Size
:html:`
`
**__iadd__** `(self)`
:param `pt`:
:type `pt`: wx.RealPoint
:html:`
`
.. method:: __isub__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__isub__** `(self)`
:param `sz`:
:type `sz`: wx.Size
:html:`
`
**__isub__** `(self)`
:param `pt`:
:type `pt`: wx.RealPoint
:html:`
`
.. 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.