Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the width/height of an SVG path

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.

like image 459
nicholaswmin Avatar asked Feb 16 '13 05:02

nicholaswmin


People also ask

How do you change the size of a path?

To do this, go up in the Options Bar and turn on the checkbox for Show Bounding Box. This puts a Free Transform-like bounding box around your path, and you can use this bounding box to resize your path by dragging the handles (remember to hold the Shift key to resize it proportionately).

Does SVG have width and height?

Although the SVG element does have height and width attributes, these might not be specified as pixels, but any of a number of units, so they aren't necessarily a lot of help.


1 Answers

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

like image 133
Plynx Avatar answered Sep 30 '22 08:09

Plynx