Struct PointF
Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.2.0)
Represents an ordered pair of floating-point x- and y-coordinates that defines a point in a two-dimensional plane.
public struct PointF
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
PointF(float, float)
Initializes a new instance of the Aspose.Imaging.PointF structure with the specified coordinates.
public PointF(float x, float y)
Parameters
x
float
The horizontal position of the point.
y
float
The vertical position of the point.
Properties
Empty
Gets a new instance of the Aspose.Imaging.PointF structure that has Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values set to zero.
public static PointF Empty { get; }
Property Value
IsEmpty
Gets a value indicating whether this Aspose.Imaging.PointF is empty.
[JsonIgnore]
public bool IsEmpty { get; }
Property Value
X
Gets or sets the x-coordinate of this Aspose.Imaging.PointF.
public float X { get; set; }
Property Value
Y
Gets or sets the y-coordinate of this Aspose.Imaging.PointF.
public float Y { get; set; }
Property Value
Methods
Add(PointF, Size)
Translates a given Aspose.Imaging.PointF by the specified Aspose.Imaging.Size.
public static PointF Add(PointF point, Size size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
Size
The Aspose.Imaging.Size that specifies the numbers to add to the coordinates of point
.
Returns
The translated Aspose.Imaging.PointF.
Add(PointF, SizeF)
Translates a given Aspose.Imaging.PointF by a specified Aspose.Imaging.SizeF.
public static PointF Add(PointF point, SizeF size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
SizeF
The Aspose.Imaging.SizeF that specifies the numbers to add to the coordinates of point
.
Returns
The translated Aspose.Imaging.PointF.
Equals(object)
Specifies whether this Aspose.Imaging.PointF contains the same coordinates as the specified System.Object.
public override bool Equals(object obj)
Parameters
obj
object
The System.Object to test.
Returns
This method returns true if obj
is a Aspose.Imaging.PointF and has the same coordinates as this Aspose.Imaging.Point.
GetHashCode()
Returns a hash code for this Aspose.Imaging.PointF structure.
public override int GetHashCode()
Returns
An integer value that specifies a hash value for this Aspose.Imaging.PointF structure.
Subtract(PointF, Size)
Translates a Aspose.Imaging.PointF by the negative of a specified size.
public static PointF Subtract(PointF point, Size size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
Size
The Aspose.Imaging.Size that specifies the numbers to subtract from the coordinates of point
.
Returns
The translated Aspose.Imaging.PointF.
Subtract(PointF, SizeF)
Translates a Aspose.Imaging.PointF by the negative of a specified size.
public static PointF Subtract(PointF point, SizeF size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
SizeF
The Aspose.Imaging.SizeF that specifies the numbers to subtract from the coordinates of point
.
Returns
The translated Aspose.Imaging.PointF.
ToString()
Converts this Aspose.Imaging.PointF to a human readable string.
public override string ToString()
Returns
A string that represents this Aspose.Imaging.PointF.
Operators
operator +(PointF, Size)
Translates a Aspose.Imaging.PointF by a given Aspose.Imaging.Size.
public static PointF operator +(PointF point, Size size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
Size
A Aspose.Imaging.Size that specifies the pair of numbers to add to the coordinates of point
.
Returns
Returns the translated Aspose.Imaging.PointF.
operator +(PointF, SizeF)
Translates the Aspose.Imaging.PointF by the specified Aspose.Imaging.SizeF.
public static PointF operator +(PointF point, SizeF size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
SizeF
The Aspose.Imaging.SizeF that specifies the numbers to add to the x- and y-coordinates of the point
.
Returns
The translated Aspose.Imaging.PointF.
operator ==(PointF, PointF)
Compares two Aspose.Imaging.PointF structures. The result specifies whether the values of the Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y properties of the two Aspose.Imaging.PointF structures are equal.
public static bool operator ==(PointF point1, PointF point2)
Parameters
point1
PointF
A first Aspose.Imaging.PointF to compare.
point2
PointF
A second Aspose.Imaging.PointF to compare.
Returns
True if the Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values of the first and second Aspose.Imaging.PointF structures are equal; otherwise, false.
operator !=(PointF, PointF)
Determines whether the coordinates of the specified points are not equal.
public static bool operator !=(PointF point1, PointF point2)
Parameters
point1
PointF
A first Aspose.Imaging.PointF to compare.
point2
PointF
A second Aspose.Imaging.PointF to compare.
Returns
True to indicate the Aspose.Imaging.PointF.X and Aspose.Imaging.PointF.Y values of point1
and point2
are not equal; otherwise, false.
operator -(PointF, Size)
Translates a Aspose.Imaging.PointF by the negative of a given Aspose.Imaging.Size.
public static PointF operator -(PointF point, Size size)
Parameters
point
PointF
A Aspose.Imaging.PointF to translate.
size
Size
A Aspose.Imaging.Size that specifies the numbers to subtract from the x- and y-coordinates of the point
.
Returns
The translated Aspose.Imaging.PointF.
operator -(PointF, SizeF)
Translates a Aspose.Imaging.PointF by the negative of a specified Aspose.Imaging.SizeF.
public static PointF operator -(PointF point, SizeF size)
Parameters
point
PointF
The Aspose.Imaging.PointF to translate.
size
SizeF
The Aspose.Imaging.SizeF that specifies the numbers to subtract from the coordinates of point
.
Returns
The translated Aspose.Imaging.PointF.