System.Drawing.Point
Summary
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
Defined in Point.js
Constructors
System.Drawing.Point(<Int> x, <Int> y)
Initializes a new instance of the Point class with the specified coordinates.
Parameters
x - The horizontal position of the point.
y - The vertical position of the point.
Properties
-
Int X
Gets or sets the x-coordinate of this Point.
-
Int Y
Gets or sets the y-coordinate of this Point.
-
static final Point Empty
Represents a Point that has X and Y values set to zero.
Methods
-
Object Clone()
Creates a new instance of a Point with the same values as this Point.
-
Boolean Equals(<Object> obj)
Specifies whether this Point contains the same coordinates as the specified Object.
Parameters
obj - The Object to test.
Return Values
True if obj is a Point and has the same coordinates as this Point.
-
Boolean IsEmpty()
Gets a value indicating whether this Point is empty.
Return Values
True if both X and Y are 0; otherwise, false.
-
void Offset(<Int> dx, <Int> dy)
Translates this Point by the specified amount.
Parameters
dx - The amount to offset the x-coordinate.
dy - The amount to offset the y-coordinate.
-
String ToString()
Converts this Point to a human-readable string.
Return Values
A string that represents this Point.
-
static Point Add(<Point> pt, <Size> sz)
Adds the specified Size to the specified Point. The Add adds the Width and Height of the specified Size to the X and Y values of the specified point.
Parameters
pt - The Point to add.
sz - The Size to add.
Return Values
The Point that is the result of the addition operation.
-
static Point Subtract(<Point> pt, <Size> sz)
Returns the result of subtracting specified Size from the specified Point. The Subtract subtracts the Width and Height of the specified Size from the X and Y values of the specified point.
Parameters
pt - The Point to be subtracted from.
sz - The Size to subtract from the Point.
Return Values
The Point that is the result of the subtraction operation.