Compare
Sorry, something went wrong.
No results found
feat: add complete SVG coordinate system support per W3C SVG2 spec
New features in SVGFlatten module:
viewBox & preserveAspectRatio:
- parseViewBox() - parse viewBox="minX minY width height"
- parsePreserveAspectRatio() - parse align + meet/slice
- computeViewBoxTransform() - compute viewBox-to-viewport matrix
- SVGViewport class - encapsulates viewport with viewBox handling
Full CTM building:
- buildFullCTM() - build CTM from complete SVG hierarchy
Accepts {type: 'svg', width, height, viewBox, preserveAspectRatio}
and {type: 'g'|'element', transform} objects
Unit resolution:
- resolveLength() - resolve px, %, em, rem, pt, pc, in, cm, mm
- resolvePercentages() - resolve x/y relative to viewport
- normalizedDiagonal() - for non-directional percentages
Object bounding box:
- objectBoundingBoxTransform() - for gradientUnits/patternUnits
Per https://www.w3.org/TR/SVG2/coords.html
Bump to v1.0.5