Class PointF
Represents an ordered pair of x and y coordinates that define a point in a two-dimensional plane.
Inheritance
System.Object
PointF
Assembly: Terminal.Gui.dll
Syntax
public sealed class PointF : ValueType
Constructors
PointF(Single, Single)
Initializes a new instance of the
PointF class with the specified coordinates.
Declaration
public PointF(float x, float y)
Parameters
Type |
Name |
Description |
System.Single |
x |
|
System.Single |
y |
|
Fields
Empty
Creates a new instance of the
PointF class with member data left uninitialized.
Declaration
public static readonly PointF Empty
Field Value
Properties
IsEmpty
Gets a value indicating whether this
PointF is empty.
Declaration
public bool IsEmpty { get; }
Property Value
Type |
Description |
System.Boolean |
|
X
Gets the x-coordinate of this
PointF.
Declaration
public float X { get; set; }
Property Value
Type |
Description |
System.Single |
|
Y
Gets the y-coordinate of this
PointF.
Declaration
public float Y { get; set; }
Property Value
Type |
Description |
System.Single |
|
Methods
Add(PointF, Size)
Declaration
public static PointF Add(PointF pt, Size sz)
Parameters
Returns
Add(PointF, SizeF)
Declaration
public static PointF Add(PointF pt, SizeF sz)
Parameters
Returns
Equals(Object)
Compares two
PointF objects. The result specifies whether the values of the
X and
Y properties of the two
PointF objects are equal.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
System.Object |
obj |
|
Returns
Type |
Description |
System.Boolean |
|
Equals(PointF)
Compares two
PointF objects. The result specifies whether the values of the
X and
Y properties of the two
PointF objects are equal.
Declaration
public bool Equals(PointF other)
Parameters
Type |
Name |
Description |
PointF |
other |
|
Returns
Type |
Description |
System.Boolean |
|
GetHashCode()
Generates a hashcode from the X and Y components
Declaration
public override int GetHashCode()
Returns
Type |
Description |
System.Int32 |
|
Subtract(PointF, Size)
Translates a
PointF by the negative of a given
Size .
Declaration
public static PointF Subtract(PointF pt, Size sz)
Parameters
Returns
Subtract(PointF, SizeF)
Declaration
public static PointF Subtract(PointF pt, SizeF sz)
Parameters
Returns
ToString()
Returns a string including the X and Y values
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Operators
Addition(PointF, Size)
Declaration
public static PointF operator +(PointF pt, Size sz)
Parameters
Returns
Addition(PointF, SizeF)
Declaration
public static PointF operator +(PointF pt, SizeF sz)
Parameters
Returns
Equality(PointF, PointF)
Compares two
PointF objects. The result specifies whether the values of the
X and
Y properties of the two
PointF objects are equal.
Declaration
public static bool operator ==(PointF left, PointF right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Inequality(PointF, PointF)
Compares two
PointF objects. The result specifies whether the values of the
X or
Y properties of the two
PointF objects are unequal.
Declaration
public static bool operator !=(PointF left, PointF right)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Subtraction(PointF, Size)
Translates a
PointF by the negative of a given
Size .
Declaration
public static PointF operator -(PointF pt, Size sz)
Parameters
Returns
Subtraction(PointF, SizeF)
Declaration
public static PointF operator -(PointF pt, SizeF sz)
Parameters
Returns
Implements
System.IEquatable<>