weasel API - v0.8.0
    Preparing search index...

    Function pathToAnchors

    • Derive a per-subpath anchor model from a PolygonPath. Subpaths split on every M command; a subpath is closed iff it ends with Z.

      Cubic-segment control points become the outHandle of the previous anchor and the inHandle of the next anchor. Quadratic segments are upgraded to cubics (each control reused for both adjacent handles) — this loses no geometry. Linear segments produce anchors with no handles.

      Parameters

      Returns { anchors: PenAnchor[][]; closed: boolean[] }