PointF

Inheritance: java.lang.Object, com.aspose.ms.System.ValueType, com.aspose.ms.lang.Struct

public final class PointF extends Struct<PointF>

Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.

Constructors

ConstructorDescription
PointF()
PointF(float x, float y)Initializes a new instance of the com.aspose.imaging.PointF structure with the specified coordinates.

Methods

MethodDescription
getEmpty()Gets a new instance of the com.aspose.imaging.PointF structure that has com.aspose.imaging.PointF.X and com.aspose.imaging.PointF.Y values set to zero.
isEmpty()Gets a value indicating whether this com.aspose.imaging.PointF is empty.
getX()Gets or sets the x-coordinate of this com.aspose.imaging.PointF.
setX(float value)Gets or sets the x-coordinate of this com.aspose.imaging.PointF.
getY()Gets or sets the y-coordinate of this com.aspose.imaging.PointF.
setY(float value)Gets or sets the y-coordinate of this com.aspose.imaging.PointF.
op_Addition(PointF point, Size size)Translates a com.aspose.imaging.PointF by a given com.aspose.imaging.Size.
op_Subtraction(PointF point, Size size)Translates a com.aspose.imaging.PointF by the negative of a given com.aspose.imaging.Size.
op_Addition(PointF point, SizeF size)Translates the com.aspose.imaging.PointF by the specified com.aspose.imaging.SizeF.
op_Subtraction(PointF point, SizeF size)Translates a com.aspose.imaging.PointF by the negative of a specified com.aspose.imaging.SizeF.
op_Equality(PointF point1, PointF point2)Compares two com.aspose.imaging.PointF structures.
op_Inequality(PointF point1, PointF point2)Determines whether the coordinates of the specified points are not equal.
add(PointF point, Size size)Translates a given com.aspose.imaging.PointF by the specified com.aspose.imaging.Size.
subtract(PointF point, Size size)Translates a com.aspose.imaging.PointF by the negative of a specified size.
add(PointF point, SizeF size)Translates a given com.aspose.imaging.PointF by a specified com.aspose.imaging.SizeF.
subtract(PointF point, SizeF size)Translates a com.aspose.imaging.PointF by the negative of a specified size.
equals(Object obj)Specifies whether this com.aspose.imaging.PointF contains the same coordinates as the specified System.Object.
hashCode()Returns a hash code for this com.aspose.imaging.PointF structure.
toString()Converts this com.aspose.imaging.PointF to a human readable string.
CloneTo(PointF that)
Clone()
isEquals(PointF obj1, PointF obj2)

PointF()

public PointF()

PointF(float x, float y)

public PointF(float x, float y)

Initializes a new instance of the com.aspose.imaging.PointF structure with the specified coordinates.

Parameters:

ParameterTypeDescription
xfloatThe horizontal position of the point.
yfloatThe vertical position of the point.

getEmpty()

public static PointF getEmpty()

Gets a new instance of the com.aspose.imaging.PointF structure that has com.aspose.imaging.PointF.X and com.aspose.imaging.PointF.Y values set to zero.

Returns: PointF

isEmpty()

public boolean isEmpty()

Gets a value indicating whether this com.aspose.imaging.PointF is empty.

Returns: boolean - True if both com.aspose.imaging.PointF.X and com.aspose.imaging.PointF.Y are 0; otherwise, false.

getX()

public float getX()

Gets or sets the x-coordinate of this com.aspose.imaging.PointF.

Returns: float

setX(float value)

public void setX(float value)

Gets or sets the x-coordinate of this com.aspose.imaging.PointF.

Parameters:

ParameterTypeDescription
valuefloat

getY()

public float getY()

Gets or sets the y-coordinate of this com.aspose.imaging.PointF.

Returns: float

setY(float value)

public void setY(float value)

Gets or sets the y-coordinate of this com.aspose.imaging.PointF.

Parameters:

ParameterTypeDescription
valuefloat

op_Addition(PointF point, Size size)

public static PointF op_Addition(PointF point, Size size)

Translates a com.aspose.imaging.PointF by a given com.aspose.imaging.Size.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeA com.aspose.imaging.Size that specifies the pair of numbers to add to the coordinates of point.

Returns: PointF - Returns the translated com.aspose.imaging.PointF.

op_Subtraction(PointF point, Size size)

public static PointF op_Subtraction(PointF point, Size size)

Translates a com.aspose.imaging.PointF by the negative of a given com.aspose.imaging.Size.

Parameters:

ParameterTypeDescription
pointPointFA com.aspose.imaging.PointF to translate.
sizeSizeA com.aspose.imaging.Size that specifies the numbers to subtract from the x- and y-coordinates of the point.

Returns: PointF - The translated com.aspose.imaging.PointF.

op_Addition(PointF point, SizeF size)

public static PointF op_Addition(PointF point, SizeF size)

Translates the com.aspose.imaging.PointF by the specified com.aspose.imaging.SizeF.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeFThe com.aspose.imaging.SizeF that specifies the numbers to add to the x- and y-coordinates of the point.

Returns: PointF - The translated com.aspose.imaging.PointF.

op_Subtraction(PointF point, SizeF size)

public static PointF op_Subtraction(PointF point, SizeF size)

Translates a com.aspose.imaging.PointF by the negative of a specified com.aspose.imaging.SizeF.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeFThe com.aspose.imaging.SizeF that specifies the numbers to subtract from the coordinates of point.

Returns: PointF - The translated com.aspose.imaging.PointF.

op_Equality(PointF point1, PointF point2)

public static boolean op_Equality(PointF point1, PointF point2)

Compares two com.aspose.imaging.PointF structures. The result specifies whether the values of the com.aspose.imaging.PointF.X and com.aspose.imaging.PointF.Y properties of the two com.aspose.imaging.PointF structures are equal.

Parameters:

ParameterTypeDescription
point1PointFA first com.aspose.imaging.PointF to compare.
point2PointFA second com.aspose.imaging.PointF to compare.

Returns: boolean - True if the com.aspose.imaging.PointF.X and com.aspose.imaging.PointF.Y values of the first and second com.aspose.imaging.PointF structures are equal; otherwise, false.

op_Inequality(PointF point1, PointF point2)

public static boolean op_Inequality(PointF point1, PointF point2)

Determines whether the coordinates of the specified points are not equal.

Parameters:

ParameterTypeDescription
point1PointFA first com.aspose.imaging.PointF to compare.
point2PointFA second com.aspose.imaging.PointF to compare.

Returns: boolean - True to indicate the com.aspose.imaging.PointF.X and com.aspose.imaging.PointF.Y values of point1 and point2 are not equal; otherwise, false.

add(PointF point, Size size)

public static PointF add(PointF point, Size size)

Translates a given com.aspose.imaging.PointF by the specified com.aspose.imaging.Size.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeThe com.aspose.imaging.Size that specifies the numbers to add to the coordinates of point.

Returns: PointF - The translated com.aspose.imaging.PointF.

subtract(PointF point, Size size)

public static PointF subtract(PointF point, Size size)

Translates a com.aspose.imaging.PointF by the negative of a specified size.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeThe com.aspose.imaging.Size that specifies the numbers to subtract from the coordinates of point.

Returns: PointF - The translated com.aspose.imaging.PointF.

add(PointF point, SizeF size)

public static PointF add(PointF point, SizeF size)

Translates a given com.aspose.imaging.PointF by a specified com.aspose.imaging.SizeF.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeFThe com.aspose.imaging.SizeF that specifies the numbers to add to the coordinates of point.

Returns: PointF - The translated com.aspose.imaging.PointF.

subtract(PointF point, SizeF size)

public static PointF subtract(PointF point, SizeF size)

Translates a com.aspose.imaging.PointF by the negative of a specified size.

Parameters:

ParameterTypeDescription
pointPointFThe com.aspose.imaging.PointF to translate.
sizeSizeFThe com.aspose.imaging.SizeF that specifies the numbers to subtract from the coordinates of point.

Returns: PointF - The translated com.aspose.imaging.PointF.

equals(Object obj)

public boolean equals(Object obj)

Specifies whether this com.aspose.imaging.PointF contains the same coordinates as the specified System.Object.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe System.Object to test.

Returns: boolean - This method returns true if obj is a com.aspose.imaging.PointF and has the same coordinates as this com.aspose.imaging.Point.

hashCode()

public int hashCode()

Returns a hash code for this com.aspose.imaging.PointF structure.

Returns: int - An integer value that specifies a hash value for this com.aspose.imaging.PointF structure.

toString()

public String toString()

Converts this com.aspose.imaging.PointF to a human readable string.

Returns: java.lang.String - A string that represents this com.aspose.imaging.PointF.

CloneTo(PointF that)

public void CloneTo(PointF that)

Parameters:

ParameterTypeDescription
thatPointF

Clone()

public PointF Clone()

Returns: PointF

isEquals(PointF obj1, PointF obj2)

public static boolean isEquals(PointF obj1, PointF obj2)

Parameters:

ParameterTypeDescription
obj1PointF
obj2PointF

Returns: boolean