|
Posted by Alfred Whitney on 10/22/06 07:50
I've got a condition where I can't use pear or other add-ons on this
server and I need to draw SVG piecharts in PHP, save the file, shell
out and convert with ImageMagick to PNG, and display them. I've got the
ImageMagick 'convert' command down with...
convert /tmp/tmp1.svg /tmp/tmp1.png
....and I have found an excellent SVG piechart example here:
http://www.codestore.net/store.nsf/unid/EPSD-5DTT4L?OpenDocument
(See first SVG sample code)
....but I can't figure out how to compute the L (lineto) and the ending
of the A (arc) values. I mean, you can't just choose arbitrary numbers
or you end up with a wobbly mess. That's where sine and cosine come in.
Anyone done this before?
Navigation:
[Reply to this message]
|