public sealed class PathBuilderBuilds 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> SegmentsThe steps, in order.
public int CountHow many steps it has.
public Vector2 CurrentWhere the pen is.
Methods (8)
public PathBuilder Clear()Empties it, keeping the memory.
public PathBuilder MoveTo(Vector2 point)Lifts the pen and puts it down, starting a new contour.
public PathBuilder LineTo(Vector2 point)Draws a straight line.
public PathBuilder QuadraticTo(Vector2 control, Vector2 point)Draws a quadratic Bézier.
public PathBuilder CubicTo(Vector2 first, Vector2 second, Vector2 point)Draws a cubic Bézier.
public PathBuilder Close()Joins the current contour back to where it started.
public PathBuilder AddRectangle(Rectangle rectangle)Adds a rectangle as its own closed contour.
public PathBuilder AddEllipse(Rectangle bounds)Adds an ellipse inscribed in a rectangle.
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