The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SVG::SVG2zinc - a module to display or convert svg files in perl modules or script, assuming you have Tk::Zinc.

SYNOPSIS

use SVG::SVG2zinc;

#To generate a script.pl file: &SVG::SVG2zinc::parse('file.svg', -result_type => 'script.pl', -verbose => $verbose, -zinc_version => $zinc_version);

#To generate a script.pm file: &SVG::SVG2zinc::parse('file.svg', -result_type => 'script.pm', -verbose => $verbose, -zinc_version => $zinc_version, -group => "\$top_group");

#To display a svgfile: $zinc = $mw->Zinc(); $top_group = $zinc->add('group', 1); &SVG::SVG2zinc::parse('file.svg', -result_type => "\$SVG2zinc::zinc", -group => $top_group, -verbose => $verbose, -namespace => $namespace, );

DESCRIPTION

Depending on the -result_type argument, &SVG::SVG2zinc::parse either displays SVG files inside a Tk::Zinc widget, or generates a perl module which could be used by a script or generates a perl script which displays the SVG file.

SVG::SVG2zinc should be extended to generate tcl or python scripts and/or modules.

BUGS and LIMITATIONS

Some limitations are due to differences between Tk::Zinc and SVG graphic models :

Drawing width

Drawing width are zoomed in SVG but are not with Tk::Zinc. Their width is defined whatever the zoom factor is.

Gradient Transformation

Gradient Transformation is not possible in Tk::Zinc. May be it could be implemented by the converted?

Rounded Rectangles

Rectangles cannot have rounded corners in Tk::Zinc. Could be implemented, by producing curve item rather than rectabgles in Tk::zinc. Sould be implemented in a future release of Tk::Zinc

Skew and Matrix transforms

Skew and Matrix transforms are not yet available in Tk::Zinc 3.2.94 or 3.294. Hopefully they should be available in the next release.

Text and tspan tags

Text and tspan tags are very complex items in SVG, for example placement can be very precise and complex. Many such features are difficult to implement in Tk::Zinc and are not currently implemented

Font

Font management is still limited. It will be rotatable and zoomable in future release of Tk::Zinc. SVG fonts included in a document are not readed, currently.

SVG image filtering

No image filtering functions are (and will be) available with Tk::Zinc, except if YOU want to contribute?

ClipPath tag

The SVG ClipPath tag is a bit more powerfull than Tk::Zinc clipping (clipper is limited to one item). So currently this is not implemented at all in SVG::SVG2zinc

There are also some limitations due to the early stage of the converter:

CSS

CSS in external url is not yet implemented

SVG animation and scripting

No animation is currently available, neither scripting in the SVG file. But Perl is a scripting language, isn'it?

switch tag

The SVG switch tag is only partly implemented, but should work in most situations

href for images

href for images can only reference a file in the same directory than the SVG source file

It was said there is still one hidden bug... but please patch and/or report it to the author!

SEE ALSO

svg2zinc.pl(1) a sample script using and demonstrating SVG::SVG2zinc

Tk::Zinc(3) TkZinc is available at www.openatc.org/zinc/

AUTHORS

Christophe Mertz <mertz@cena.fr>

many patches and extensions from Alexandre Lemort <lemort@intuilab.com>

helps from Celine Schlienger <celine@intuilab.com> and Stéphane Chatty <chatty@intuilab.com>

COPYRIGHT

CENA (C) 2002-2003

This program is free software; you can redistribute it and/or modify it under the term of the LGPL licence.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1743:

Non-ASCII character seen before =encoding in 'Stéphane'. Assuming CP1252