Changing the width/height of an SVG path

nicholaswmin picture nicholaswmin · Feb 16, 2013 · Viewed 45.7k times · Source

How can I change the width/height of a selected path in SVG-edit.

  • So far i only have this:

    svgCanvas.changeSelectedAttribute("height", "499");

The above command has absolutely no effect on the path. Resizing the bounding box just resizes the bounding box, but not the path itself.

Answer

Plynx picture Plynx · Feb 16, 2013

For a path, you probably want to apply a transform rather than edit the path coordinates, which can get complicated. See http://www.w3.org/TR/SVG/coords.html#TransformAttribute