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
| Constructor | Description |
|---|---|
| PointF() | |
| PointF(float x, float y) | Initializes a new instance of the PointF structure with the specified coordinates. |
Methods
| Method | Description |
|---|---|
| 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:
| Parameter | Type | Description |
|---|---|---|
| x | float | The horizontal position of the point. |
| y | float | The vertical position of the point. |
op_Addition(PointF pt, Size sz)
public static PointF op_Addition(PointF pt, Size sz)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | |
| sz | Size |
Returns: PointF
op_Subtraction(PointF pt, Size sz)
public static PointF op_Subtraction(PointF pt, Size sz)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | |
| sz | Size |
Returns: PointF
op_Addition(PointF pt, SizeF sz)
public static PointF op_Addition(PointF pt, SizeF sz)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | |
| sz | SizeF |
Returns: PointF
op_Subtraction(PointF pt, SizeF sz)
public static PointF op_Subtraction(PointF pt, SizeF sz)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | |
| sz | SizeF |
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:
| Parameter | Type | Description |
|---|---|---|
| left | PointF | First PointF to compare. |
| right | PointF | Second 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:
| Parameter | Type | Description |
|---|---|---|
| left | PointF | First PointF to compare. |
| right | PointF | Second 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:
| Parameter | Type | Description |
|---|---|---|
| orig | PointF | The PointF to translate. |
| size | Size | The 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:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | |
| sz | Size |
Returns: PointF
add(PointF orig, SizeF sizeF)
public static PointF add(PointF orig, SizeF sizeF)
Translates a given PointF by a specified SizeF.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| orig | PointF | The PointF to translate. |
| sizeF | SizeF | The 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:
| Parameter | Type | Description |
|---|---|---|
| pt | PointF | |
| sz | SizeF |
Returns: PointF
isEquals(PointF obj1, PointF obj2)
public static boolean isEquals(PointF obj1, PointF obj2)
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj1 | PointF | |
| obj2 | PointF |
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:
| Parameter | Type | Description |
|---|---|---|
| value | float | the 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:
| Parameter | Type | Description |
|---|---|---|
| value | float | the 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:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object | The 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:
| Parameter | Type | Description |
|---|---|---|
| other | PointF | Other 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:
| Parameter | Type | Description |
|---|---|---|
| that | PointF |
Clone()
public PointF Clone()
Returns: PointF
clone()
public Object clone()
Returns: java.lang.Object