Skip Menu |
 

This queue is for tickets about the Bio-Graphics CPAN distribution.

Report information
The Basics
Id: 71649
Status: new
Priority: 0/
Queue: Bio-Graphics

People
Owner: Nobody in particular
Requestors: florent.angly [...] gmail.com
Cc:
AdminCc:

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



Subject: bgcolor not respected in SVGs when linewidth > 1
Download (untitled) / with headers
text/plain 421b
Hi, When drawing SVG images, the bgcolor of generic glyphs (and possibly others) does not seem to be respected when linewidth is larger than 1. I have attached a script to reproduce the problem and the results I get from it. Notice in the SVG image that the lines that make the box in the bottom right corner are brown instead of the color specified, black. The expected output is shown in the PNG file. Best, Florent
Subject: test.pl
Download test.pl
text/x-perl 1.3k
#! /usr/bin/perl use strict; use warnings; use Bio::Graphics; use Bio::SeqFeature::Generic; my @formats = ('png', 'svg'); for my $format (@formats) { print "Creating an $format plot\n"; plot($format); } sub plot { my ($format) = @_; my $image_class = 'GD'; if ($format eq 'svg') { $image_class .= '::'.uc($format); } my $panel = Bio::Graphics::Panel->new( -length => 2000, -width => 200, -image_class => $image_class, ); my $function_feat = Bio::SeqFeature::Generic->new( -display_name => 'Unknown', -start => 100, -end => 700, ); $panel->add_track( $function_feat, -glyph => 'generic', -label => 1, -description => 1, -linewidth => 1, -bgcolor => 'white', -fgcolor => 'black', ); $function_feat = Bio::SeqFeature::Generic->new( -display_name => 'Assigned', -start => 1000, -end => 1600, ); $panel->add_track( $function_feat, -glyph => 'generic', -label => 1, -description => 1, -linewidth => 4, -bgcolor => 'white', -fgcolor => 'black', ); my $file = "output.$format"; open my $fh, '>', $file or die "Error: Could not write file $file\n$!\n"; print $fh $panel->$format; close $fh; $panel->finished; }
Subject: output.png
Download output.png
image/png 916b
output.png
Subject: output.svg
Download output.svg
image/svg+xml 1.2k
output.svg


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.