[Bioperl-l] Bio::Graphics::Glyph::dna and bgcolor

Adam Sjøgren adsj at novozymes.com
Fri Aug 25 13:55:00 UTC 2006


  Hi.


I was wondering whether it could be considered to make
Bio::Graphics::Glyph::dna draw a background colour, if one is set?

I'm not sure what the best way to implement that is, though; here's a
quick shot:

--- Bio/Graphics/Glyph/dna.pm   14 Jun 2006 20:29:43 -0000      1.25
+++ Bio/Graphics/Glyph/dna.pm   24 Aug 2006 17:33:33 -0000
@@ -41,6 +41,11 @@ sub draw_component {
   # workaround for my misreading of interface -- LS
   $dna = $dna->seq if ref($dna) && $dna->can('seq');
 
+  $self->filled_box($gd,
+                    $x1, $y1,
+                    $x2, $y2,
+                    $self->bgcolor, 'transparent') if ($self->bgcolor);
+
   if ($self->dna_fits) {
     $self->draw_dna($gd,$dna,$x1,$y1,$x2,$y2);
   } elsif ($self->do_gc) {

I think bgcolor has a default, so something more elaborate is probably
needed.

Any thoughts? Bad idea, good idea, pointers?


  Best regards,

    Adam

-- 
                                                          Adam Sjøgren
                                                    adsj at novozymes.com




More information about the Bioperl-l mailing list