Point
Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct
public class Point extends Struct<Point>
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional plane.
Constructors
Constructor | Description |
---|---|
Point() | |
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. |
Point(int dw) | Initializes a new instance of the Aspose.Imaging.Point structure using coordinates specified by an integer value. |
Fields
Field | Description |
---|---|
PointFormat_internalized | Represents the point format. |
Methods
Method | Description |
---|---|
Clone() | |
CloneTo(T arg0) | |
CloneTo(Point that) | |
add(Point point, Size size) | Adds the specified Aspose.Imaging.Size to the specified Aspose.Imaging.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. |
equals(Object obj) | Specifies whether this Aspose.Imaging.Point contains the same coordinates as the specified System.Object . |
getClass() | |
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. |
getX() | Gets or sets the x-coordinate of this Aspose.Imaging.Point . |
getY() | Gets or sets the y-coordinate of this Aspose.Imaging.Point . |
hashCode() | Returns a hash code for this Aspose.Imaging.Point . |
isEmpty() | Gets a value indicating whether this Aspose.Imaging.Point is empty. |
isEquals(Point obj1, Point obj2) | |
notify() | |
notifyAll() | |
offset(Point point) | Translates this Aspose.Imaging.Point by the specified Aspose.Imaging.Point . |
offset(int dx, int dy) | Translates this Aspose.Imaging.Point by the specified amount. |
op_Addition(Point point, Size size) | Translates a Aspose.Imaging.Point by a given Aspose.Imaging.Size . |
op_Equality(Point point1, Point point2) | Compares two Aspose.Imaging.Point objects. |
op_Inequality(Point point1, Point point2) | Compares two Aspose.Imaging.Point objects. |
op_Subtraction(Point point, Size size) | Translates a Aspose.Imaging.Point by the negative of a given Aspose.Imaging.Size . |
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. |
setX(int value) | Gets or sets the x-coordinate of this Aspose.Imaging.Point . |
setY(int value) | Gets or sets the y-coordinate of this Aspose.Imaging.Point . |
subtract(Point point, Size size) | Returns the result of subtracting specified Aspose.Imaging.Size from the specified Aspose.Imaging.Point . |
toString() | Converts this Aspose.Imaging.Point to a human-readable string. |
to_PointF(Point point) | Converts the specified Point structure to the PointF structure. |
to_Size(Point point) | Converts the specified Aspose.Imaging.Point structure to a Aspose.Imaging.Size structure. |
truncate(PointF point) | Converts the specified Aspose.Imaging.PointF to a Aspose.Imaging.Point by truncating the values of the Aspose.Imaging.Point . |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
Point()
public Point()
Point(int x, int y)
public Point(int x, int y)
Initializes a new instance of the Aspose.Imaging.Point structure with the specified coordinates.
Parameters:
Parameter | Type | Description |
---|---|---|
x | int | The horizontal position of the point. |
y | int | The vertical position of the point. |
Point(Size size)
public Point(Size size)
Initializes a new instance of the Aspose.Imaging.Point structure from the Aspose.Imaging.Size structure.
Parameters:
Parameter | Type | Description |
---|---|---|
size | Size | Contains the new point coordinates. |
Point(int dw)
public Point(int dw)
Initializes a new instance of the Aspose.Imaging.Point structure using coordinates specified by an integer value.
Parameters:
Parameter | Type | Description |
---|---|---|
dw | int | A 32-bit integer that specifies the coordinates for the new point. |
PointFormat_internalized
public static final String PointFormat_internalized
Represents the point format.
Clone()
public Point Clone()
Returns: Point
CloneTo(T arg0)
public abstract void CloneTo(T arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | T |
CloneTo(Point that)
public void CloneTo(Point that)
Parameters:
Parameter | Type | Description |
---|---|---|
that | Point |
add(Point point, Size size)
public static Point add(Point point, Size size)
Adds the specified Aspose.Imaging.Size to the specified Aspose.Imaging.Point .
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Aspose.Imaging.Point to add to. |
size | Size | The Aspose.Imaging.Size to add to the point . |
Returns: Point - The Aspose.Imaging.Point that is the result of the addition operation.
ceiling(PointF point)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
point | PointF | The Aspose.Imaging.PointF to convert. |
Returns: Point - The Aspose.Imaging.Point this method converts to.
equals(Object obj)
public boolean equals(Object obj)
Specifies whether this Aspose.Imaging.Point contains the same coordinates as the specified System.Object .
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object | The System.Object to test. |
Returns: boolean - True if obj is a Aspose.Imaging.Point and has the same coordinates as this Aspose.Imaging.Point .
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getEmpty()
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.
Returns: Point
getX()
public int getX()
Gets or sets the x-coordinate of this Aspose.Imaging.Point .
Returns: int
getY()
public int getY()
Gets or sets the y-coordinate of this Aspose.Imaging.Point .
Returns: int
hashCode()
public int hashCode()
Returns a hash code for this Aspose.Imaging.Point .
Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
isEmpty()
public boolean isEmpty()
Gets a value indicating whether this Aspose.Imaging.Point is empty.
Returns: boolean - True if both Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y are 0; otherwise, false.
isEquals(Point obj1, Point obj2)
public static boolean isEquals(Point obj1, Point obj2)
Parameters:
Parameter | Type | Description |
---|---|---|
obj1 | Point | |
obj2 | Point |
Returns: boolean
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
offset(Point point)
public void offset(Point point)
Translates this Aspose.Imaging.Point by the specified Aspose.Imaging.Point .
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Aspose.Imaging.Point used to offset this Aspose.Imaging.Point . |
offset(int dx, int dy)
public void offset(int dx, int dy)
Translates this Aspose.Imaging.Point by the specified amount.
Parameters:
Parameter | Type | Description |
---|---|---|
dx | int | The amount to offset the x-coordinate. |
dy | int | The amount to offset the y-coordinate. |
op_Addition(Point point, Size size)
public static Point op_Addition(Point point, Size size)
Translates a Aspose.Imaging.Point by a given Aspose.Imaging.Size .
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Aspose.Imaging.Point to translate. |
size | Size | A Aspose.Imaging.Size that specifies the pair of numbers to add to the coordinates of point . |
Returns: Point - The translated Aspose.Imaging.Point .
op_Equality(Point point1, Point point2)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
point1 | Point | A first Aspose.Imaging.Point to compare. |
point2 | Point | A second Aspose.Imaging.Point to compare. |
Returns: boolean - True if the Aspose.Imaging.Point.X and Aspose.Imaging.Point.Y values of point1 and point2 are equal; otherwise, false.
op_Inequality(Point point1, Point point2)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
point1 | Point | A first Aspose.Imaging.Point to compare. |
point2 | Point | A second Aspose.Imaging.Point to compare. |
Returns: boolean - True if the values of either the Aspose.Imaging.Point.X properties or the Aspose.Imaging.Point.Y properties of point1 and point2 differ; otherwise, false.
op_Subtraction(Point point, Size size)
public static Point op_Subtraction(Point point, Size size)
Translates a Aspose.Imaging.Point by the negative of a given Aspose.Imaging.Size .
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Aspose.Imaging.Point to translate. |
size | Size | A Aspose.Imaging.Size that specifies the pair of numbers to subtract from the coordinates of point . |
Returns: Point - A Aspose.Imaging.Point structure that is translated by the negative of a given Aspose.Imaging.Size structure.
round(PointF point)
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.
Parameters:
Parameter | Type | Description |
---|---|---|
point | PointF | The Aspose.Imaging.PointF to convert. |
Returns: Point - The Aspose.Imaging.Point this method converts to.
setX(int value)
public void setX(int value)
Gets or sets the x-coordinate of this Aspose.Imaging.Point .
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setY(int value)
public void setY(int value)
Gets or sets the y-coordinate of this Aspose.Imaging.Point .
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
subtract(Point point, Size size)
public static Point subtract(Point point, Size size)
Returns the result of subtracting specified Aspose.Imaging.Size from the specified Aspose.Imaging.Point .
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Aspose.Imaging.Point to be subtracted from. |
size | Size | The Aspose.Imaging.Size to subtract from the point . |
Returns: Point - The Aspose.Imaging.Point that is the result of the subtraction operation.
toString()
public String toString()
Converts this Aspose.Imaging.Point to a human-readable string.
Returns: java.lang.String - A System.String that represents this instance.
to_PointF(Point point)
public static PointF to_PointF(Point point)
Converts the specified Point structure to the PointF structure.
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Point to be converted. |
Returns: PointF - The PointF that results from the conversion.
to_Size(Point point)
public static Size to_Size(Point point)
Converts the specified Aspose.Imaging.Point structure to a Aspose.Imaging.Size structure.
Parameters:
Parameter | Type | Description |
---|---|---|
point | Point | The Aspose.Imaging.Point to be converted. |
Returns: Size - The Aspose.Imaging.Size that results from the conversion.
truncate(PointF point)
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 .
Parameters:
Parameter | Type | Description |
---|---|---|
point | PointF | The Aspose.Imaging.PointF to convert. |
Returns: Point - The Aspose.Imaging.Point this method converts to.
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |