[Bioperl-l] GD::SVG

Todd Harris harris at cshl.edu
Mon Mar 8 20:14:54 EST 2004


Hi Haibo - 

The problem you are seeing is due to how GD::SVG mimics the interface of GD
in order to generate SVG.  The "Can't locate object method "formatting" via
package "GD::Font" (perhaps you..." error is because you aren't working with
GD (or GD::Font) objects anymore.  Instead, try passing a string for your
key_font:

      -key_font => 'gdLargeFont',

It's admittedly not an ideal solution, but GD::SVG will know what to do.
Thanks for bringing this up, and I'll make a note in the documentation to
address this issue.

Todd



> On 3/8/04 4:48 PM, hz5 at njit.edu wrote:

> Dear friends,
> 
> I've successfully rendered multiple panels into png image using GD module and
> bioperl panel object. Now I am trying to make the picture quality higher. So I
> tried to use GD::SVG like this:
> 
>       my $panel = Bio::Graphics::Panel->new(
>                                     #-segment    => $whole_seq,
>                                     -start      => $s-1000,
>                                     -end        => $t+1000,
>                                     #-grid       => 'true',
>                                     -key_style  => 'bottom',
>                                     -key_font => GD::Font->Large(),
>                                     -width      => $width,
>                                     -pad_left   => 10,
>                                     -pad_right  => 10,
>                                     -pad_bottom => 10,
>                                     -image_class=> 'GD::SVG',
>                                     -spacing    => 1*$ratio,
>                                    );
> 
>         ......
> 
>       open (OUT, ">my.svg");
>       binmode OUT;
>       print OUT $panel->svg();
> 
> Now I get the following message:
> Can't locate object method "formatting" via package "GD::Font" (perhaps you
> forgot to load "GD::Font"?) at /usr/lib/perl5/site_perl/5.6.1/GD/SVG.pm line
> 702, <DATA> line 191.
> 
> don't know why, thanks in advance for your help!
> haibo
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
> 



More information about the Bioperl-l mailing list