Struct PointF
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
Constructors
PointF(float, float)
Initializes a new instance of the PointF structure with the specified coordinates.
public PointF(float x, float y)
Parameters
Properties
Empty
public static PointF Empty { get; }
Property Value
IsEmpty
Gets a value indicating whether this PointF is empty.
public bool IsEmpty { get; }
Property Value
X
Gets or sets the x-coordinate of this PointF.
public float X { get; set; }
Property Value
Y
Gets or sets the y-coordinate of this PointF.
public float Y { get; set; }
Property Value
Methods
Add(PointF, Size)
public static PointF Add(PointF point, Size size)
Parameters
point
PointFThe PointF to translate.
size
SizeThe Size that specifies the numbers to add to the coordinates of
point
.
Returns
Add(PointF, SizeF)
public static PointF Add(PointF point, SizeF size)
Parameters
point
PointFThe PointF to translate.
size
SizeFThe SizeF that specifies the numbers to add to the coordinates of
point
.
Returns
Equals(object)
public override bool Equals(object obj)
Parameters
Returns
GetHashCode()
Returns a hash code for this PointF structure.
public override int GetHashCode()
Returns
Subtract(PointF, Size)
Translates a PointF by the negative of a specified size.
public static PointF Subtract(PointF point, Size size)
Parameters
point
PointFThe PointF to translate.
size
SizeThe Size that specifies the numbers to subtract from the coordinates of
point
.
Returns
Subtract(PointF, SizeF)
Translates a PointF by the negative of a specified size.
public static PointF Subtract(PointF point, SizeF size)
Parameters
point
PointFThe PointF to translate.
size
SizeFThe SizeF that specifies the numbers to subtract from the coordinates of
point
.
Returns
ToString()
Converts this PointF to a human readable string.
public override string ToString()
Returns
Operators
operator +(PointF, Size)
public static PointF operator +(PointF point, Size size)
Parameters
point
PointFThe PointF to translate.
size
SizeA Size that specifies the pair of numbers to add to the coordinates of
point
.
Returns
operator +(PointF, SizeF)
public static PointF operator +(PointF point, SizeF size)
Parameters
point
PointFThe PointF to translate.
size
SizeFThe SizeF that specifies the numbers to add to the x- and y-coordinates of the
point
.
Returns
operator ==(PointF, PointF)
Compares two PointF structures. The result specifies whether the values of the X and Y properties of the two PointF structures are equal.
public static bool operator ==(PointF point1, PointF point2)
Parameters
Returns
- bool
True if the X and Y values of the first and second 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
Returns
operator -(PointF, Size)
public static PointF operator -(PointF point, Size size)
Parameters
point
PointFA PointF to translate.
size
SizeA Size that specifies the numbers to subtract from the x- and y-coordinates of the
point
.
Returns
operator -(PointF, SizeF)
public static PointF operator -(PointF point, SizeF size)
Parameters
point
PointFThe PointF to translate.
size
SizeFThe SizeF that specifies the numbers to subtract from the coordinates of
point
.