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
Point structure using coordinates specified by an integer value. |
Point(int x,
int y)
Initializes a new instance of the
Point structure with the specified coordinates. |
Point(Size size)
|
Modifier and Type | Method and Description |
---|---|
static Point |
add(Point point,
Size size)
|
static Point |
ceiling(PointF point)
|
Object |
clone() |
Point |
Clone() |
void |
CloneTo(Point that) |
boolean |
equals(Object obj)
|
static Point |
getEmpty()
Gets a new instance of the
Point structure that has Aspose.PSD.Point.X (Point.getX() /Point.setX(int) ) and Aspose.PSD.Point.Y (Point.getY() /Point.setY(int) ) values set to zero. |
int |
getX()
Gets or sets the x-coordinate of this
Point . |
int |
getY()
Gets or sets the y-coordinate of this
Point . |
int |
hashCode()
Returns a hash code for this
Point . |
boolean |
isEmpty()
Gets a value indicating whether this
Point is empty. |
void |
offset(int dx,
int dy)
Translates this
Point by the specified amount. |
void |
offset(Point point)
|
static Point |
op_Addition(Point point,
Size size)
|
static boolean |
op_Equality(Point point1,
Point point2)
Compares two
Point objects. |
static boolean |
op_Inequality(Point point1,
Point point2)
Compares two
Point objects. |
static Point |
op_Subtraction(Point point,
Size size)
|
static Point |
round(PointF point)
|
void |
setX(int value)
Gets or sets the x-coordinate of this
Point . |
void |
setY(int value)
Gets or sets the y-coordinate of this
Point . |
static Point |
subtract(Point point,
Size size)
|
static PointF |
to_PointF(Point point)
|
static Size |
to_Size(Point point)
|
String |
toString()
Converts this
Point to a human-readable string. |
static Point |
truncate(PointF point)
|
public Point()
public Point(int x, int y)
Initializes a new instance of the Point
structure with the specified coordinates.
x
- The horizontal position of the point.y
- The vertical position of the point.public Point(Size size)
size
- Contains the new point coordinates.public Point(int dw)
Initializes a new instance of the 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 Point
structure that has Aspose.PSD.Point.X
(Point.getX()
/Point.setX(int)
) and Aspose.PSD.Point.Y
(Point.getY()
/Point.setY(int)
) values set to zero.
public final boolean isEmpty()
Gets a value indicating whether this Point
is empty.
Aspose.PSD.Point.X
(Point.getX()
/Point.setX(int)
) and Aspose.PSD.Point.Y
(Point.getY()
/Point.setY(int)
) are 0; otherwise, false.public final int getX()
Gets or sets the x-coordinate of this Point
.
public final void setX(int value)
Gets or sets the x-coordinate of this Point
.
public final int getY()
Gets or sets the y-coordinate of this Point
.
public final void setY(int value)
Gets or sets the y-coordinate of this Point
.
public static boolean op_Equality(Point point1, Point point2)
Compares two Point
objects. The result specifies whether the values of the Aspose.PSD.Point.X
(Point.getX()
/Point.setX(int)
) and Aspose.PSD.Point.Y
(Point.getY()
/Point.setY(int)
) properties of the two Point
objects are equal.
point1
- A first Point
to compare.point2
- A second Point
to compare.Aspose.PSD.Point.X
(Point.getX()
/Point.setX(int)
) and Aspose.PSD.Point.Y
(Point.getY()
/Point.setY(int)
) values of point1
and point2
are equal; otherwise, false.public static boolean op_Inequality(Point point1, Point point2)
Compares two Point
objects. The result specifies whether the values of the Aspose.PSD.Point.X
(Point.getX()
/Point.setX(int)
) or Aspose.PSD.Point.Y
(Point.getY()
/Point.setY(int)
) properties of the two Point
objects are unequal.
point1
- A first Point
to compare.point2
- A second Point
to compare.Aspose.PSD.Point.X
(Point.getX()
/Point.setX(int)
) properties or the Aspose.PSD.Point.Y
(Point.getY()
/Point.setY(int)
) properties of point1
and point2
differ; otherwise, false.public final void offset(Point point)
public final void offset(int dx, int dy)
Translates this 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)
public int hashCode()
Returns a hash code for this Point
.
public void CloneTo(Point that)
CloneTo
in class com.aspose.ms.System.ValueType<Point>
Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.