[]
Structure specifing a point with float X and Y coordinates.
public struct Point2F : IEquatable<Point2F>
Initializes a new instance of the Point2F struct.
public Point2F(Point2D p)
p
Point2DInitializes a new instance of the Point2F struct.
public Point2F(Point2L p)
p
Point2LInitializes a new instance of the Point2F struct.
public Point2F(PointF p)
p
System.Drawing.PointFInitializes a new instance of the Point2F struct.
public Point2F(float x, float y)
x
floaty
floatAn empty point.
public static readonly Point2F Empty
The size of the Point2F type, in bytes.
public const int SizeInBytes = 8
The X coordinate of the point.
public float X
The Y coordinate of the point.
public float Y
Determines if all components of Point2F are equal to zero.
public bool IsEmpty { get; }
Gets the distance to the given point.
public float Distance(Point2F pt)
pt
Point2FGets the square of the distance to the given point.
public float DistanceSquared(Point2F pt)
pt
Point2FIndicates whether this instance and a specified object are equal.
public bool Equals(Point2F other)
other
Point2FIndicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
obj
objectConverts a point from DIPs to pixels.
public static Point2F FromDips(Point2F pt, float dpiX, float dpiY)
pt
Point2FdpiX
floatdpiY
floatConverts a point from DIPs to pixels.
public void FromDips(float dpiX, float dpiY)
dpiX
floatdpiY
floatReturns a hash code for this instance.
public override int GetHashCode()
Offsets the point by the specified amount.
public static Point2F Offset(Point2F point1, Point2F point2)
Offsets the point by the specified amount.
public static Point2F Offset(Point2F pt, Size2F sz)
Offsets the point by the specified amount.
public static Point2F Offset(Point2F pt, Vector2 offset)
Offsets the point by the specified amount.
public static Point2F Offset(Point2F pt, float dx, float dy)
pt
Point2Fdx
floatdy
floatOffsets the point by the specified amount.
public void Offset(Point2F pt)
pt
Point2FOffsets the point by the specified amount.
public void Offset(Size2F sz)
sz
Size2FOffsets the point by the specified amount.
public void Offset(Vector2 vector)
vector
Vector2Offsets the point by the specified amount.
public void Offset(float dx, float dy)
dx
floatdy
floatReturns a Point2L with rounded X and Y coordinates.
public Point2L Round()
Scales X and Y coordinates of a point by the specified scaleX and scaleY.
public static Point2F Scale(Point2F pt, float scaleX, float scaleY)
pt
Point2FscaleX
floatscaleY
floatScales X and Y coordinates of a point by the specified scaleFactor.
public static Point2F Scale(Point2F pt, float scaleFactor)
pt
Point2FscaleFactor
floatScales X and Y coordinates of a point by the specified scaleX and scaleY.
public void Scale(float scaleX, float scaleY)
scaleX
floatscaleY
floatScales X and Y coordinates of a point by the specified scaleFactor.
public void Scale(float scaleFactor)
scaleFactor
floatConverts a point from pixels to DIPs.
public static Point2F ToDips(Point2F pt, float dpiX, float dpiY)
pt
Point2FdpiX
floatdpiY
floatConverts a point from pixels to DIPs.
public void ToDips(float dpiX, float dpiY)
dpiX
floatdpiY
floatpublic Point2D ToPoint2D()
Converts Point2F to System.Drawing.PointF.
public PointF ToPointF()
Returns a string that represents the current object.
public override string ToString()
Transforms a point by the 3x2 matrix.
public void Transform(in Matrix3x2 matrix)
matrix
Matrix3x2The matrix to use as a tranformation matrix.
Transforms a point by the 3x2 matrix.
public static Point2F Transform(Point2F point, in Matrix3x2 matrix)
point
Point2FThe original point to apply the transformation.
matrix
Matrix3x2The matrix to use as a tranformation matrix.
The result of the transformation for the input point.
Returns a Point2L with truncated X and Y coordinates.
public Point2L Truncate()
Returns the result of addition of point2 to point1.
public static Point2F operator +(Point2F point1, Point2F point2)
Returns the result of addition of size to point.
public static Point2F operator +(Point2F p, Size2F sz)
Returns the result of addition of the given offset to the specified point.
public static Point2F operator +(Point2F pt, Vector2 offset)
Determines if the specified values are equal.
public static bool operator ==(Point2F left, Point2F right)
public static explicit operator Vector2(Point2F value)
value
Point2FPerforms an explicit conversion from Point2F to System.Drawing.PointF.
public static explicit operator PointF(Point2F value)
value
Point2Fpublic static explicit operator Point2F(Vector2 v)
v
Vector2Performs an explicit conversion from System.Drawing.PointF to Point2F.
public static explicit operator Point2F(PointF p)
p
System.Drawing.PointFDetermines if the specified values are not equal.
public static bool operator !=(Point2F left, Point2F right)
Returns the result of substruction of point2 from point1.
public static Point2F operator -(Point2F point1, Point2F point2)
Returns the result of substruction of size from point.
public static Point2F operator -(Point2F point, Size2F sz)
Returns the result of substruction of the given vector from point.
public static Point2F operator -(Point2F point, Vector2 vector)