Vixen
02b45cc4
csharp
public readonly record struct PathSegment

One step of a path.

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

Remarks

⚠ One fixed-size struct for every verb, with the points a verb does not use left at zero. Skia's design is a verb array beside a point array, which is smaller — a line costs one point rather than three — and it needs two ranges on the command that refers to it and two cursors to walk. This keeps the frame diff a comparison of one contiguous array and the command's reference to it one range, which is worth more here than the bytes.

The end point is always P2, whatever the verb, so walking a path for its current position never has to switch on the verb first.

Fields and properties (4)

  • public PathVerb Verb

    What this step does.

  • public Vector2 P0

    The first control point, for a curve.

  • public Vector2 P1

    The second, for a cubic.

  • public Vector2 P2

    Where the pen ends up.

Methods (1)

Used by (13)

  • ControlIconsVixen.Ui.Controls
  • DrawListVixen.Ui
  • EntryVixen.Ui
  • IconVixen.Ui.Controls
  • IconAtlasVixen.Ui
  • PathBuilderVixen.Ui
  • PathFlattenerVixen.Ui
  • PathTestsVixen.Ui.Tests
  • SurfaceTestsVixen.Ui.Controls.Tests
  • SvgPathTestsVixen.Ui.Tests
  • TessellationVixen.Ui
  • UiGeometryBuilderVixen.Ui
  • OutOfTreePluginTestsVixen.Editor.App.Tests