Vixen
02b45cc4
csharp
public sealed class PathBuilder

Builds a path out of lines and curves.

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

Remarks

⚠ Curves are kept as curves. Nothing here flattens a Bézier into line segments, and that is deliberate: how finely to flatten depends on how large the curve will be on screen, which is a device scale this does not know. Flattened here, a path built once and drawn at two zoom levels is faceted at one of them or over-tessellated at the other, and nothing downstream can recover the curve to do better.

Owned by the caller and reusable — Clear keeps the capacity. A control that draws every frame should keep one in a field rather than making a new one, for the same reason any other per-frame allocation is worth avoiding.

Fields and properties (3)

  • public IReadOnlyList<PathSegment> Segments

    The steps, in order.

  • public int Count

    How many steps it has.

  • public Vector2 Current

    Where the pen is.

Methods (8)

Used by (50, showing 40)

  • ControlIconsVixen.Ui.Controls
  • CurveEditorVixen.Ui.Controls.Advanced
  • DrawContextVixen.Ui
  • DrawListVixen.Ui
  • IconVixen.Ui.Controls
  • IconArtVixen.Ui.Controls
  • IconArtTestsVixen.Ui.Controls.Tests
  • IconAtlasTestsVixen.Ui.Tests
  • IconPathVixen.Ui.Controls
  • NodeCanvasVixen.Ui.Controls.Advanced
  • NodeWireLayerVixen.Ui.Controls.Advanced
  • PaginationVixen.Ui.Controls
  • PathExtensionsVixen.Ui.Controls
  • PathTessellationCacheTestsVixen.Ui.Tests
  • PathTessellatorTestsVixen.Ui.Tests
  • PathTestsVixen.Ui.Tests
  • SpinnerVixen.Ui.Controls
  • SurfaceTestsVixen.Ui.Controls.Tests
  • SvgPathVixen.Ui
  • SvgPathTestsVixen.Ui.Tests
  • TimelineLanesVixen.Ui.Controls.Advanced
  • TimelineRulerVixen.Ui.Controls.Advanced
  • TreeNodeVixen.Ui.Controls.Advanced
  • TriangleVixen.Ui.Tests
  • UiGeometryTestsVixen.Ui.Tests
  • UiImageTestsVixen.Graphics.Golden.Tests
  • ViewportGizmoVixen.Ui.Controls.Advanced
  • BlockoutModeVixen.Editor.Blockout
  • ChromeFixtureVixen.Editor.Ui.Tests
  • EditorAffordanceTestsVixen.Editor.App.Tests
  • EditorApplicationVixen.Editor.App
  • EditorCommandVixen.Editor.Ui
  • EditorIconAttributeVixen.Editor.Ui
  • EditorIconsVixen.Editor.Ui
  • FakeVixen.Editor.Ui.Tests
  • FoliageModeVixen.Editor.Terrain
  • FontAtlasViewVixen.Editor.AssetEditors
  • IEditorModeVixen.Editor.Ui
  • IconContributionTestsVixen.Editor.App.Tests
  • ListDrawerVixen.Editor.Inspector