Xui.Runtime.Software.Raster

Assembly: Xui.Runtime.Software · C# declarations · Assembly overview

Types

class RGBABitmap

public unsafe sealed class RGBABitmap : IDisposable
{
    public readonly int Width;
    public readonly int Height;
    public readonly int Stride;
    public RGBA* Pixels { get; }
    public Span<RGBA> Span { get; }
    public Span<Vector<uint>> 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);
    public void InitRect(in Rect rect, RGBA value = 0);
    public void Dispose();
}

RGBABitmap.RGBABitmap(int width, int height)

public RGBABitmap(int width, int height);

void RGBABitmap.Dispose()

public void Dispose();

void RGBABitmap.Fill(uint value = 0)

public void Fill(RGBA value = 0);

void RGBABitmap.FillRect(in Rect rect, uint value)

public void FillRect(in Rect rect, RGBA value);

RGBABitmap.~RGBABitmap()

int RGBABitmap.Height

public readonly int Height;

void RGBABitmap.InitRect(in Rect rect, uint value = 0)

public void InitRect(in Rect rect, RGBA value = 0);

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.

  • rect — The region to initialize.

  • value — The fill color (default is transparent black).

uint RGBABitmap.this[int x, int y]

public RGBA this[int x, int y] { get; set; }

uint* RGBABitmap.Pixels

public RGBA* Pixels { get; }

Span<uint> RGBABitmap.Span

public Span<RGBA> Span { get; }

int RGBABitmap.Stride

public readonly int Stride;

Span<Vector<uint>> RGBABitmap.VectorSpan

public Span<Vector<uint>> VectorSpan { get; }

int RGBABitmap.Width

public readonly int Width;

struct Rect

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);
    public static Rect AlignOutward(Rect rect, int simdWidth);
}

Rect Rect.AlignOutward(Rect rect, int simdWidth)

public static Rect AlignOutward(Rect rect, int simdWidth);

Returns a new rectangle expanded outward and aligned to a SIMD boundary. This is used for conservative region initialization where vectorization is preferred.

  • simdWidth — The number of pixels per vector (e.g., Vector<T>.Count).

uint Rect.Bottom

public uint Bottom;

Rect Rect.Empty

public static readonly Rect Empty;

void Rect.IntersectWith(in Rect other)

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void IntersectWith(in Rect other);

bool Rect.IsEmpty

public bool IsEmpty { get; }

uint Rect.Left

public uint Left;

uint Rect.Right

public uint Right;

uint Rect.Top

public uint Top;

void Rect.UnionWith(in Rect other)

[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void UnionWith(in Rect other);

class StencilBitmap

public unsafe sealed class StencilBitmap : IDisposable
{
    public readonly int Width;
    public readonly int Height;
    public readonly int Stride;
    public G16* Pixels { get; }
    public Span<G16> 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);
    public void InitRect(in Rect rect, G16 value = 0);
    public void Dispose();
}

StencilBitmap.StencilBitmap(int width, int height)

public StencilBitmap(int width, int height);

void StencilBitmap.Dispose()

public void Dispose();

void StencilBitmap.Fill(ushort value = 0)

public void Fill(G16 value = 0);

void StencilBitmap.FillRect(in Rect rect, ushort value)

public void FillRect(in Rect rect, G16 value);

StencilBitmap.~StencilBitmap()

int StencilBitmap.Height

public readonly int Height;

void StencilBitmap.InitRect(in Rect rect, ushort value = 0)

public void InitRect(in Rect rect, G16 value = 0);

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.

  • rect — The region to initialize.

  • value — The fill value (default is 0, meaning no coverage).

ushort StencilBitmap.this[int x, int y]

public G16 this[int x, int y] { get; set; }

ushort* StencilBitmap.Pixels

public G16* Pixels { get; }

Span<ushort> StencilBitmap.Span

public Span<G16> Span { get; }

int StencilBitmap.Stride

public readonly int Stride;

int StencilBitmap.Width

public readonly int Width;