Vixen
02b45cc4
csharp
public readonly record struct DistanceFieldBitmap

A glyph as three signed distances per pixel, row 0 at the top.

No guide page documents this yet — the page shows what the code says about itself.

Fields and properties (5)

  • public int Width

    How many pixels across.

  • public int Height

    How many pixels down.

  • public float Range

    The distance, in pixels, that maps to the full [0, 1] span.

  • public float[] Channels

    Row-major, three floats per pixel, each in [0, 1] with 0.5 on the edge.

  • public (float R, float G, float B) this[int x, int y]

    The three channels at a pixel.

Methods (2)

  • public DistanceFieldBitmap(int Width, int Height, float Range, float[] Channels)

    A glyph as three signed distances per pixel, row 0 at the top.

  • public float Median(int x, int y)

    What a shader reconstructs: the median of the three, above 0.5 inside the glyph.

Used by (7)

  • DistanceFieldVixen.Ui.Text
  • DistanceFieldTestsVixen.Ui.Text.Tests
  • EntryVixen.Ui.Text
  • GlyphAtlasVixen.Ui.Text
  • GlyphAtlasTestsVixen.Ui.Text.Tests
  • GlyphFieldCacheVixen.Ui.Text
  • IconAtlasVixen.Ui