// Generated API outline. Implementation bodies omitted. #nullable enable using G16 = ushort; using RGBA = uint; using System.ComponentModel; using System.Diagnostics; using nfloat = System.Runtime.InteropServices.NFloat; namespace Xui.Runtime.Software.Raster { using System.Numerics; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System; public unsafe sealed class RGBABitmap : IDisposable { public readonly int Width; public readonly int Height; public readonly int Stride; public RGBA* Pixels { get; } public Span Span { get; } public Span> VectorSpan { get; } public RGBABitmap(int width, int height); public RGBA this[int x, int y] { get; set; } public void Fill(RGBA value = 0); public void FillRect(in Rect rect, RGBA value); /// /// Initializes a rectangular region of the bitmap using SIMD, aligned outward to the nearest vector boundary. /// This method may overdraw slightly beyond the specified rectangle for performance. /// Suitable for fast clearing of bounds when rendering shapes or tiles. /// /// The region to initialize. /// The fill color (default is transparent black). public void InitRect(in Rect rect, RGBA value = 0); public void Dispose(); } public unsafe sealed class StencilBitmap : IDisposable { public readonly int Width; public readonly int Height; public readonly int Stride; public G16* Pixels { get; } public Span Span { get; } public StencilBitmap(int width, int height); public G16 this[int x, int y] { get; set; } public void Fill(G16 value = 0); public void FillRect(in Rect rect, G16 value); /// /// Initializes a rectangular region of the stencil buffer using SIMD, aligned outward to the nearest vector boundary. /// This method may overdraw slightly beyond the specified rectangle for performance. /// Suitable for fast clearing of bounds when preparing coverage masks. /// /// The region to initialize. /// The fill value (default is 0, meaning no coverage). public void InitRect(in Rect rect, G16 value = 0); public void Dispose(); } } namespace Xui.Runtime.Software.Raster { using System.Runtime.CompilerServices; using System; public struct Rect { public uint Left; public uint Top; public uint Right; public uint Bottom; public static readonly Rect Empty; public bool IsEmpty { get; } [MethodImpl(MethodImplOptions.AggressiveInlining)] public void UnionWith(in Rect other); [MethodImpl(MethodImplOptions.AggressiveInlining)] public void IntersectWith(in Rect other); /// /// Returns a new rectangle expanded outward and aligned to a SIMD boundary. /// This is used for conservative region initialization where vectorization is preferred. /// /// The number of pixels per vector (e.g., Vector<T>.Count). public static Rect AlignOutward(Rect rect, int simdWidth); } }