SVG

Perl extension for generating Scalable Vector Graphics (SVG) documents
Download

SVG Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Ronan Oger
  • Publisher web site:
  • http://search.cpan.org/~ronan/SVG-Template-Graph-0.15/lib/SVG/Template/Graph.pm

SVG Tags


SVG Description

Perl extension for generating Scalable Vector Graphics (SVG) documents SVG is a Perl module that can be used to generate Scalable Vector Graphics (SVG) documents.SYNOPSIS #!/usr/bin/perl -w use strict; use SVG; # create an SVG object my $svg= SVG->new(width=>200,height=>200); #or my $svg= SVG->new(width=>200,height=>200); # use explicit element constructor to generate a group element my $y=$svg->group( id => 'group_y', style => { stroke=>'red', fill=>'green' } ); # add a circle to the group $y->circle(cx=>100, cy=>100, r=>50, id=>'circle_in_group_y'); # or, use the generic 'tag' method to generate a group element by name my $z=$svg->tag('g', id => 'group_z', style => { stroke => 'rgb(100,200,50)', fill => 'rgb(10,100,150)' } ); # create and add a circle using the generic 'tag' method $z->tag('circle', cx=>50, cy=>50, r=>100, id=>'circle_in_group_z'); # create an anchor on a rectangle within a group within the group z my $k = $z->anchor( id => 'anchor_k', -href => 'http://test.hackmare.com/', target => 'new_window_0' )->rectangle( x => 20, y => 50, width => 20, height => 30, rx => 10, ry => 5, id => 'rect_k_in_anchor_k_in_group_z' ); # now render the SVG object, implicitly use svg namespace print $svg->xmlify; # or render a child node of the SVG object without rendering the entire object print $k->xmlify; #renders the anchor $k above containing a rectangle, but does not #render any of the ancestor nodes of $k # or, explicitly use svg namespace and generate a document with its own DTD print $svg->xmlify(-namespace=>'svg'); # or, explicitly use svg namespace and generate an in-line docunent print $svg->xmlify( -namespace => "svg", -pubid => "-//W3C//DTD SVG 1.0//EN", -inline => 1 );SVG is a 100% Perl module which generates a nested data structure containing the DOM representation of an SVG (Scalable Vector Graphics) image. Using SVG, you can generate SVG objects, embed other SVG instances into it, access the DOM object, create and access javascript, and generate SMIL animation content. Requirements: · Perl


SVG Related Software