using Avalonia; using SkiaSharp; namespace Artemis.UI.Shared.Extensions; /// /// Provides utility methods when working with SkiaSharp rectangles. /// public static class SKRectExtensions { /// /// Converts the rectangle to an Avalonia . /// /// The rectangle to convert. /// The resulting Avalonia . public static Rect ToRect(this SKRect rect) { return new Rect(rect.Left, rect.Top, rect.Width, rect.Height); } /// /// Converts the integer rectangle to an Avalonia . /// /// The integer rectangle to convert. /// The resulting Avalonia . public static Rect ToRect(this SKRectI rect) { return new Rect(rect.Left, rect.Top, rect.Width, rect.Height); } }