A Point is a useful data structure for graphics operations.
It contains integer x and y members. See RealPoint for a floating point version.
Note that the width and height stored inside a Point object may be negative and that Point functions do not perform any check against negative values (this is used to e.g. store the special -1 value in DefaultPosition instance).
See also
__init__ | Constructs a point. |
Get | Return the x and y properties as a tuple. |
IsFullySpecified | Returns True if neither of the point components is equal to DefaultCoord. |
SetDefaults | Combine this object with another one replacing the uninitialized values. |
__getitem__ | |
__len__ | |
__nonzero__ | |
__reduce__ | |
__repr__ | |
__setitem__ | |
__str__ | |
__iadd__ | |
__isub__ |
A Point is a useful data structure for graphics operations.
Possible constructors:
Point()
Point(x, y)
Point(pt)
Overloaded Implementations:
__init__ (self)
Constructs a point.
Initializes the internal x and y coordinates to zero.
__init__ (self, x, y)
Initializes the point object with the given x and y coordinates.
Parameters: |
|
---|
__init__ (self, pt)
Converts the given RealPoint (with floating point coordinates) to a Point instance.
Parameters: | pt (RealPoint) – |
---|
Return the x and y properties as a tuple.
Return type: | tuple |
---|---|
Returns: | ( x, y ) |
Returns True if neither of the point components is equal to DefaultCoord.
This method is typically used before calling SetDefaults .
Return type: | bool |
---|
New 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())
Parameters: | pt (Point) – |
---|
New in version 2.9.2.
See also
Overloaded Implementations:
__iadd__ (self)
Parameters: | sz (Size) – |
---|
__iadd__ (self)
Parameters: | pt (Point) – |
---|