mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
- handle each command separately - handle both relative and absolute commands - moved into _applyTransforms.js to convert eventually into plugin - apply transforms before converting into relative These changes makes code independent and easy to work with.
18 lines
460 B
XML
18 lines
460 B
XML
Apply transforms
|
|
|
|
- both absolute and relative arcs should be transformed correctly
|
|
|
|
===
|
|
|
|
<svg width="1200" height="1200">
|
|
<path transform="translate(100) scale(2)" d="m200 200 h-100 a100 100 0 1 0 100 -100 z"/>
|
|
<path transform="translate(100) scale(2)" d="M400 200 H300 A100 100 0 1 0 400 100 z"/>
|
|
</svg>
|
|
|
|
@@@
|
|
|
|
<svg width="1200" height="1200">
|
|
<path d="M500 400H300a200 200 0 1 0 200-200z"/>
|
|
<path d="M900 400H700a200 200 0 1 0 200-200z"/>
|
|
</svg>
|