class Point
Defines a class that represents the coordinate of a point on the screen.
Sometimes it is also used for sizes (width / height).
Constructors
Point () | Constructs a new point (0,0). |
Point (const Point) | Constructs a new point that is a copy of the specified point. |
Point (const int, const int) | Constructs a new point from the specified x- and y-coordinates. |
Methods
AddPoint (const Point) | Adds the given points coordinates to this points coordinates. |
ClipToRect (const Rect) | Clips this point's x or y coordinate if one or both of them are outside of the specified Rect. |
int IsEqual (const Point) | Compares the given point to this point and returns true if they are equal. |
int IsInside (const Rect) | Returns true if this point is within the bounds of the given Rect. |
Offset (const int, const int) | Moves this point by the specified offsets. |
SubPoint (const Point) | Subtracts the given points coordinates from this points coordinates. |
Properties
int X () | Returns the x-coord of this point. |
X (const int) | Sets the x-coord of this point. |
int Y () | Returns the y-coord of this point. |
Y (const int) | Sets the y-coord of this point. |
Reference
method Point () |
Constructs a new point (0,0). |
method Point (const Point src) |
Constructs a new point that is a copy of the specified point. |
method Point (const int x, const int y) |
Constructs a new point from the specified x- and y-coordinates. |
method AddPoint (const Point src) |
Adds the given points coordinates to this points coordinates. |
method ClipToRect (const Rect r) |
Clips this point's x or y coordinate if one or both of them are outside of the specified Rect. |
method int IsEqual (const Point src) |
Compares the given point to this point and returns true if they are equal. |
method int IsInside (const Rect r) |
Returns true if this point is within the bounds of the given Rect. |
method Offset (const int x, const int y) |
Moves this point by the specified offsets. |
method SubPoint (const Point src) |
Subtracts the given points coordinates from this points coordinates. |
accessor int X () |
Returns the x-coord of this point. |
accessor X (const int) |
Sets the x-coord of this point. |
accessor int Y () |
Returns the y-coord of this point. |
accessor Y (const int) |
Sets the y-coord of this point. |