Table of Contents

Struct Rect<T>

Namespace
SkiaSharp.Extended
Assembly
SkiaSharp.Extended.dll

A lightweight, axis-aligned rectangle defined by position and size. Replaces the former SKImagePyramidRectI (int) and SKImagePyramidRectF (float) domain-specific types and the (double X, double Y, double Width, double Height) tuples that previously appeared throughout the ImagePyramid pipeline.

public readonly struct Rect<T> : IEquatable<Rect<T>> where T : struct

Type Parameters

T

Numeric element type (e.g. int, float, double).

Implements
Inherited Members

Remarks

Computed edges (Right / Bottom) are intentionally absent from this struct to maintain netstandard2.0 compatibility without requiring the .NET 7+ System.Numerics.INumber<T> constraint. Compute them inline:

float right  = rect.X + rect.Width;
float bottom = rect.Y + rect.Height;

Constructors

Rect(T, T, T, T)

A lightweight, axis-aligned rectangle defined by position and size. Replaces the former SKImagePyramidRectI (int) and SKImagePyramidRectF (float) domain-specific types and the (double X, double Y, double Width, double Height) tuples that previously appeared throughout the ImagePyramid pipeline.

Properties

Height
Width
X
Y

Methods

Deconstruct(out T, out T, out T, out T)
Equals(Rect<T>)
Equals(object)
GetHashCode()
ToString()

Operators

operator ==(Rect<T>, Rect<T>)
operator !=(Rect<T>, Rect<T>)