r18858 - in /branches/upstream/libsvg-perl/current: Changes MANIFEST META.yml examples/svgtest2.pl lib/SVG.pm lib/SVG/DOM.pm lib/SVG/Element.pm lib/SVG/Extension.pm lib/SVG/Manual.pm lib/SVG/XML.pm t/98_all_pod.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Apr 19 22:02:14 UTC 2008
Author: gregoa
Date: Sat Apr 19 22:02:12 2008
New Revision: 18858
URL: http://svn.debian.org/wsvn/?sc=1&rev=18858
Log:
[svn-upgrade] Integrating new upstream version, libsvg-perl (2.42)
Added:
branches/upstream/libsvg-perl/current/examples/svgtest2.pl (with props)
Modified:
branches/upstream/libsvg-perl/current/Changes
branches/upstream/libsvg-perl/current/MANIFEST
branches/upstream/libsvg-perl/current/META.yml
branches/upstream/libsvg-perl/current/lib/SVG.pm
branches/upstream/libsvg-perl/current/lib/SVG/DOM.pm
branches/upstream/libsvg-perl/current/lib/SVG/Element.pm
branches/upstream/libsvg-perl/current/lib/SVG/Extension.pm
branches/upstream/libsvg-perl/current/lib/SVG/Manual.pm
branches/upstream/libsvg-perl/current/lib/SVG/XML.pm
branches/upstream/libsvg-perl/current/t/98_all_pod.t
Modified: branches/upstream/libsvg-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/Changes?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/Changes (original)
+++ branches/upstream/libsvg-perl/current/Changes Sat Apr 19 22:02:12 2008
@@ -1,4 +1,10 @@
Revision history for Perl extension SVG.
+
+2.42 16 April, 2008
+ -Removed Makefile from MANIFEST
+
+2.41 16 April, 2008
+ -Fixed MANIFEST and added license data to the SVG.pm file
2.40 14 April, 2008
-Changed tests to current recommendation. Moved to t/ directory.
Modified: branches/upstream/libsvg-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/MANIFEST?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/MANIFEST (original)
+++ branches/upstream/libsvg-perl/current/MANIFEST Sat Apr 19 22:02:12 2008
@@ -1,25 +1,9 @@
Changes
+LICENSE
+Makefile.PL
+MANIFEST
+META.yml
README
-MANIFEST
-Makefile.PL
-lib/SVG.pm
-lib/SVG/XML.pm
-lib/SVG/DOM.pm
-lib/SVG/Element.pm
-lib/SVG/Extension.pm
-lib/SVG/Manual.pm
-examples/SVG_02_sample.pl
-examples/image_sample.pl
-examples/inline_sample.pl
-examples/yaph5.cgi
-examples/starpath.cgi
-examples/svg.pl
-examples/sun_text_sample.pl
-examples/svg.pl
-examples/minsvg.pl
-examples/inlinesvg.pl
-examples/svg_dom_sample.pl
-examples/attributeManip.pl
t/01-loadsvg.t
t/02-simpledoc.t
t/03-render.t
@@ -44,7 +28,23 @@
t/22-xlink.t
t/23-xmlescape.t
t/24-doubleuse.t
+t/98_all_pod.t
t/99_test_pod_coverage.t
-META.yml Module meta-data (added by MakeMaker)
-LICENSE
-t/98_all_pod.t
+examples/attributeManip.pl
+examples/image_sample.pl
+examples/inline_sample.pl
+examples/inlinesvg.pl
+examples/minsvg.pl
+examples/starpath.cgi
+examples/sun_text_sample.pl
+examples/SVG_02_sample.pl
+examples/svg_dom_sample.pl
+examples/svg.pl
+examples/svgtest2.pl
+examples/yaph5.cgi
+lib/SVG.pm
+lib/SVG/DOM.pm
+lib/SVG/Element.pm
+lib/SVG/Extension.pm
+lib/SVG/Manual.pm
+lib/SVG/XML.pm
Modified: branches/upstream/libsvg-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/META.yml?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/META.yml (original)
+++ branches/upstream/libsvg-perl/current/META.yml Sat Apr 19 22:02:12 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: SVG
-version: 2.40
+version: 2.42
abstract: Perl extension for generating Scalable Vector Graphics (SVG) documents
license: perl
author:
Added: branches/upstream/libsvg-perl/current/examples/svgtest2.pl
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/examples/svgtest2.pl?rev=18858&op=file
==============================================================================
--- branches/upstream/libsvg-perl/current/examples/svgtest2.pl (added)
+++ branches/upstream/libsvg-perl/current/examples/svgtest2.pl Sat Apr 19 22:02:12 2008
@@ -1,0 +1,237 @@
+#!/usr/bin/perl -w
+
+use strict;
+use CGI;
+
+BEGIN {
+ push @INC , '../';
+ push @INC , '../SVG';
+}
+
+use SVG;
+
+my $VERSION = 3;
+
+#---------Create the CGI object which is required to handle the header
+my $p = CGI->new();
+
+$| = 1;
+
+
+#---------print the header just before outputting to screen
+
+
+
+
+#---------
+
+#---------Create the svg object
+
+my $height = $p->param('h') || 400;
+my $width = $p->param('w') || 800;
+
+my $svg= SVG->new(width=>$width,height=>$height);
+
+my $y=$svg->group( id=>'group_generated_group',style=>{ stroke=>'red', fill=>'green' });
+
+my $z=$svg->tag('g', id=>'tag_generated_group',style=>{ stroke=>'red', fill=>'black' });
+
+
+my $ya = $y -> anchor(
+ -href => 'http://somewhere.org/some/line.html',
+ -target => 'new_window_0');
+
+
+my $line_transform = 'matrix(0.774447 0.760459 0 0.924674 357.792 -428.792)';
+
+my $line = $svg->line(id=>'l1',x1=>(rand()*$width+5),
+ y1=>(rand()*$height+5),
+ x2=>(rand()*$width-5),
+ y2=>(rand()*$height-5),
+ style=>&obj_style,);
+
+#---------
+foreach (1..&round_up(rand(20))) {
+ my $myX = $width-rand(2*$width);
+ my $myY = $height-rand(2*$height);
+
+ my $rect = $y->rectangle (x=>$width/2,
+ y=>$height/2,
+ width=>(50+50*rand()),
+ height=>(50+50*rand()),
+ rx=>20*rand(),
+ ry=>20*rand(),
+ id=>'rect_1',
+ style=>&obj_style);
+
+ $rect->animate(attributeName=>'transform',
+ attributeType=>'XML',
+ from=>'0 0',
+ to=>$myX.' '.$myY,
+ dur=>&round_up(rand(20),2).'s',
+ repeatCount=>&round_up(rand(30)),
+ restart=>'always',
+ #-method=>'transform',
+ );
+}
+my $a = $z -> anchor(
+ -href => 'http://somewhere.org/some/other/page.html',
+ -target => 'new_window_0',
+ id=>'anchor a');
+
+my $a1 = $z -> anchor(
+ -href => '/index.html',
+ -target => 'new_window_1',
+ id=>'anchor a1');
+
+my $a2 = $z -> anchor(
+ -href => '/svg/index.html',
+ -target => 'new_window_2',
+ id=>'anchor a2');
+
+#---------
+
+my $c;
+foreach (1..&round_up(rand(5))) {
+
+ $c= $a->circle(cx=>($width-20)*rand(),
+ cy=>($height-20)*rand(),
+ r=>100*rand(),
+ id=>'c1',
+ style=>&obj_style);
+
+ $c = $a1->circle(cx=>($width-20)*rand(),
+ cy=>($height-20)*rand(),
+ r=>100*rand(),
+ id=>'c2',
+ style=>&obj_style);
+}
+#---------
+
+my $xv = [$width*rand(), $width*rand(), $width*rand(), $width*rand()];
+
+my $yv = [$height*rand(), $height*rand(), $height*rand() ,$height*rand()];
+
+my $points = $a->get_path(x=>$xv,
+ y=>$yv,
+ -type=>'polyline',
+ -closed=>'true',);
+
+
+$c = $a1->polyline (%$points,
+ id=>'pline1',
+ style=>&obj_style);
+
+#---------
+
+$xv = [$width*rand(), $width*rand(), $width*rand(), $width*rand()];
+
+$yv = [$height*rand(), $height*rand(), $height*rand() ,$height*rand()];
+
+$points = $a->get_path(x=>$xv,
+ y=>$yv,
+ -type=>'polygon',);
+
+
+$c = $a->polygon (%$points,
+ id=>'pgon1',
+ style=>&obj_style);
+#---------
+
+
+my $t=$a2->text(id=>'t1',
+ transform=>'rotate(-45)',
+ style=>&text_style);
+#---------
+
+
+my $u=$a2->text(id=>'t3',
+ x=>$width/2*rand(),
+ y=>($height-80)*rand(),
+ transform=>'rotate('.(-2.5*5*rand()).')',
+ style=>&text_style);
+
+
+
+my $v=$a2->tag('text',
+ id=>'t5',
+ x=>$width/2*rand(),
+ y=>$height-40+5*rand(),
+ transform=>'rotate('.(-2.5*5*rand()).')',
+ style=>&text_style);
+
+my $w=$a2->text(id=>'t5',
+ x=>$width/2*rand(),
+ y=>$height-20+5*rand(),
+ transform=>'rotate('.(-2.5*5*rand()).')',
+ style=>&text_style);
+
+
+$t->cdata('Text generated using the high-level "text" tag');
+$t->cdata('Courtesy of RO IT Systems GmbH');
+$v->cdata('Text generated using the low-level "tag" tag');
+$w->cdata('But what about in-line SVG? Yes, we do that too');
+$w->cdata('All this with SVG.pm? Wow.');
+
+print $p->header('image/svg-xml');
+print $svg->render
+;
+
+exit;
+
+
+#################
+# Subroutine to round up the value of a number or of a text representation of number
+#
+sub round_up {
+ my ($x, $precision) = shift;
+ $x =~ s/^\s+//g;
+ $x =~ s/\s+$//g;
+ $x =~ s/,//g;
+
+ my $y;
+ $precision = 0 unless $precision;
+ ($x, $y) = split( /\./, $x) if $x =~ /\./;
+ my $y1 = substr($y, 0, $precision);
+ my $y2 = substr($y, $precision, 1);
+
+ if ($y2 >= 5) {
+ $precision?$y1++:$x++;
+ }
+
+ return "$x$y1";
+
+} # sub round_val
+
+sub obj_style {
+
+ my $style = {'stroke-miterlimit'=>(4*rand()),
+ 'stroke-linejoin'=>'miter',
+ 'stroke-linecap'=>'round',
+ 'stroke-width'=>(0.1+0.5*rand()),
+ 'stroke-opacity'=>(0.5+0.5*rand()),
+ 'stroke'=>'rgb('.255*round_up(rand()).','.255*round_up(rand()).','.255*round_up(rand()).')',
+ 'fill-opacity'=>(0.5+0.5*rand()),
+ 'fill'=>'rgb('.255*round_up(rand()).','.255*round_up(rand()).','.255*round_up(rand()).')',
+ 'opacity'=>(0.5+0.5*rand()) };
+
+ return $style;
+
+}
+
+sub text_style {
+
+ my $style = {'font-family'=>'Arial',
+ 'font-size'=>8+5*rand(),
+ 'stroke-width'=>1+2*rand(),
+ 'stroke-opacity'=>(0.2+0.5*rand()),
+ 'stroke'=>'rgb('.255*round_up(rand()).','.255*round_up(rand()).','.255*round_up(rand()).')',
+ 'fill-opacity'=>1,
+ 'fill'=>'rgb('.255*round_up(rand()).','.255*round_up(rand()).','.255*round_up(rand()).')',
+ 'opacity'=>(0.5+0.5*rand()) };
+
+ return $style;
+
+}
+
+#---------
Propchange: branches/upstream/libsvg-perl/current/examples/svgtest2.pl
------------------------------------------------------------------------------
svn:executable = *
Modified: branches/upstream/libsvg-perl/current/lib/SVG.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/lib/SVG.pm?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/lib/SVG.pm (original)
+++ branches/upstream/libsvg-perl/current/lib/SVG.pm Sat Apr 19 22:02:12 2008
@@ -18,7 +18,7 @@
@ISA = qw(SVG::Element SVG::Extension);
-$VERSION = "2.40";
+$VERSION = "2.42";
#-------------------------------------------------------------------------------
@@ -26,7 +26,7 @@
=head2 VERSION
-Version 2.40, 08 April, 2008
+Version 2.42, 08 April, 2008
Refer to L<SVG::Manual> for the complete manual
@@ -323,4 +323,14 @@
#-------------------------------------------------------------------------------
+#LICENSE
+#
+#
+#
+#The modules in the SVG distribution are distributed under the same license
+# as Perl itself. It is provided free of warranty and may be re-used freely.
+#
+#
+#
+
1;
Modified: branches/upstream/libsvg-perl/current/lib/SVG/DOM.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/lib/SVG/DOM.pm?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/lib/SVG/DOM.pm (original)
+++ branches/upstream/libsvg-perl/current/lib/SVG/DOM.pm Sat Apr 19 22:02:12 2008
@@ -2,7 +2,7 @@
use strict;
use warnings;
use vars qw($VERSION);
-$VERSION = "1.04";
+$VERSION = "2.42";
# this module extends SVG::Element
package SVG::Element;
Modified: branches/upstream/libsvg-perl/current/lib/SVG/Element.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/lib/SVG/Element.pm?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/lib/SVG/Element.pm (original)
+++ branches/upstream/libsvg-perl/current/lib/SVG/Element.pm Sat Apr 19 22:02:12 2008
@@ -20,7 +20,7 @@
package SVG::Element;
-$VERSION = "2.40";
+$VERSION = "2.42";
use strict;
use SVG::XML;
@@ -1329,7 +1329,7 @@
);
Note that the following filter elements are currently supported:
-Also note that the elelemts are defined in lower case in the module, but as of version 2.31, any case combination is allowed.
+Also note that the elelemts are defined in lower case in the module, but as of version 2.421, any case combination is allowed.
=head2 * feBlend
Modified: branches/upstream/libsvg-perl/current/lib/SVG/Extension.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/lib/SVG/Extension.pm?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/lib/SVG/Extension.pm (original)
+++ branches/upstream/libsvg-perl/current/lib/SVG/Extension.pm Sat Apr 19 22:02:12 2008
@@ -2,7 +2,7 @@
use strict;
use warnings;
use vars qw(@ISA $VERSION @TYPES %TYPES);
-$VERSION = "0.2";
+$VERSION = "2.42";
# although DTD declarations are not elements, we use the same API so we can
# manipulate the internal DTD subset using the same methods available for
Modified: branches/upstream/libsvg-perl/current/lib/SVG/Manual.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/lib/SVG/Manual.pm?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/lib/SVG/Manual.pm (original)
+++ branches/upstream/libsvg-perl/current/lib/SVG/Manual.pm Sat Apr 19 22:02:12 2008
@@ -1,6 +1,6 @@
package SVG::Manual;
-our $VERSION = 2.40;
+our $VERSION = 2.42;
use vars qw($VERSION);
use strict;
use warnings;
@@ -13,7 +13,7 @@
=head2 VERSION
-Covers SVG-2.40 distribution, April 2008
+Covers SVG-2.42 distribution, April 2008
=head1 SYNOPSIS
@@ -199,7 +199,7 @@
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs /><!--
- Generated using the Perl SVG Module V2.33
+ Generated using the Perl SVG Module V2.42
by Ronan Oger
Info: http://www.roitsystems.com/
-->
Modified: branches/upstream/libsvg-perl/current/lib/SVG/XML.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/lib/SVG/XML.pm?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/lib/SVG/XML.pm (original)
+++ branches/upstream/libsvg-perl/current/lib/SVG/XML.pm Sat Apr 19 22:02:12 2008
@@ -23,7 +23,7 @@
use vars qw($VERSION @ISA @EXPORT );
-$VERSION = "2.27";
+$VERSION = "2.42";
require Exporter;
@ISA = qw(Exporter);
Modified: branches/upstream/libsvg-perl/current/t/98_all_pod.t
URL: http://svn.debian.org/wsvn/branches/upstream/libsvg-perl/current/t/98_all_pod.t?rev=18858&op=diff
==============================================================================
--- branches/upstream/libsvg-perl/current/t/98_all_pod.t (original)
+++ branches/upstream/libsvg-perl/current/t/98_all_pod.t Sat Apr 19 22:02:12 2008
@@ -2,6 +2,6 @@
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
-my @poddirs = qw( blib );
+my @poddirs = qw( blib blib/SVG);
all_pod_files_ok( all_pod_files( @poddirs ) );
More information about the Pkg-perl-cvs-commits
mailing list