http://qs1969.pair.com?node_id=233750

chinman has asked for the wisdom of the Perl Monks concerning the following question:

Fellow clergypersons,

I've been using GD::Graph for a while and I have found it to be most excellent. It sure would be nice to export my images to a vector format like SVG instead of PNG or JPEG. Does anyone know of an attempt to add this functionality to GD::Graph? I guess it would, in reality, require adding SVG funtionality to GD itself. I have searched the normal places on CPAN. I see there is something called SVGGraph, which I have not tried, but that would cause me to have to basically rewrite all of my graphing routines. Any suggestions?

Thanks,
chinman

Replies are listed 'Best First'.
Re: SVG in GD::Graph?
by Flame (Deacon) on Feb 08, 2003 at 21:43 UTC
    I see several problems with this. GD is a graphics library, and in a sense, SVG really isn't graphics, it's text. But that aside, GD is not suited to working in vectors as it maintains its state on a pixel by pixel basis, rather than 'line of color * between x1,y1,x2,y2' or similar vector methods. So I'm sorry to say, GD, without a rewrite, is probably not capable of SVG.



    My code doesn't have bugs, it just develops random features.

    Flame ~ Lead Programmer: GMS (DOWN) | GMS (DOWN)