PixelPoint Struct
Definition
Represents a point in device pixels.
public struct PixelPoint
Constructors
| Name | Description |
|---|---|
| PixelPoint | Initializes a new instance of the Avalonia.PixelPoint structure. |
PixelPoint Constructor
Initializes a new instance of the Avalonia.PixelPoint structure.
public PixelPoint(int x, int y)
Parameters
x int
The X co-ordinate.
y int
The Y co-ordinate.
Methods
| Name | Description |
|---|---|
| Equals (2 overloads) | Returns a boolean indicating whether the point is equal to the other given point. |
| FromPoint (2 overloads) | Converts a Avalonia.Point to device pixels using the specified scaling factor. |
| FromPointWithDpi (2 overloads) | Converts a Avalonia.Point to device pixels using the specified dots per inch (DPI). |
| GetHashCode | Returns a hash code for a Avalonia.PixelPoint. |
| Parse | Parses a Avalonia.PixelPoint string. |
| ToPoint (2 overloads) | Converts the Avalonia.PixelPoint to a device-independent Avalonia.Point using the specified scaling factor. |
| ToPointWithDpi (2 overloads) | Converts the Avalonia.PixelPoint to a device-independent Avalonia.Point using the specified dots per inch (DPI). |
| ToString | Returns the string representation of the point. |
| WithX | Returns a new Avalonia.PixelPoint with the same Y co-ordinate and the specified X co-ordinate. |
| WithY | Returns a new Avalonia.PixelPoint with the same X co-ordinate and the specified Y co-ordinate. |
Equals overloads
Equals Method
Returns a boolean indicating whether the point is equal to the other given point.
public bool Equals(Avalonia.PixelPoint other)
Parameters
other Avalonia.PixelPoint
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.
FromPoint overloads
FromPoint Method
Converts a Avalonia.Point to device pixels using the specified scaling factor.
public Avalonia.PixelPoint FromPoint(Avalonia.Point point, Avalonia.Vector scale)
Parameters
point Avalonia.Point
The point.
scale Avalonia.Vector
The scaling factor.
Returns
The device-independent point.
FromPoint Method
Converts a Avalonia.Point to device pixels using the specified scaling factor.
public Avalonia.PixelPoint FromPoint(Avalonia.Point point, double scale)
Parameters
point Avalonia.Point
The point.
scale double
The scaling factor.
Returns
The device-independent point.
FromPointWithDpi overloads
FromPointWithDpi Method
Converts a Avalonia.Point to device pixels using the specified dots per inch (DPI).
public Avalonia.PixelPoint FromPointWithDpi(Avalonia.Point point, Avalonia.Vector dpi)
Parameters
point Avalonia.Point
The point.
dpi Avalonia.Vector
The dots per inch of the device.
Returns
The device-independent point.
FromPointWithDpi Method
Converts a Avalonia.Point to device pixels using the specified dots per inch (DPI).
public Avalonia.PixelPoint FromPointWithDpi(Avalonia.Point point, double dpi)