public sealed class UiGeometryBuilderTurns a frame's draw list into the vertices a renderer submits.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The last step that is still the interface's own. Everything below here is a pipeline, a buffer and a scissor; everything above is elements and styles. Being a pure function of a draw list is what lets the whole of it be tested without a device — the same argument the draw list itself makes about being testable without a window.
⚠ Boxes are one quad each, not a tessellated outline. A rounded rectangle and its border are both a signed distance the shader evaluates per pixel, so a corner is exact at any radius and costs four vertices — where tessellating one costs a vertex count that grows with the radius and is still faceted. That is also why the two share a batch kind: one shader draws both, with the thickness deciding whether the inside is filled.
⚠ Clips are resolved here rather than replayed. A draw list pushes and pops; a renderer sets a scissor. Carrying the resolved rectangle on each draw means the renderer never holds a stack, and cannot be caught out by a batch it skipped having left one behind.
Fields and properties (10)
public int CachedPathsHow many distinct paths the tessellation cache is holding.
public IconAtlas? IconsThe icons this builder has drawn from the atlas, or null before it has drawn any.
public int RefusedFieldsHow many of the last frame's field paths the atlas could not take.
public int FieldPathsHow many of the last frame's paths were drawn as four vertices from the atlas.
public int TessellatedPathsHow many of the last frame's paths had to be tessellated rather than re-used.
public int CacheCapacityHow many paths the cache keeps before it drops the ones this frame did not use.
public int DroppedGlyphsHow many glyphs were dropped because the atlas could not hold them.
public bool AtlasChangedWhether the atlas changed while this frame's quads were being emitted.
public float ToleranceHow far a flattened curve may sit from the curve it replaces, in document pixels.
public float FringeHow far a path's antialiasing fringe reaches past its outline, in document pixels.
Methods (1)
public UiGeometry Build(DrawList list, GlyphFieldCache glyphs, Rectangle viewport)Builds the geometry for a frame.
Used by (11)
- UiHostHelloUi
- IconAtlasTestsVixen.Ui.Tests
- NineSliceImageTestsVixen.Ui.Tests
- PathTessellationCacheTestsVixen.Ui.Tests
- UiFrameLifetimeTestsVixen.Graphics.Golden.Tests
- UiGeometryTestsVixen.Ui.Tests
- UiImageTestsVixen.Graphics.Golden.Tests
- UiTestVixen.Ui.Testing
- VideoInUiTestsVixen.Video.Rendering.Tests
- EditorHostVixen.Editor.Host
- EditorPaneVixen.Editor.Host