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

From: Date: Sat, 24 Nov 2007 15:38:26 +0000
Subject: Re: Basic question - PHP usage of SVG files [SOLVED]
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-264996@lists.php.net to get a copy of this message
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

« previous php.general (#264996) next »