|
NAMEImage::Base::SVG -- SVG image file outputSYNOPSISuse Image::Base::SVG; my $image = Image::Base::SVG->new (-width => 100, -height => 100); $image->rectangle (0,0, 99,99, 'black'); $image->xy (20,20, 'green'); $image->line (50,50, 70,70, 'red'); $image->line (50,50, 70,70, 'blue'); $image->save ('/some/filename.svg'); CLASS HIERARCHY"Image::Base::SVG" is a subclass of "Image::Base",Image::Base Image::Base::SVG DESCRIPTION"Image::Base::SVG" extends "Image::Base" to create or update SVG format image files using the "SVG" module. The "SVG" module holds the contents of an SVG file in memory as an object which can be variously manipulated. See SVG::Manual for details."Image::Base" is pixel oriented so isn't really the sort of thing SVG is meant for, but this module can direct "Image::Base" style code at an "SVG" object. The "SVG" module has many more features if used natively. It's often fairly easy to spit out SVG directly too, and for instance the "Image::Base::SVGout" module can do that. The advantage of the "SVG" object comes when combining images or fragments, or going through elements for post-facto mangling. In the current code the SVG elements emitted assume some default style attributes such as stroke-width 1. Perhaps that should be set explicitly on each element. ColoursColour names are per the SVG spec, which is CSS style syntax#RGB hex, 1 digit #RRGGBB hex, 2 digit rgb(255,255,255) integers 0 to 255 rgb(100%,100%,100%) percentages http://www.w3.org/TR/2008/REC-CSS2-20080411/syndata.html#value-def-color plus extra names http://www.w3.org/TR/2003/REC-SVG11-20030114/types.html#ColorKeywords FUNCTIONSSee "FUNCTIONS" in Image::Base for the behaviour common to all Image-Base classes.
ATTRIBUTES
SEE ALSOImage::Base, SVG, SVG::Manual, SVG::ParserImage::Base::SVGout HOME PAGEhttp://user42.tuxfamily.org/image-base-svg/index.htmlLICENSEImage-Base-SVG is Copyright 2011, 2012, 2019 Kevin RydeImage-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/>.
Visit the GSP FreeBSD Man Page Interface. |