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

    Function transformPath

    • Apply an affine Mat3 to a path's geometry.

      Axis-aligned maps (no rotation/shear, i.e. m[1] === 0 && m[2] === 0) keep a RectPath a rect — the four corners stay axis-aligned, so we transform the two diagonal corners and normalize negative extent (mirror). Rotation or shear promotes the rect's four corners to a PolygonPath. Polygon paths map every coord via the kernel's transformCoords, preserving the command stream and fillRule. Never mutates the input.

      Mat3 here is the 6-tuple number[] from @weasel-js/geom (DOMMatrix order: [a, b, c, d, e, f] where x' = a·x + c·y + e, y' = b·x + d·y + f), not the renderer's 9-element Float32Array.

      Parameters

      Returns Path