PointF

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

All Implemented Interfaces: com.aspose.ms.System.IEquatable, java.lang.Cloneable

public class PointF extends Struct<PointF> implements System.IEquatable<PointF>, Cloneable

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 PointF structure with the specified coordinates.

Methods

MethodDescription
op_Addition(PointF pt, Size sz)
op_Subtraction(PointF pt, Size sz)
op_Addition(PointF pt, SizeF sz)
op_Subtraction(PointF pt, SizeF sz)
op_Equality(PointF left, PointF right)Compares two PointF structures.
op_Inequality(PointF left, PointF right)Determines whether the coordinates of the specified points are not equal.
add(PointF orig, Size size)Translates a given PointF by a specified SizeF.
subtract(PointF pt, Size sz)
add(PointF orig, SizeF sizeF)Translates a given PointF by a specified SizeF.
subtract(PointF pt, SizeF sz)
isEquals(PointF obj1, PointF obj2)
getEmpty()
isEmpty()Gets a value indicating whether this PointF is empty.
getX()Gets the x-coordinate of this PointF.
setX(float value)Sets the x-coordinate of this PointF.
getY()Gets the y-coordinate of this PointF.
setY(float value)Sets the y-coordinate of this PointF.
equals(Object obj)Specifies whether this PointF contains the same coordinates as the specified Object.
hashCode()Returns a hash code for this instance.
toString()
equals(PointF other)Tests whether other PointF structure has the same location of this PointF structure.
CloneTo(PointF that)
Clone()
clone()

PointF()

public PointF()

PointF(float x, float y)

public PointF(float x, float y)

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

Parameters:

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

op_Addition(PointF pt, Size sz)

public static PointF op_Addition(PointF pt, Size sz)

Parameters:

ParameterTypeDescription
ptPointF
szSize

Returns: PointF

op_Subtraction(PointF pt, Size sz)

public static PointF op_Subtraction(PointF pt, Size sz)

Parameters:

ParameterTypeDescription
ptPointF
szSize

Returns: PointF

op_Addition(PointF pt, SizeF sz)

public static PointF op_Addition(PointF pt, SizeF sz)

Parameters:

ParameterTypeDescription
ptPointF
szSizeF

Returns: PointF

op_Subtraction(PointF pt, SizeF sz)

public static PointF op_Subtraction(PointF pt, SizeF sz)

Parameters:

ParameterTypeDescription
ptPointF
szSizeF

Returns: PointF

op_Equality(PointF left, PointF right)

public static boolean op_Equality(PointF left, PointF right)

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

Parameters:

ParameterTypeDescription
leftPointFFirst PointF to compare.
rightPointFSecond PointF to compare.

Returns: boolean - true if the PointF.X and PointF.Y values of the left and right PointF structures are equal; otherwise, false.

op_Inequality(PointF left, PointF right)

public static boolean op_Inequality(PointF left, PointF right)

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

Parameters:

ParameterTypeDescription
leftPointFFirst PointF to compare.
rightPointFSecond PointF to compare.

Returns: boolean - true to indicate the PointF.X and PointF.Y values of left and right are not equal; otherwise, false.

add(PointF orig, Size size)

public static PointF add(PointF orig, Size size)

Translates a given PointF by a specified SizeF.

Parameters:

ParameterTypeDescription
origPointFThe PointF to translate.
sizeSizeThe Size that specifies the numbers to add to the coordinates of orig.

Returns: PointF - The translated PointF.

subtract(PointF pt, Size sz)

public static PointF subtract(PointF pt, Size sz)

Parameters:

ParameterTypeDescription
ptPointF
szSize

Returns: PointF

add(PointF orig, SizeF sizeF)

public static PointF add(PointF orig, SizeF sizeF)

Translates a given PointF by a specified SizeF.

Parameters:

ParameterTypeDescription
origPointFThe PointF to translate.
sizeFSizeFThe SizeF that specifies the numbers to add to the coordinates of orig.

Returns: PointF - The translated PointF.

subtract(PointF pt, SizeF sz)

public static PointF subtract(PointF pt, SizeF sz)

Parameters:

ParameterTypeDescription
ptPointF
szSizeF

Returns: PointF

isEquals(PointF obj1, PointF obj2)

public static boolean isEquals(PointF obj1, PointF obj2)

Parameters:

ParameterTypeDescription
obj1PointF
obj2PointF

Returns: boolean

getEmpty()

public static PointF getEmpty()

Returns: PointF

isEmpty()

public final boolean isEmpty()

Gets a value indicating whether this PointF is empty.

Returns: boolean - a value indicating whether this PointF is empty.

getX()

public final float getX()

Gets the x-coordinate of this PointF.

Returns: float - the x-coordinate of this PointF.

setX(float value)

public final void setX(float value)

Sets the x-coordinate of this PointF.

Parameters:

ParameterTypeDescription
valuefloatthe x-coordinate of this PointF.

getY()

public final float getY()

Gets the y-coordinate of this PointF.

Returns: float - the y-coordinate of this PointF.

setY(float value)

public final void setY(float value)

Sets the y-coordinate of this PointF.

Parameters:

ParameterTypeDescription
valuefloatthe y-coordinate of this PointF.

equals(Object obj)

public boolean equals(Object obj)

Specifies whether this PointF contains the same coordinates as the specified Object.

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe Object to test.

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

hashCode()

public int hashCode()

Returns a hash code for this instance.

Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

toString()

public String toString()

Returns: java.lang.String

equals(PointF other)

public final boolean equals(PointF other)

Tests whether other PointF structure has the same location of this PointF structure.

Parameters:

ParameterTypeDescription
otherPointFOther point to test

Returns: boolean - This method returns true if other PointF structure and its X and Y properties are equal to the corresponding properties of this PointF structure; otherwise, false.

CloneTo(PointF that)

public void CloneTo(PointF that)

Parameters:

ParameterTypeDescription
thatPointF

Clone()

public PointF Clone()

Returns: PointF

clone()

public Object clone()

Returns: java.lang.Object