Skip Menu |
 

This queue is for tickets about the PDF-Report CPAN distribution.

Report information
The Basics
Id: 18992
Status: resolved
Priority: 0/
Queue: PDF-Report

People
Owner: Nobody in particular
Requestors: gregor+debian [...] comodo.priv.at
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.30
Fixed in: (no value)

Attachments


Subject: addImgScaled() method ignores $scale parameter
Download (untitled) / with headers
text/plain 425b
The addImgScaled() method disregards the scaling parameter and just passes its args to the regular addImg() method. This bug was originally reported against the Debian package by David Pottage; cf. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=365471 Find attached a patch by David that fixes this problem. Please consider incorporating the patch in future releases. Kind regards, Gregor Herrmann (Debian Perl Group)
Subject: PATCH_Report.pm
Download PATCH_Report.pm
text/x-perl 1k
--- Report.pm 2006-03-18 18:52:27.000000000 +0000 +++ FIXED_Report.pm 2006-04-30 11:17:00.000000000 +0100 @@ -580,6 +580,18 @@ sub addImg { my ( $self, $file, $x, $y ) = @_; + $self->addImgScaled($file, $x, $y, 1); +} + +=item $pdf->addImgScaled($file, $x, $y, $scale); + +Add image $file to the current page at position ($x, $y) scaled to $scale. + +=cut + +sub addImgScaled { + my ( $self, $file, $x, $y, $scale ) = @_; + my %type = (jpeg => "jpeg", jpg => "jpeg", tif => "tiff", @@ -596,24 +608,7 @@ my $img = $self->{pdf}->$sub($file); my $gfx = $self->{page}->gfx; - $gfx->image($img, $x, $y); -} - -=item $pdf->addImgScaled($file, $x, $y, $scale); - -Add image $file to the current page at position ($x, $y) scaled to $scale. - -=cut - -sub addImgScaled { - my ( $self, $file, $x, $y, $scale ) = @_; - -# my $img = $self->{pdf}->image($file); -# my $gfx = $self->{page}->gfx; - -# $gfx->image($img, $x, $y, $scale); - - $self->addImg($file, $x, $y); + $gfx->image($img, $x, $y, $scale); } =item $pdf->setGfxLineWidth($width);
Fixed in 1.32


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.