0

Is there a way to prevent Fabric.js from creating svgs with multiple transforms? I am using canvas.toSVG() and the results I am getting always look something like this:

<g transform="matrix(1.7 0 0 1.7 240.85 240.85)"  >
    <path transform=" translate(-138.51, -138.72)" d="..."/>
</g>

The multiple transforms are causing issues when the SVG is converted to Gcode using jscut with paths and groups misaligned. Is there a way in Fabric to update the path data / coordinates so that the output doesn't need to transform every path / group etc within the SVG?

user1961104
  • 405
  • 1
  • 3
  • 7
  • Not sure if fabric.js has a conversion method for this. You can post your question in the [github discussion section.](https://github.com/fabricjs/fabric.js/discussions) . Some of these answers might be helpful ["Baking transforms into SVG Path Element commands"](https://stackoverflow.com/questions/5149301/baking-transforms-into-svg-path-element-commands/76813658#76813658) – herrstrietzel Aug 01 '23 at 16:58

0 Answers0