public class Point extends com.aspose.ms.lang.Struct<Point>
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
| Constructor and Description |
|---|
Point() |
Point(int dw)
Initializes a new instance of the
Aspose.Imaging.Point structure using coordinates specified by an integer value. |
Point(int x,
int y)
Initializes a new instance of the
Aspose.Imaging.Point structure with the specified coordinates. |
Point(Size size)
Initializes a new instance of the
Aspose.Imaging.Point structure from the Aspose.Imaging.Size structure. |
| Modifier and Type | Method and Description |
|---|---|
static Point |
add(Point point,
Size size)
Adds the specified
Aspose.Imaging.Size to the specified Aspose.Imaging.Point. |
static Point |
ceiling(PointF point)
Converts the specified
Aspose.Imaging.PointF to a Aspose.Imaging.Point by rounding the values of the Aspose.Imaging.PointF to the next higher integer values. |
Point |
Clone() |
void |
CloneTo(Point that) |
boolean |
equals(Object obj)
Specifies whether this
Aspose.Imaging.Point contains the same coordinates as the specified System.Object. |
static Point |
getEmpty()
Gets a new instance of the
Aspose.Imaging.Point structure that has Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y values set to zero. |
int |
getX()
Gets or sets the x-coordinate of this
Aspose.Imaging.Point. |
int |
getY()
Gets or sets the y-coordinate of this
Aspose.Imaging.Point. |
int |
hashCode()
Returns a hash code for this
Aspose.Imaging.Point. |
boolean |
isEmpty()
Gets a value indicating whether this
Aspose.Imaging.Point is empty. |
static boolean |
isEquals(Point obj1,
Point obj2) |
void |
offset(int dx,
int dy)
Translates this
Aspose.Imaging.Point by the specified amount. |
void |
offset(Point point)
Translates this
Aspose.Imaging.Point by the specified Aspose.Imaging.Point. |
static Point |
op_Addition(Point point,
Size size)
Translates a
Aspose.Imaging.Point by a given Aspose.Imaging.Size. |
static boolean |
op_Equality(Point point1,
Point point2)
Compares two
Aspose.Imaging.Point objects. |
static boolean |
op_Inequality(Point point1,
Point point2)
Compares two
Aspose.Imaging.Point objects. |
static Point |
op_Subtraction(Point point,
Size size)
Translates a
Aspose.Imaging.Point by the negative of a given Aspose.Imaging.Size. |
static Point |
round(PointF point)
Converts the specified
Aspose.Imaging.PointF to a Aspose.Imaging.Point object by rounding the Aspose.Imaging.Point values to the nearest integer. |
void |
setX(int value)
Gets or sets the x-coordinate of this
Aspose.Imaging.Point. |
void |
setY(int value)
Gets or sets the y-coordinate of this
Aspose.Imaging.Point. |
static Point |
subtract(Point point,
Size size)
Returns the result of subtracting specified
Aspose.Imaging.Size from the specified Aspose.Imaging.Point. |
static PointF |
to_PointF(Point point)
Converts the specified
Point structure to the PointF structure. |
static Size |
to_Size(Point point)
Converts the specified
Aspose.Imaging.Point structure to a Aspose.Imaging.Size structure. |
String |
toString()
Converts this
Aspose.Imaging.Point to a human-readable string. |
static Point |
truncate(PointF point)
Converts the specified
Aspose.Imaging.PointF to a Aspose.Imaging.Point by truncating the values of the Aspose.Imaging.Point. |
public Point()
public Point(int x,
int y)
Initializes a new instance of the Aspose.Imaging.Point structure with the specified coordinates.
x - The horizontal position of the point.y - The vertical position of the point.public Point(Size size)
Initializes a new instance of the Aspose.Imaging.Point structure from the Aspose.Imaging.Size structure.
size - Contains the new point coordinates.public Point(int dw)
Initializes a new instance of the Aspose.Imaging.Point structure using coordinates specified by an integer value.
dw - A 32-bit integer that specifies the coordinates for the new point.public static Point getEmpty()
Gets a new instance of the Aspose.Imaging.Point structure that has Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y values set to zero.
public boolean isEmpty()
Gets a value indicating whether this Aspose.Imaging.Point is empty.
Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y are 0; otherwise, false.public int getX()
Gets or sets the x-coordinate of this Aspose.Imaging.Point.
public void setX(int value)
Gets or sets the x-coordinate of this Aspose.Imaging.Point.
public int getY()
Gets or sets the y-coordinate of this Aspose.Imaging.Point.
public void setY(int value)
Gets or sets the y-coordinate of this Aspose.Imaging.Point.
public static Point add(Point point, Size size)
Adds the specified Aspose.Imaging.Size to the specified Aspose.Imaging.Point.
point - The Aspose.Imaging.Point to add to.size - The Aspose.Imaging.Size to add to the point.Aspose.Imaging.Point that is the result of the addition operation.public static Point subtract(Point point, Size size)
Returns the result of subtracting specified Aspose.Imaging.Size from the specified Aspose.Imaging.Point.
point - The Aspose.Imaging.Point to be subtracted from.size - The Aspose.Imaging.Size to subtract from the point.Aspose.Imaging.Point that is the result of the subtraction operation.public static Point ceiling(PointF point)
Converts the specified Aspose.Imaging.PointF to a Aspose.Imaging.Point by rounding the values of the Aspose.Imaging.PointF to the next higher integer values.
point - The Aspose.Imaging.PointF to convert.Aspose.Imaging.Point this method converts to.public static Point round(PointF point)
Converts the specified Aspose.Imaging.PointF to a Aspose.Imaging.Point object by rounding the Aspose.Imaging.Point values to the nearest integer.
point - The Aspose.Imaging.PointF to convert.Aspose.Imaging.Point this method converts to.public static Point truncate(PointF point)
Converts the specified Aspose.Imaging.PointF to a Aspose.Imaging.Point by truncating the values of the Aspose.Imaging.Point.
point - The Aspose.Imaging.PointF to convert.Aspose.Imaging.Point this method converts to.public static Point op_Addition(Point point, Size size)
Translates a Aspose.Imaging.Point by a given Aspose.Imaging.Size.
point - The Aspose.Imaging.Point to translate.size - A Aspose.Imaging.Size that specifies the pair of numbers to add to the coordinates of point.Aspose.Imaging.Point.public static Point op_Subtraction(Point point, Size size)
Translates a Aspose.Imaging.Point by the negative of a given Aspose.Imaging.Size.
point - The Aspose.Imaging.Point to translate.size - A Aspose.Imaging.Size that specifies the pair of numbers to subtract from the coordinates of point.Aspose.Imaging.Point structure that is translated by the negative of a given Aspose.Imaging.Size structure.public static boolean op_Equality(Point point1, Point point2)
Compares two Aspose.Imaging.Point objects. The result specifies whether the values of the Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y properties of the two Aspose.Imaging.Point objects are equal.
point1 - A first Aspose.Imaging.Point to compare.point2 - A second Aspose.Imaging.Point to compare.Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y values of point1 and point2 are equal; otherwise, false.public static boolean op_Inequality(Point point1, Point point2)
Compares two Aspose.Imaging.Point objects. The result specifies whether the values of the Aspose.Imaging.Point.X or Aspose.Imaging.Point.Y properties of the two Aspose.Imaging.Point objects are unequal.
point1 - A first Aspose.Imaging.Point to compare.point2 - A second Aspose.Imaging.Point to compare.Aspose.Imaging.Point.X properties or the Aspose.Imaging.Point.Y properties of point1 and point2 differ; otherwise, false.public static Size to_Size(Point point)
Converts the specified Aspose.Imaging.Point structure to a Aspose.Imaging.Size structure.
point - The Aspose.Imaging.Point to be converted.Aspose.Imaging.Size that results from the conversion.public static PointF to_PointF(Point point)
Converts the specified Point structure to the PointF structure.
point - The Point to be converted.PointF that results from the conversion.public void offset(Point point)
Translates this Aspose.Imaging.Point by the specified Aspose.Imaging.Point.
point - The Aspose.Imaging.Point used to offset this Aspose.Imaging.Point.public void offset(int dx,
int dy)
Translates this Aspose.Imaging.Point by the specified amount.
dx - The amount to offset the x-coordinate.dy - The amount to offset the y-coordinate.public boolean equals(Object obj)
Specifies whether this Aspose.Imaging.Point contains the same coordinates as the specified System.Object.
public int hashCode()
Returns a hash code for this Aspose.Imaging.Point.
public String toString()
Converts this Aspose.Imaging.Point to a human-readable string.
public void CloneTo(Point that)
CloneTo in class com.aspose.ms.System.ValueType<Point>Copyright (c) 2008-2022 Aspose Pty Ltd. All Rights Reserved.