r23067 - in /branches/upstream/libpdf-create-perl/current: Changes META.yml lib/PDF/Create.pm lib/PDF/Create/Page.pm lib/PDF/Image/GIF.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Jul 12 15:23:48 UTC 2008
Author: gregoa
Date: Sat Jul 12 15:23:48 2008
New Revision: 23067
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23067
Log:
[svn-upgrade] Integrating new upstream version, libpdf-create-perl (1.02)
Modified:
branches/upstream/libpdf-create-perl/current/Changes
branches/upstream/libpdf-create-perl/current/META.yml
branches/upstream/libpdf-create-perl/current/lib/PDF/Create.pm
branches/upstream/libpdf-create-perl/current/lib/PDF/Create/Page.pm
branches/upstream/libpdf-create-perl/current/lib/PDF/Image/GIF.pm
Modified: branches/upstream/libpdf-create-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpdf-create-perl/current/Changes?rev=23067&op=diff
==============================================================================
--- branches/upstream/libpdf-create-perl/current/Changes (original)
+++ branches/upstream/libpdf-create-perl/current/Changes Sat Jul 12 15:23:48 2008
@@ -1,6 +1,19 @@
-commit 0e9a7ef...
+commit 73d46b5...
Author: Markus Baertschi <markus at markus.org>
-Date: Tue Jun 3 12:28:59 2008 +0200
+Date: Thu Jul 10 17:49:15 2008 +0200
+
+ Fixed gif image processing on big-endian machines.
+ Thanks to Neil Watkiss <neil.watkiss at gmail.com> for the patch !
+
+commit 52789c0...
+Author: Markus Baertschi <markus at markus.org>
+Date: Tue Jun 3 14:47:38 2008 +0200
+
+ Additions to Page.pm by Slaven
+
+commit 886ea2e...
+Author: Markus Baertschi <markus at markus.org>
+Date: Tue Jun 3 12:43:41 2008 +0200
Renamed Image modules to fix bug 28636 (rt.cpan.org).
Modified: branches/upstream/libpdf-create-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpdf-create-perl/current/META.yml?rev=23067&op=diff
==============================================================================
--- branches/upstream/libpdf-create-perl/current/META.yml (original)
+++ branches/upstream/libpdf-create-perl/current/META.yml Sat Jul 12 15:23:48 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: PDF-Create
-version: 1.01
+version: 1.02
abstract: create PDF files
license: ~
generated_by: ExtUtils::MakeMaker version 6.36
Modified: branches/upstream/libpdf-create-perl/current/lib/PDF/Create.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpdf-create-perl/current/lib/PDF/Create.pm?rev=23067&op=diff
==============================================================================
--- branches/upstream/libpdf-create-perl/current/lib/PDF/Create.pm (original)
+++ branches/upstream/libpdf-create-perl/current/lib/PDF/Create.pm Sat Jul 12 15:23:48 2008
@@ -25,7 +25,7 @@
package PDF::Create;
-our $VERSION = "1.01";
+our $VERSION = "1.02";
our $DEBUG = 0;
use strict;
Modified: branches/upstream/libpdf-create-perl/current/lib/PDF/Create/Page.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpdf-create-perl/current/lib/PDF/Create/Page.pm?rev=23067&op=diff
==============================================================================
--- branches/upstream/libpdf-create-perl/current/lib/PDF/Create/Page.pm (original)
+++ branches/upstream/libpdf-create-perl/current/lib/PDF/Create/Page.pm Sat Jul 12 15:23:48 2008
@@ -1,12 +1,11 @@
# -*- mode: Perl -*-
-
+#
# PDF::Create::Page - PDF pages tree
# Author: Fabien Tassin <fta at sofaraway.org>
-# Version: 0.06
# Copyright 1999-2001 Fabien Tassin <fta at sofaraway.org>
-
-# bugs :
-# - ...
+# Copyright 2007-2008 Markus Baertschi
+# Copyright 2008 Slaven Rezic
+
# 31.05.2008 1.00 Markus Baertschi
# - Changed version to 1.00 to go with PDF::Create
@@ -18,10 +17,11 @@
use Carp;
use FileHandle;
use Data::Dumper;
+use constant PI => 3.141592653;
@ISA = qw(Exporter);
@EXPORT = qw();
-$VERSION = 1.00;
+$VERSION = 1.02;
$DEBUG = 0;
my $font_widths = &init_widths;
@@ -311,6 +311,56 @@
}
$w / 1000;
}
+
+# Additional methods by Slaven
+# set_stroke_color
+# set_fill_color
+# set_line_width
+# circle
+sub set_stroke_color {
+ my($self, $r, $g, $b) = @_;
+ return if (defined $self->{'current_stroke_color'} &&
+ $self->{'current_stroke_color'} eq join(",", $r, $g, $b));
+ $self->{'pdf'}->page_stream($self);
+ $self->{'pdf'}->add("$r $g $b RG");
+ $self->{'current_stroke_color'} = join(",", $r, $g, $b);
+}
+
+sub set_fill_color {
+ my($self, $r, $g, $b) = @_;
+ return if (defined $self->{'current_fill_color'} &&
+ $self->{'current_fill_color'} eq join(",", $r, $g, $b));
+ $self->{'pdf'}->page_stream($self);
+ $self->{'pdf'}->add("$r $g $b rg");
+ $self->{'current_fill_color'} = join(",", $r, $g, $b);
+}
+
+sub set_line_width {
+ my($self, $w) = @_;
+ return if (defined $self->{'current_line_width'} &&
+ $self->{'current_line_width'} == $w);
+ $self->{'pdf'}->page_stream($self);
+ $self->{'pdf'}->add("$w w");
+ $self->{'current_line_width'} = $w;
+}
+
+sub circle {
+ my($self, $x, $y, $r) = @_;
+
+ my @coords;
+ for(my $i = 0; $i < PI*2; $i+=PI*2/$r/2) {
+ my($xi,$yi) = map { $_*$r } (sin $i, cos $i);
+ push @coords, $x+$xi, $y+$yi;
+ }
+ push @coords, @coords[0,1];
+ @coords = map { sprintf "%.2f", $_ } @coords;
+
+ $self->moveto(shift @coords, shift @coords);
+ for(my $i = 0; $i <= $#coords; $i+=2) {
+ $self->lineto($coords[$i], $coords[$i+1]);
+ }
+}
+#
sub printnl {
my $self = shift;
Modified: branches/upstream/libpdf-create-perl/current/lib/PDF/Image/GIF.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpdf-create-perl/current/lib/PDF/Image/GIF.pm?rev=23067&op=diff
==============================================================================
--- branches/upstream/libpdf-create-perl/current/lib/PDF/Image/GIF.pm (original)
+++ branches/upstream/libpdf-create-perl/current/lib/PDF/Image/GIF.pm Sat Jul 12 15:23:48 2008
@@ -21,7 +21,7 @@
@ISA = qw(Exporter);
@EXPORT = qw();
-$VERSION = 1.00;
+$VERSION = 1.02;
$DEBUG = 0;
sub new {
@@ -380,7 +380,7 @@
}
read $fh, $s, 7;
- ($self->{width}, $self->{height}, $flags, $self->{private}->{background}, $ar) = unpack("SSCCC", $s);
+ ($self->{width}, $self->{height}, $flags, $self->{private}->{background}, $ar) = unpack("vvCCC", $s);
$self->{colormapsize} = 2 << ($flags & 0x07);
$self->{colorspacesize} = 3 * $self->{colormapsize};
@@ -422,7 +422,7 @@
read $fh, $s, 9;
my $x;
- ($x, $c, $self->{width}, $self->{height}, $flags) = unpack("SSSSC", $s);
+ ($x, $c, $self->{width}, $self->{height}, $flags) = unpack("vvvvC", $s);
if ($flags && $INTERLACE) {
$self->{private}->{interlaced} = 1;
More information about the Pkg-perl-cvs-commits
mailing list