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

ConstructorDescription
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

FieldDescription
PointFormat_internalizedRepresents the point format.

Methods

MethodDescription
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:

ParameterTypeDescription
xintThe horizontal position of the point.
yintThe 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:

ParameterTypeDescription
sizeSizeContains 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:

ParameterTypeDescription
dwintA 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:

ParameterTypeDescription
arg0T

CloneTo(Point that)

public void CloneTo(Point that)

Parameters:

ParameterTypeDescription
thatPoint

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:

ParameterTypeDescription
pointPointThe Aspose.Imaging.Point to add to.
sizeSizeThe 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:

ParameterTypeDescription
pointPointFThe 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:

ParameterTypeDescription
objjava.lang.ObjectThe 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:

ParameterTypeDescription
obj1Point
obj2Point

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:

ParameterTypeDescription
pointPointThe 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:

ParameterTypeDescription
dxintThe amount to offset the x-coordinate.
dyintThe 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:

ParameterTypeDescription
pointPointThe Aspose.Imaging.Point to translate.
sizeSizeA 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:

ParameterTypeDescription
point1PointA first Aspose.Imaging.Point to compare.
point2PointA 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:

ParameterTypeDescription
point1PointA first Aspose.Imaging.Point to compare.
point2PointA 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:

ParameterTypeDescription
pointPointThe Aspose.Imaging.Point to translate.
sizeSizeA 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:

ParameterTypeDescription
pointPointFThe 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:

ParameterTypeDescription
valueint

setY(int value)

public void setY(int value)

Gets or sets the y-coordinate of this Aspose.Imaging.Point .

Parameters:

ParameterTypeDescription
valueint

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:

ParameterTypeDescription
pointPointThe Aspose.Imaging.Point to be subtracted from.
sizeSizeThe 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:

ParameterTypeDescription
pointPointThe 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:

ParameterTypeDescription
pointPointThe 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:

ParameterTypeDescription
pointPointFThe 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:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int