svg2zinc.pl - displays a svg file or generates perl script, perl module or jpg,gif,png images
svg2zinc.pl -help
svg2zinc.pl Display [options] [-render 0|1|2] svgfile
svg2zinc.pl PerlScript [options] [-render 0|1|2] svgfile outfile
svg2zinc.pl PerlClass [options] [-prefix a_prefix] svgfile outfile
svg2zinc.pl Image [options] [-w pixels] [-h pixels] [-ratio %] svgfile outfile
svg2zinc.pl UserBackend [options] [userBackendOptions] svgfile [outfile]
svg2zinc.pl is a perl script which examplifie the use of SVG::SVG2zinc to read and interprete SVG file. Depending on the Backend svg2zinc.pl can be used to:
Displays a SVG file in a TkZinc windows.
Generates a perl script able to display the SVG file in a TkZinc windows
Generates a perl class module usable by other TkZinc based applications
Generates a tcl script able to display the SVG file in a TkZinc windows module usable by other TkZinc based applications. BEWARE: it is still higly experimental
Generates an image file of usual bitmap format such as gif, jpeg or png, depending on the outfile suffix. Accepted suffixes are those of the imagemagic package. -w option defines the image width, -h option defines the image height and -ratio option defines the image ratio towards the svg defined size. This requires the imagemagic package
Just print on stdout some incomplete lines of code similar of the code produced (or evaluated) with other backends. This backend is not very usefull except for SVG2zinc debug or as an exemple of oversimplified backend.
Generate data or file according to the provided UserBackend. This backend can be either a UserBackend.pm file or a sub class of SVG::SVG2zinc::Backend. In both cases, they must be reachable in the perl pathes. The options given to this backend should be documented in this backend. To write such a backend you should read the SVG::SVG2zinc::Backend(3pm) man pages and look to other backends as examples.
In this case, the [userBackendOptions] options must be given in the following form: -option1 val1 -option2 val2 with fullnames for options and a value for each option. These options are the same than those accepted by the UserBackend.pm module
The generic options available for all backends are :
to get more information on stdout
To treat xml file where SVG is a namespace
Mainly the same bugs and limitations of SVG::SVG2zinc(3pm)
SVG::SVG2zinc(3pm) SVG::SVG2zinc::Backend(3pm) Tk::Zinc(3pm)
TkZinc is available at www.openatc.org/zinc
Christophe Mertz <mertz at intuilab dot com> with some help from Daniel Etienne <etienne at cena dot fr>
CENA (C) 2002-2004 IntuiLab 2004
This program is free software; you can redistribute it and/or modify it under the term of the LGPL licence.
To install SVG::SVG2zinc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SVG::SVG2zinc
CPAN shell
perl -MCPAN -e shell install SVG::SVG2zinc
For more information on module installation, please visit the detailed CPAN module installation guide.