Hi,
I have the following SVG -
<g style="fill:#ee3399;">
<path d="M155.9,124.8 A14.4,14.4 0 0 1 173.0,131.5 A18.0,18.0 0 0 1 16
+9.0,145.5 C169.6,149.2 171.9,152.2 175.9,155.5 A12.9,12.9 0 0 1 177.0
+,171.5 A10.0,10.0 0 0 1 163.0,176.3 A8.0,8.0 0 0 1 156.2,164.5 C156.4
+,160.5 154.8,157.8 151.9,155.5 A11.3,11.3 0 0 1 151.9,139.5 A16.5,16.
+5 0 0 1 153.1,127.5 z" />
</g>
<g style="fill:#FF00FF;">
<path d="
...
and I wish to scale the values in the above code by a factor of 4. This basically involves dividing all those values above by 4. But for arcs (A) there is an exception - A14.4,14.4 0 0 1 (etc) should be converted to A3.6,3.6 0 0 1, i.e. the 0 0 1 dont get scaled.
This should be the output for converting the above (with values converted to one decimal place) -
<g style="fill:#ee3399;">
<path d="M39.0,31.2 A3.6,3.6 0 0 1 43.3,32.9 A4.5,4.5 0 0 1 42.3,36.4
+C42.4,37.3 43.0,38.1 44.0,38.9 A3.2,3.2 0 0 1 44.3,42.9 A2.5,2.5 0 0
+1 40.8,44.1 A2.0,2.0 0 0 1 39.1,41.1 C39.1,40.2 38.7,39.5 38.0,38.9 A
+2.8,2.8 0 0 1 38.0,34.9 A4.1,4.1 0 0 1 38.3,31.9 z" />
</g>
<g style="fill:#FF00FF;">
<path d="
...
I've no idea how to approach this, hope you can help,
Thanks,
Barry.
P.S. If anyone nows how to get IE to cache SVG (outputed from perl with expires set for sometime next year) please let me know. I think this problem applies to all output which IE hands over to a plugin.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.