Your message dated Wed, 25 May 2022 21:44:07 +0200
with message-id <Yo6HB8HoAmjDc5s2@charbon>
and subject line bugs triage
has caused the Debian Bug report #489184,
regarding libgd-graph-perl: GD::Graph::pie "3D" rendering bugs
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
489184: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489184
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libgd-graph-perl
Version: 1.44-3
Tags: patch
GD::Graph::pie has a crude 3D effect enabled by default, but the
rendering of the Z direction is fragile; it fails to fill the correct
colors in several corner cases. I'm attaching a patch to fix these,
plus a test script. Of the 10 png files the script outputs to $TMPDIR,
the only correct one without my patch is test_08.png.
--
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
diff -u'rNx*~' GDGraph-1.44_01/Graph/pie.pm GDGraph-working/Graph/pie.pm
--- GDGraph-1.44_01/Graph/pie.pm 2007-05-01 23:06:32.000000000 -0500
+++ GDGraph-working/Graph/pie.pm 2008-07-03 13:56:56.000000000 -0500
@@ -289,6 +289,8 @@
for (my $i = 0; $i < @values; $i++)
{
+ next unless $values[$i];
+
# Set the data colour
my $dc = $self->set_clr_uniq($self->pick_data_clr($i + 1));
@@ -400,7 +402,7 @@
# Ah, but if this wraps all the way around the back
# then both pieces of the front need to be filled.
# sbonds.
- if ($pa > $pb )
+ if ($pa >= $pb)
{
# This takes care of the left bit on the front
# Since we know exactly where we are, and in which
@@ -436,9 +438,8 @@
}
elsif ( # both in back, but wrapping around the front
# CONTRIB kedlubnowski, Dan Rosendorf
- $pa > 90 && $pb > 90 && $pa >= $pb
- or $pa < -90 && $pb < -90 && $pa >= $pb
- or $pa < -90 && $pb > 90
+ $pa >= $pb && ($pa < 0 || $pb > 0)
+ or $pa < 0 && $pb > 0
)
{
$pa=$ANGLE_OFFSET - 180;
#!/usr/bin/perl -w
use GD::Graph::pie;
my $fileN = 1;
sub output {
my $filename = sprintf '%s/test_%02d.png', $ENV{TMPDIR}||'/tmp', $fileN++;
open my $out, '>', $filename;
print $out shift->png;
close $out;
print "$filename\n";
}
my $pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => 45);
output $pie->plot([['100%, angled'], [1]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => 90);
output $pie->plot([['100%, horiz. left'], [1]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['100%, horiz. right'], [1]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['100%, 0%', ''], [1, 0]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['99%', '1%'], [99, 1]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => 90);
output $pie->plot([['50%', '50%'], [50, 50]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['50%', '50%'], [50, 50]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['25%', '25%', '50%'], [25, 25, 50]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['50%', '25%', '25%'], [50, 25, 25]]);
$pie = GD::Graph::pie->new(450, 300);
$pie->set(start_angle => -90);
output $pie->plot([['50%', '15%', '20%', '15%'], [50, 15, 20, 15]]);
--- End Message ---
--- Begin Message ---
Version: 1.54~ds-2
Hello,
as far as I could witness, the test pie charts are looking good
since buster, possibly even a little earlier given the comment
in the BTS about version 1.49[1], so I believe the issue can be
closed.
[1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=489184#20
Have a nice day, :)
--
Étienne Mollier <[email protected]>
Fingerprint: 8f91 b227 c7d6 f2b1 948c 8236 793c f67e 8f0d 11da
Sent from my alarm clock.
signature.asc
Description: PGP signature
--- End Message ---