|$image = Image::Base::SVG->new (key=>value,...)||
Create and return a new image object. A new image can be started with just
Generally -width and -height should be set, but it works to do that later after creating.
Or an existing SVG object can be given,
|$image->xy ($x, $y, $colour)|
|$colour = $image->xy ($x, $y)||
Get or set an individual pixel.
Currently for a get the return is always undef as theres no support for picking out elements etc from the SVG. Perhaps the simple elements drawn by this Image::Base::SVG could be read back, but arbitrary SVG from a load() would need a full rasterize in the worst case.
Load an SVG file into $image, either from the current -file attribute,
or set that to $filename then load.
This uses the SVG::Parser module. See that module for how to choose between Expat or SAX for its underlying XML parse, and in turn see XML::SAX for its further choice of libxml, pure perl, etc. LibXML might be unhelpfully strict.
|$image->save ($filename)||Save the image to an SVG file, either the current -file option, or set that option to $filename and save to there.|
-width (integer) -height (integer) Setting -width or -height changes the SVG canvas size. In the current code it doesnt affect the elements already drawn to it. Is that how it should be?
Image::Base, SVG, SVG::Manual, SVG::Parser
Image-Base-SVG is Copyright 2011 Kevin Ryde
Image-Base-SVG is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Image-Base-SVG is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Image-Base-SVG. If not, see <http://www.gnu.org/licenses/>.
|perl v5.20.3||IMAGE::BASE::SVG (3)||2011-07-13|