wx.Point2D¶
Class Hierarchy¶
Methods Summary¶
Get() . (x,y) |
|
Returns an immutable representation of the |
|
Properties Summary¶
See |
|
See |
|
See |
|
A public C++ attribute of type Double . |
|
A public C++ attribute of type Double . |
Class API¶
- class wx.Point2D(object)¶
Possible constructors:
Point2DDouble() -> None Point2DDouble(x, y) -> None Point2DDouble(pt) -> None Point2DDouble(pt) -> None
Methods¶
- __init__(self, *args, **kw)¶
-
__init__ (self)
- Return type:
None
__init__ (self, x, y)
- Parameters:
x (wx.Double)
y (wx.Double)
- Return type:
None
__init__ (self, pt)
- Parameters:
pt (Point2DDouble)
- Return type:
None
__init__ (self, pt)
- Parameters:
pt (wx.Point)
- Return type:
None
- Get(self)¶
Get() . (x,y)
Return the x and y properties as a tuple.
- Return type:
Any
- GetCrossProduct(self, vec)¶
- Parameters:
vec (Point2DDouble)
- Return type:
float
- GetDistance(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
float
- GetDistanceSquare(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
float
- GetDotProduct(self, vec)¶
- Parameters:
vec (Point2DDouble)
- Return type:
float
- GetFloor(self)¶
- Return type:
Tuple[int, int]
- GetIM(self)¶
Returns an immutable representation of the
wx.Point2D
object, based onnamedtuple
.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)
.
- GetRounded(self)¶
- Return type:
Tuple[int, int]
- GetVectorAngle(self)¶
- Return type:
float
- GetVectorLength(self)¶
- Return type:
float
- Normalize(self)¶
- Return type:
None
- SetVectorAngle(self, degrees)¶
- Parameters:
degrees (wx.Double)
- Return type:
None
- SetVectorLength(self, length)¶
- Parameters:
length (wx.Double)
- Return type:
None
- __bool__(self)¶
- __getitem__(self, idx)¶
- __len__(self)¶
- __nonzero__(self)¶
- __reduce__(self)¶
- __repr__(self)¶
- __setitem__(self, idx, val)¶
- __str__(self)¶
- __ne__(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
bool
- __imul__(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
Point2DDouble
- __iadd__(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
Point2DDouble
- __sub__(self)¶
- Return type:
Point2DDouble
- __isub__(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
Point2DDouble
- __idiv__(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
Point2DDouble
- __eq__(self, pt)¶
- Parameters:
pt (Point2DDouble)
- Return type:
bool
Properties¶
- VectorAngle¶
See
GetVectorAngle
andSetVectorAngle
- VectorLength¶
See
GetVectorLength
andSetVectorLength
- m_x¶
A public C++ attribute of type Double .
- m_y¶
A public C++ attribute of type Double .