PixelVector Struct
Definition
Defines a vector.
public struct PixelVector
Constructors
| Name | Description |
|---|---|
| PixelVector | Initializes a new instance of the Avalonia.PixelVector structure. |
PixelVector Constructor
Initializes a new instance of the Avalonia.PixelVector structure.
public PixelVector(int x, int y)
Parameters
x int
The X vector.
y int
The Y vector.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | Check if two vectors are equal (bitwise). |
| GetHashCode | No summary available. |
| NearlyEquals | Check if two vectors are nearly equal (numerically). |
| ToString | Returns the string representation of the point. |
| WithX | Returns a new vector with the specified X coordinate. |
| WithY | Returns a new vector with the specified Y coordinate. |
Equals overloads
Equals Method
Check if two vectors are equal (bitwise).
public bool Equals(Avalonia.PixelVector other)
Parameters
other Avalonia.PixelVector
Returns
bool
Equals Method
public bool Equals(object obj)
Parameters
obj object
Returns
bool
GetHashCode Method
public int GetHashCode()
Returns
int
NearlyEquals Method
Check if two vectors are nearly equal (numerically).
public bool NearlyEquals(Avalonia.PixelVector other)
Parameters
other Avalonia.PixelVector
The other vector.
Returns
bool
True if vectors are nearly equal.
ToString Method
Returns the string representation of the point.
public string ToString()
Returns
string
The string representation of the point.
WithX Method
Returns a new vector with the specified X coordinate.
public Avalonia.PixelVector WithX(int x)
Parameters
x int
The X coordinate.
Returns
The new vector.
WithY Method
Returns a new vector with the specified Y coordinate.
public Avalonia.PixelVector WithY(int y)
Parameters
y int
The Y coordinate.
Returns
The new vector.
Properties
Length Property
Length of the vector
public double Length { get; set; }
X Property
Gets the X vector.
public int X { get; set; }
Y Property
Gets the Y vector.
public int Y { get; set; }