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

Lincoln Stein lincoln.stein at gmail.com
Fri Aug 25 15:20:21 UTC 2006


Hi Adam,

You want to see a colored box behind the DNA letters? Maybe a new option --
"bgfill" -- to turn on this feature?

Lincoln

On 8/25/06, Adam Sjøgren <adsj at novozymes.com> wrote:
>
>   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
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)
FOR URGENT MESSAGES & SCHEDULING,
PLEASE CONTACT MY ASSISTANT,
SANDRA MICHELSEN, AT michelse at cshl.edu




More information about the Bioperl-l mailing list