Search
Categories
Documents
README
SVG - Perl extension for generating Scalable Vector Graphics documents (Displayed)
|
SVG - Perl extension for generating Scalable Vector Graphics documents
SVG - Perl extension for generating Scalable Vector Graphics (SVG) documents
Version 2.26, 12.01.03
Refer to the SVG::Manual manpage for the complete manual
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.
Refer to the SVG::Manual manpage for the complete manual.
Ronan Oger, RO IT Systemms GmbH, ronan@roasp.com
Peter Wainwright, peter@roasp.com Excellent ideas, beta-testing, SVG::Parser
http://www.roasp.com/index.shtml?svg.pod
perl(1),SVG,the SVG::DOM manpage,the SVG::XML manpage,the SVG::Element manpage,the SVG::Parser manpage, the SVG::Manual manpage
http://www.roasp.com/
http://www.perlsvg.com/
http://www.roitsystems.com/
http://www.w3c.org/Graphics/SVG/
SVG provides both explicit and generic element constructor methods. Explicit
generators are generally (with a few exceptions) named for the element they
generate. If a tag method is required for a tag containing hyphens, the method
name replaces the hyphen with an underscore. ie: to generate tag <column-heading id=``new''>
you would use method $svg->column_heading(id=>'new').
All element constructors take a hash of element attributes and options;
element attributes such as 'id' or 'border' are passed by name, while options for the
method (such as the type of an element that supports multiple alternate forms)
are passed preceded by a hyphen, e.g '-type'. Both types may be freely
intermixed; see the fe method and code examples througout the documentation
for more examples.
$svg = SVG->new(%attributes)
Creates a new SVG object. Attributes of the document SVG element be passed as
an optional list of key value pairs. Additionally, SVG options (prefixed with
a hyphen) may be set on a per object basis:
Example:
my $svg1=new SVG;
my $svg2=new SVG(id => 'document_element');
my $svg3=new SVG(
-printerror => 1,
-raiseerror => 0,
-indent => ' ',
-elsep =>"\n", # element line (vertical) separator
-docroot => 'svg', #default document root element (SVG specification assumes svg). Defaults to 'svg' if undefined
-sysid => 'abc', #optional system identifyer
-pubid => "-//W3C//DTD SVG 1.0//EN", #public identifyer default value is "-//W3C//DTD SVG 1.0//EN" if undefined
-namespace => 'mysvg',
-inline => 1
id => 'document_element',
width => 300,
height => 200,
);
Default SVG options may also be set in the import list. See EXPORTS above
for more on the available options.
Furthermore, the following options:
-version
-encoding
-standalone
-namespace
-inline
-pubid (formerly -identifier)
-sysid (standalone)
may also be set in xmlify, overriding any corresponding values set in the SVG->new declaration
$string = $svg->xmlify(%attributes);
Returns xml representation of svg document.
XML Declaration
Name Default Value
-version '1.0'
-encoding 'UTF-8'
-standalone 'yes'
-namespace 'svg' - namespace for elements.
Can also be used in any element method to over-ride
the current namespace
-inline '0' - If '1', then this is an inline document.
-pubid '-//W3C//DTD SVG 1.0//EN';
-sysid 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'
Information
|
This site is currently in testing, it is not yet operating using the full database. Until it is officially launched you may wish to visit Help-Site Computer Manuals. After launch, this site (HelpSpy) will replace Help-Site. Information about the spider which is currently trawling the Internet looking for links to add to this directory can be found here. |
|