Image-CairoSVG
view release on metacpan or search on metacpan
lib/Image/CairoSVG.pod view on Meta::CPAN
L<This demonstration
website|https://benkasminbullock.github.io/supertinyiconscairosvg/>
shows the output of Image::CairoSVG on the Super Tiny Icons
collection, the L<Twitter Emoji
Collection|https://benkasminbullock.github.io/supertinyiconscairosvg/twemoji/>, and the L<SVG Test Suite|https://benkasminbullock.github.io/supertinyiconscairosvg/sts.html> (very limited support as yet).
Please see L</BUGS> below for notable errors in the rendering.
=head3 Blog articles
I've written some blog articles about extending the SVG support in
this module.
=over
=item L<Trying to get SVG right|https://benbullock.substack.com/p/trying-to-get-svg-right>
This was the first article, where I had discovered that the module's
arc-drawing code and arc-parsing code was not working.
=item L<Improvements to Image::CairoSVG|https://benbullock.substack.com/p/improvements-to-imagecairosvg>
This illustrates some of the improvements made up to version 0.16,
such as addition of opacity, support for the <use> tag, and more
correct drawing of circular arcs.
=item L<SVG matrix and miter limit|https://benbullock.substack.com/p/svg-matrix-and-miter-limit>
This documents visually the rendering improvements between version
0.17 and version 0.18.
=item L<For and against muddling booleans|https://benbullock.substack.com/p/for-and-against-muddling-booleans>
This documents an error caused by testing attributes directly, when an
attribute with value "zero" was ignored, causing a rendering error.
=back
=head2 Other software
=over
=item CairoSVG
L<CairoSVG|http://cairosvg.org/> is a Python SVG renderer in
Cairo. The elliptical arc drawing part of Image::CairoSVG is a
translation of its code into Perl.
=back
=head2 Other CPAN modules related to SVG
=over
=item L<Image::LibRSVG>
Perl extension for a Gnome library called librsvg which converts SVG
to PNG or JPEG, etc. We have not tested this library.
=item L<Image::Magick>
Does SVG to PNG conversion.
=item L<Image::SVG::Path>
This is a specialised module for reading the "d" attribute of SVG
paths.
=item L<Image::SVG::Transform>
Read the "transform" attribute of an SVG element. It is not a
dependency of this module, but I used this as a reference when writing
the transform code in this module.
=item L<MarpaX::Languages::SVG::Parser>
This extends the L<Marpa::R2> parser to parse SVG.
=item L<SVG>
This is for generating SVG documents.
=item L<SVG::Parser>
Parse the XML for SVG files. It can use either L<XML::Parser> or
L<XML::SAX> but XML::Parser seems not to work. See
L<https://rt.cpan.org/Ticket/Display.html?id=136404>.
=item L<SVG::Rasterize>
Rasterize SVG content to pixel graphics. We couldn't get this to
produce output. See
L<https://rt.cpan.org/Ticket/Display.html?id=136405>.
=back
=head2 Other CPAN modules
=over
=item L<Image::PNG::Cairo>
This might be useful if you want to do something with the PNG output
of Cairo other than just write it to a file, for example adding text
to it.
=back
=head2 More information
=over
=item Perl Maven article
L<SVG - Scalable Vector Graphics with
Perl|http://perlmaven.com/scalable-vector-graphics-with-perl> -
article at Perl Maven
=item Perl Cairo tutorial
( run in 3.266 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )