PixelRect Structure
Represents a rectangle in device pixels.
Definition
Namespace: Avalonia
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public readonly struct PixelRect : IEquatable<PixelRect>
Public Structure PixelRect
Implements IEquatable(Of PixelRect)
[<SealedAttribute>]
type PixelRect =
struct
inherit ValueType
interface IEquatable<PixelRect>
end
| Inheritance | Object → ValueType → PixelRect |
| Implements | IEquatable(PixelRect) |
Constructors
| PixelRect(PixelSize) | Initializes a new instance of the PixelRect structure. |
| PixelRect(PixelPoint, PixelPoint) | Initializes a new instance of the PixelRect structure. |
| PixelRect(PixelPoint, PixelSize) | Initializes a new instance of the PixelRect structure. |
| PixelRect(Int32, Int32, Int32, Int32) | Initializes a new instance of the PixelRect structure. |
Properties
| Bottom | Gets the bottom position of the rectangle. |
| BottomLeft | Gets the bottom left point of the rectangle. |
| BottomRight | Gets the bottom right point of the rectangle. |
| Center | Gets the center point of the rectangle. |
| Height | Gets the height. |
| Position | Gets the position of the rectangle. |
| Right | Gets the right position of the rectangle. |
| Size | Gets the size of the rectangle. |
| TopLeft | Gets the top left point of the rectangle. |
| TopRight | Gets the top right point of the rectangle. |
| Width | Gets the width. |
| X | Gets the X position. |
| Y | Gets the Y position. |
Methods
| CenterRect(PixelRect) | Centers another rectangle in this rectangle. |
| Contains(PixelPoint) | Determines whether a point in the bounds of the rectangle. |
| Contains(PixelRect) | Determines whether the rectangle fully contains another rectangle. |
| ContainsExclusive(PixelPoint) | Determines whether a point is in the bounds of the rectangle, exclusive of the rectangle's bottom/right edge. |
| Equals(Object) | Returns a boolean indicating whether the given object is equal to this rectangle. (Overrides ValueType.Equals(Object)) |
| Equals(PixelRect) | Returns a boolean indicating whether the rect is equal to the other given rect. |
| FromRect(Rect, Vector) | Converts a Rect to device pixels using the specified scaling factor. |
| FromRect(Rect, Double) | Converts a Rect to device pixels using the specified scaling factor. |
| FromRectWithDpi(Rect, Vector) | Converts a Rect to device pixels using the specified dots per inch (DPI). |
| FromRectWithDpi(Rect, Double) | Converts a Rect to device pixels using the specified dots per inch (DPI). |
| GetHashCode() | Returns the hash code for this instance. (Overrides ValueType.GetHashCode()) |
| GetType() | Gets the Type of the current instance. (Inherited from Object) |
| Intersect(PixelRect) | Gets the intersection of two rectangles. |
| Intersects(PixelRect) | Determines whether a rectangle intersects with this rectangle. |
| Parse(String) | Parses a PixelRect string. |
| ToRect(Double) | Converts the PixelRect to a device-independent Rect using the specified scaling factor. |
| ToRect(Vector) | Converts the PixelRect to a device-independent Rect using the specified scaling factor. |
| ToRectWithDpi(Double) | Converts the PixelRect to a device-independent Rect using the specified dots per inch (DPI). |
| ToRectWithDpi(Vector) | Converts the PixelRect to a device-independent Rect using the specified dots per inch (DPI). |
| ToString() | Returns the string representation of the rectangle. (Overrides ValueType.ToString()) |
| Translate(PixelVector) | Translates the rectangle by an offset. |
| Union(PixelRect) | Gets the union of two rectangles. |
| WithHeight(Int32) | Returns a new PixelRect with the specified height. |
| WithWidth(Int32) | Returns a new PixelRect with the specified width. |
| WithX(Int32) | Returns a new PixelRect with the specified X position. |
| WithY(Int32) | Returns a new PixelRect with the specified Y position. |
Operators
| Equality(PixelRect, PixelRect) | Checks for equality between two PixelRects. |
| Inequality(PixelRect, PixelRect) | Checks for inequality between two PixelRects. |
Extension Methods
| ToSKRectI() | (Defined by SkiaSharpExtensions) |