[]
Structure specifing a point with double X and Y coordinates.
public struct Point2D : IEquatable<Point2D>
Initializes a new instance of the Point2D struct.
public Point2D(Point2F p)
p
Point2FInitializes a new instance of the Point2D struct.
public Point2D(double x, double y)
Initializes a new instance of the Point2D struct.
public Point2D(PointF p)
p
PointFAn empty point.
public static readonly Point2D Empty
The size of the Point2D type, in bytes.
public const int SizeInBytes = 16
The X coordinate of the point.
public double X
The Y coordinate of the point.
public double Y
Determines if all components of Point2D are equal to zero.
public bool IsEmpty { get; }
Gets the distance to the given point.
public double Distance(Point2D pt)
pt
Point2DGets the square of the distance to the given point.
public double DistanceSquared(Point2D pt)
pt
Point2DIndicates whether this instance and a specified object are equal.
public bool Equals(Point2D other)
other
Point2DIndicates 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 Point2D FromDips(Point2D pt, float dpiX, float dpiY)
Converts a point from DIPs to pixels.
public void FromDips(float dpiX, float dpiY)
Returns a hash code for this instance.
public override int GetHashCode()
Offsets the point by the specified amount.
public void Offset(Point2D pt)
pt
Point2DOffsets the point by the specified amount.
public static Point2D Offset(Point2D point1, Point2D point2)
Offsets the point by the specified amount.
public static Point2D Offset(Point2D pt, Size2D sz)
Offsets the point by the specified amount.
public static Point2D Offset(Point2D pt, double dx, double dy)
Offsets the point by the specified amount.
public void Offset(Size2D sz)
sz
Size2DOffsets the point by the specified amount.
public void Offset(double dx, double dy)
Returns a Point2L with rounded X and Y coordinates.
public Point2L Round()
Scales X and Y coordinates of a point by the specified scaleFactor.
public static Point2D Scale(Point2D pt, double scaleFactor)
Scales X and Y coordinates of a point by the specified scaleX and scaleY.
public static Point2D Scale(Point2D pt, double scaleX, double scaleY)
Scales X and Y coordinates of a point by the specified scaleFactor.
public void Scale(double scaleFactor)
scaleFactor
doubleScales X and Y coordinates of a point by the specified scaleX and scaleY.
public void Scale(double scaleX, double scaleY)
Converts a point from pixels to DIPs.
public static Point2D ToDips(Point2D pt, float dpiX, float dpiY)
Converts a point from pixels to DIPs.
public void ToDips(float dpiX, float dpiY)
public Point2F ToPoint2F()
public PointF ToPointF()
Returns a string that represents the current object.
public override string ToString()
Returns a Point2L with truncated X and Y coordinates.
public Point2L Truncate()
Returns the result of addition of point2 to point1.
public static Point2D operator +(Point2D point1, Point2D point2)
Returns the result of addition of size to point.
public static Point2D operator +(Point2D p, Size2D sz)
Determines if the specified values are equal.
public static bool operator ==(Point2D left, Point2D right)
Determines if the specified values are not equal.
public static bool operator !=(Point2D left, Point2D right)
Returns the result of substruction of point2 from point1.
public static Point2D operator -(Point2D point1, Point2D point2)
Returns the result of substruction of size from point.
public static Point2D operator -(Point2D point, Size2D sz)