NAME
Graphics::Penplotter::GcodeXY::SVG - SVG import role for GcodeXY
SYNOPSIS
$g->importsvg('drawing.svg');
DESCRIPTION
A Role::Tiny role that adds SVG import to Graphics::Penplotter::GcodeXY.
ELEMENTS SUPPORTED
svg, g, a, switch, defs, use, symbol, path, line, rect, circle, ellipse, polyline, polygon, text, tspan.
title, desc, metadata, image, linearGradient, radialGradient, pattern, clipPath, mask, filter, marker, foreignObject are silently ignored (appropriate for a pen plotter).
METHODS
- importsvg($filename)
-
Parse the SVG file at
$filenameand emit the vector content into the current GcodeXY drawing. A two-pass approach is used: allidattributes are indexed before rendering begins, so<use>elements that appear before their<defs>target work correctly.
AUTHOR
Albert Koelmans (albert.koelmans@googlemail.com)
LICENSE
Same terms as Perl itself.