Skip Menu |

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 3093
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: adrian.farias [...] telefonica-data.com.mx
peterkioko [...] mail.com
Cc:
AdminCc:

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



Subject: Imager bug w32 Font bounding box
Using Imager v.041 (which I think it's awesome) perl, v5.6.1 built for MSWin32-x86-multi-thread Binary build 635 provided by ActiveState Corp. http://www.ActiveState.com My box: Win 2000 Professional Edition Got an error using the bounding box function, I got this error: Undefined subroutine &Imager::Font::Win32::i_wf_bbox called at C:/Perl/site/lib/Imager/Font/Win32.pm line 18, line 213. My Code: -------------------- use strict; use Imager; use Imager ':handy'; my $font1 = NF(face => 'Arial Bold Italic', size=> 15); my @bbox_data = $font1->bounding_box(string=>"Hello",size=>15); -------------------- I *humbly* modified the Font/Win32.pm module to the following and seems to be working... sub _bounding_box { my ($self, %opts) = @_; return Imager::i_wf_bbox($self->{face}, $opts{size}, $opts{string}); #my @bbox = i_wf_bbox($self->{face}, $opts{size}, $opts{string}); } Thanks for Imager!
[guest - Tue Jul 29 17:45:38 2003]: Show quoted text
> I *humbly* modified the Font/Win32.pm module to the following and > seems to be working... > sub _bounding_box { > my ($self, %opts) = @_; > return Imager::i_wf_bbox($self->{face}, $opts{size}, $opts{string}); > #my @bbox = i_wf_bbox($self->{face}, $opts{size}, $opts{string}); > }
Thanks for reporting this. This problem has been reported before and fixed in current CVS. Tony
Subject: Install bug in cygwin
Hey Arnar, This may actually be a bug in xsubpp. I don't know XS well enough to know. During the compilation process Imager.xsc is created with a "c" syntax error that causes gcc to abort. It appears that when xsubpp converts Imager.xs to Imager.xsc it converts the line "int rc, i;" in the "i_wf_bbox" function (in Imager.xs) to "int rc,;" (in Imager.xsc). This obviously is wrong and causes gcc to die. The exact command is: $> /usr/bin/perl.exe /usr/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.5/ExtUtils/typemap -typemap typemap Imager.xs > Imager.xsc When I manually fix the syntax error in Imager.xsc it continues on just fine. My environment is: cygwin on Windows 2000 Imager 0.43 xsubpp 1.9508 perl 5.8.5 built for cygwin-thread-multi-64int Otherwise, thanks for a great module. I'm finding it very useful. Regards, Peter
From: Tony Cook <tony [...] develop-help.com>
Date: Fri, 10 Sep 2004 12:15:46 +1000
To: Guest via RT <bug-Imager [...] rt.cpan.org>
Subject: Re: [cpan #7602] Install bug in cygwin
RT-Send-Cc:
On Thu, Sep 09, 2004 at 08:04:41PM -0400, Guest via RT wrote: Show quoted text
> > This message about Imager was sent to you by guest <> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=7602 > > > Hey Arnar, > > This may actually be a bug in xsubpp. I don't know XS well enough to know. > > During the compilation process Imager.xsc is created with a "c" syntax error that causes gcc to abort. > > It appears that when xsubpp converts Imager.xs to Imager.xsc it converts the line "int rc, i;" in the "i_wf_bbox" function (in Imager.xs) to "int rc,;" (in Imager.xsc). This obviously is wrong and causes gcc to die.
Actually, this is a bug in Imager.xs, since the declaration is in the arguments area of the function rather then the PREINIT clause. Changing the definition of i_wf_bbox() to: void i_wf_bbox(face, size, text) char *face int size char *text PREINIT: int cords[BOUNDING_BOX_COUNT]; int rc, i; PPCODE: if (rc = i_wf_bbox(face, size, text, strlen(text), cords)) { EXTEND(SP, rc); for (i = 0; i < rc; ++i) PUSHs(sv_2mortal(newSViv(cords[i]))); } fixes the problem. This was fixed in CVS in July, along with some other windows platform bugs. Hopefully there will be a new release soon, since there are a few bugs fixed in CVS. Tony