PointD Struct
Represents a position with sub-pixel precision. The origin is the top-left corner of the stored pixels; Y grows downward. Integer coordinates are pixel boundaries: the pixel (x, y) covers the square from (x, y) to (x + 1, y + 1).
public readonly struct PointD : IEquatable<PointD>- Implements
Constructors
| Name | Description |
|---|---|
| PointD(double, double) | Initializes a new instance of the PointD struct. |
PointD(double, double)
PointD.csProperties
| Name | Description |
|---|---|
| Empty | Gets the point whose coordinates are zero. |
| X | Gets the horizontal coordinate. |
| Y | Gets the vertical coordinate. |
Empty
PointD.csMethods
| Name | Description |
|---|---|
| Add(PointD, PointD) | Adds the coordinates of two points. |
| Deconstruct(double, double) | Deconstructs the point into its coordinates. |
| DistanceTo(PointD) | Gets the distance to another point. |
| Divide(PointD, double) | Divides the coordinates of a point by a divisor. |
| Equals(PointD) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromPoint(Point) | Converts a pixel coordinate to the position of the top-left corner of that pixel. |
| GetHashCode() | Returns the hash code for this instance. |
| Multiply(PointD, double) | Multiplies the coordinates of a point by a factor. |
| Negate(PointD) | Negates the coordinates of a point. |
| Offset(double, double) | Moves the point. |
| Subtract(PointD, PointD) | Subtracts the coordinates of a point from those of another. |
| ToString() | Returns the point formatted as ({X}, {Y}). |
Add(PointD, PointD)
PointD.csDeconstruct(double, double)
PointD.csDistanceTo(PointD)
PointD.csDivide(PointD, double)
PointD.csFromPoint(Point)
PointD.csGetHashCode()
PointD.csMultiply(PointD, double)
PointD.csNegate(PointD)
PointD.csOffset(double, double)
PointD.csSubtract(PointD, PointD)
PointD.csToString()
PointD.csOperators
| Name | Description |
|---|---|
| operator +(PointD, PointD) | Adds the coordinates of two points. |
| operator /(PointD, double) | Divides the coordinates of a point by a divisor. |
| operator ==(PointD, PointD) | Compares two points for equality. |
| implicit operator PointD(Point) | Converts a pixel coordinate to the position of the top-left corner of that pixel. The conversion is lossless. |
| operator !=(PointD, PointD) | Compares two points for inequality. |
| operator *(PointD, double) | Multiplies the coordinates of a point by a factor. |
| operator *(double, PointD) | Multiplies the coordinates of a point by a factor. |
| operator -(PointD, PointD) | Subtracts the coordinates of a point from those of another. |
| operator -(PointD) | Negates the coordinates of a point. |