 wx.Point¶
 wx.Point¶A wx.Point is a useful data structure for graphics operations.
It contains integer x and y members. See wx.RealPoint for a floating point version.
Note that the width and height stored inside a   wx.Point  object may be negative and that   wx.Point  functions do not perform any check against negative values (this is used to e.g. store the special -1 value in wx.DefaultPosition       instance).
See also
 Class Hierarchy¶
 Class Hierarchy¶ Inheritance diagram for class Point:
Inheritance diagram for class Point:
 Methods Summary¶
 Methods Summary¶| Constructs a point. | |
| Return the x and y properties as a tuple. | |
| Returns an immutable representation of the  | |
| Returns  | |
| Combine this object with another one replacing the uninitialized values. | |
 Properties Summary¶
 Properties Summary¶| See  | |
| A public C++ attribute of type  | |
| A public C++ attribute of type  | 
 Class API¶
 Class API¶Possible constructors:
Point() -> None
Point(x, y) -> None
Point(pt) -> None
A Point is a useful data structure for graphics operations.
__init__ (self)
Constructs a point.
Initializes the internal x and y coordinates to zero.
None
__init__ (self, x, y)
Initializes the point object with the given x and y coordinates.
x (int)
y (int)
None
__init__ (self, pt)
Converts the given wx.RealPoint (with floating point coordinates) to a wx.Point instance.
Notice that this truncates the floating point values of pt components, if you want to round them instead you need to do it manually, e.g.
rp = wx.RealPoint(10.3, 20.8)
p = wx.Point(int(round(rp.x)), int(round(rp.y)))
pt (wx.RealPoint)
None
Return the x and y properties as a tuple.
Any
Returns an immutable representation of the wx.Point 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.Point
with a simple statement like this: obj = wx.Point(imObj).
Returns True if neither of the point components is equal to DefaultCoord.
This method is typically used before calling SetDefaults .
bool
Added in version 2.9.2.
Combine this object with another one replacing the uninitialized values.
It is typically used like this:
if not pos.IsFullySpecified():
    pos.SetDefaults(GetDefaultPosition())
pt (wx.Point)
None
Added in version 2.9.2.
See also
bool
bool
__iadd__ (self, sz)
__iadd__ (self, pt)
__isub__ (self, sz)
__isub__ (self, pt)
A public C++ attribute of type int. x member.
A public C++ attribute of type int. y member.