[Bioperl-l] BioSVG [ Was ABI file parsing]

Lincoln Stein lstein@cshl.org
Tue, 7 May 2002 11:36:33 -0400


Hi Malay,

Maybe Pastel is what I've been looking for all this time.

What other formats does Pastel support?  To replace the web-browsing aspects 
of Bio::Graphics it must support PNG, JPG and/or GIF.

Where do I read about Pastel?

Lincoln


On Thursday 02 May 2002 09:36, you wrote:
> Hi Dr Stein:
> > Since Bio::Graphics already works very nicely
> > hand-in-hand with
> > BioPerl annotation objects and there is a web-based
> > browser and other
> > application software based on it, could I suggest
> > that you have a look
> > at creating a format-independent graphics layer that
> > can be used by
> > Bio::Graphics and your code to draw on top of either
> > GD or SVG at the
> > switch of a software toggle?
>
> Pastel is a format independent graphics layer that
> just happens to generate SVG.
>
> There is a quick way I can think of that can be done.
> Replace all the GD call with Pastel call so that
> Bio::Graphics generates SVG.
>
> Here is the pseudocode
>
> User file:
>
> use Bio::Graphics::Chromatogram;
> $ch =
> Bio::Graphics::Chromatogram->new(width...height...etc);
>
> $ch->set_trace(@a);
>
>
> $ch->draw(-format=>SVG/PNG/PDF);
>
> In Bio::Graphics::Chromatogram:
>
> use Pastel;
> use GD;
>
> sub draw{
>   if $param =~ /SVG/i draw_svg();
>   if $param =~ /PNG/i draw_png();
> }
>
>
> draw_svg {
>   ...
>   $g = Pastel::Graphics->new();
>   $g->draw_polyline(@a);
> }
>
> draw_png {
>   $g = new GD...
>   $g->draw....
> }
>
> What you do think?
>
> -Malay
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l