I am having trouble with doing some simple modifications to a simple shape, saving it as a plain SVG and then rendering it in HTML within a <svg> tag.
First what works for me. If I start out with a new document and create a new shape and then immediately save that as a SVG I am able to open the .svg file, extract out the path data (the d attribute in the XML) and then render a simple <svg> element. The problem occurs when I make changes to the shape. If I just simply move the shape up or do a simple resize by dragging on the handles and then re-save, I get a transform attribute within the SVG XML file and the path hasn't changed. Ultimately what I need is for the path itself to update.
Now what I have tried is doing path --> simplify which does just that but something about the way the path is modified messes things up. The path seems unnaturally large and when I try to use it for HTML nothing shows up in the browser even if I increase the sizes of the view box.
Here's an example of the path differences with simply for clarity:
Freshly created shape
Code: Select all
<path d="m 64.082277,32.56329 a 31.803797,31.803797 0 1 1 -63.60759324,0 31.803797,31.803797 0 1 1 63.60759324,0 z" fill="#49b827" stroke="#FFFFFF" stroke-width="3.0"></path>
Modified shape by dragging on handle to make it larger and then running path --> simplify
Code: Select all
<path d="m 77.427561,1013.2008 c 0.368092,18.0749 -13.782896,34.9661 -31.62264,37.8243 -17.480446,3.4839 -36.321989,-7.0537 -42.560908,-23.735 -6.7103638,-16.2034 -0.4391592,-36.4061 14.275706,-45.95141 14.630444,-10.27562 36.258196,-8.19723 48.653597,4.69196 7.159099,7.09525 11.310176,17.08775 11.254245,27.17015 z" fill="#49b827" stroke="#FFFFFF" stroke-width="3.0"></path>
So now ultimately, my question. I need to make simple SVG's but my requirement is ONE path and any modifications I make such as moving or resizing needs to be reflected within that path.
Any guidance is very much appreciated