Re: Basic question - PHP usage of SVG files [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 1:14 PM +0900 11/24/07, Dave M G wrote:
Larry,

Thanks for your advice.

With the XML editor available within PHP, I've made a small script that can extract the point data inside an SVG file, and store them as an array of points.

That array can then be used to draw and fill shapes in a PNG image. And since they are stored as an array, I can do a little math on them to manipulate their scale and whatnot.

The interpolation between points gets lost with this method, but in this case, I can get by with straight lines.

Thanks for helping me to see the value in using PHP's XML functions.

--
Dave M G


Dave:

If you want to smooth those points out, you can do it with a bezier or catmull spline.

The code for catmull spline can be found here:

http://brlcad.org/doxygen/d7/ddd/rt__dspline_8c-source.html

I would love to see it translated into php.

I have a copy of bezier code in C -- contact me off-list for a copy.

Cheers,

tedd


--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux