A wx.RealPoint is a useful data structure for graphics operations.
It contains floating point x and y members. See wx.Point for an integer version.
Note that the coordinates stored inside a wx.RealPoint object may be negative and that wx.RealPoint functions do not perform any check against negative values.
See also
Initializes to zero the x and y members. |
|
Return the point’s properties as a tuple. |
|
Returns an immutable representation of the |
|
See |
|
A public C++ attribute of type |
|
A public C++ attribute of type |
wx.
RealPoint
(object)¶Possible constructors:
RealPoint()
RealPoint(x, y)
RealPoint(pt)
A RealPoint is a useful data structure for graphics operations.
__init__
(self, *args, **kw)¶__init__ (self)
Initializes to zero the x and y members.
__init__ (self, x, y)
Initializes the point with the given coordinates.
x (float) –
y (float) –
__init__ (self, pt)
Converts the given wx.Point (with integer coordinates) to a wx.RealPoint.
pt (wx.Point) –
Get
(self)¶Return the point’s properties as a tuple.
tuple
( x, y )
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)
.
__bool__
(self)¶__eq__
(self, other)¶bool
__getitem__
(self, idx)¶__len__
(self)¶__mul__
(self, d)¶__ne__
(self, other)¶bool
__nonzero__
(self)¶__reduce__
(self)¶__repr__
(self)¶__setitem__
(self, idx, val)¶__str__
(self)¶__iadd__
(self, *args, **kw)¶__iadd__ (self)
sz (wx.Size) –
__iadd__ (self)
pt (wx.RealPoint) –
__isub__
(self, *args, **kw)¶__isub__ (self)
sz (wx.Size) –
__isub__ (self)
pt (wx.RealPoint) –
x
¶A public C++ attribute of type float
. X coordinate of this point.
y
¶A public C++ attribute of type float
. Y coordinate of this point.