Point Struct
Definition
Defines a point.
public struct Point
Constructors
| Name | Description |
|---|---|
| Point | Initializes a new instance of the Avalonia.Point structure. |
Point Constructor
Initializes a new instance of the Avalonia.Point structure.
public Point(double x, double y)
Parameters
x double
The X position.
y double
The Y position.
Methods
| Name | Description |
|---|---|
| Deconstruct | No summary available. |
| Distance | Computes the Euclidean distance between the two given points. |
| Equals (2 overloads) | Returns a boolean indicating whether the point is equal to the other given point (bitwise). |
| GetHashCode | Returns a hash code for a Avalonia.Point. |
| NearlyEquals | Returns a boolean indicating whether the point is equal to the other given point (numerically). |
| Parse | Parses a Avalonia.Point string. |
| ToString | Returns the string representation of the point. |
| Transform | Transforms the point by a matrix. |
| WithX | Returns a new point with the specified X coordinate. |
| WithY | Returns a new point with the specified Y coordinate. |
Deconstruct Method
public void Deconstruct(double& x, double& y)
Parameters
x double&
y double&
Distance Method
Computes the Euclidean distance between the two given points.
public double Distance(Avalonia.Point value1, Avalonia.Point value2)
Parameters
value1 Avalonia.Point
The first point.
value2 Avalonia.Point
The second point.
Returns
double
The Euclidean distance.
Equals overloads
Equals Method
Returns a boolean indicating whether the point is equal to the other given point (bitwise).
public bool Equals(Avalonia.Point other)
Parameters
other Avalonia.Point
The other point to test equality against.
Returns
bool
True if this point is equal to other; False otherwise.
Equals Method
Checks for equality between a point and an object.
public bool Equals(object obj)
Parameters
obj object
The object.
Returns
bool
True if obj is a point that equals the current point.
GetHashCode Method
Returns a hash code for a Avalonia.Point.
public int GetHashCode()
Returns
int
The hash code.
NearlyEquals Method
Returns a boolean indicating whether the point is equal to the other given point (numerically).
public bool NearlyEquals(Avalonia.Point other)
Parameters
other Avalonia.Point
The other point to test equality against.
Returns
bool
True if this point is equal to other; False otherwise.
Parse Method
Parses a Avalonia.Point string.
public Avalonia.Point Parse(string s)
Parameters
s string
The string.
Returns
The Avalonia.Point.
ToString Method
Returns the string representation of the point.
public string ToString()
Returns
string
The string representation of the point.
Transform Method
Transforms the point by a matrix.
public Avalonia.Point Transform(Avalonia.Matrix transform)
Parameters
transform Avalonia.Matrix
The transform.
Returns
The transformed point.
WithX Method
Returns a new point with the specified X coordinate.
public Avalonia.Point WithX(double x)
Parameters
x double
The X coordinate.
Returns
The new point.
WithY Method
Returns a new point with the specified Y coordinate.
public Avalonia.Point WithY(double y)
Parameters
y double
The Y coordinate.
Returns
The new point.
Properties
X Property
Gets the X position.
public double X { get; set; }
Y Property
Gets the Y position.
public double Y { get; set; }