Point class

Point class

Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane. Compatible with .NET System.Drawing.Point.

The Point type exposes the following members:

Constructors

ConstructorDescription
__init__(self, x=0, y=0)Creates a point with the specified coordinates. Float values are truncated to integers.

Properties

PropertyDescription
xGets or sets the x-coordinate of this point.
Read/write int.
yGets or sets the y-coordinate of this point.
Read/write int.

Remarks

Points are compared by their coordinates with == and can be used as dictionary keys or set members.

See Also