Skip Menu |

This queue is for tickets about the GDGraph CPAN distribution.

Maintainer(s)' notes

There are plenty of good ideas of what people can do published here on the queue. Turning a patch from the tracker into a pull request is not one of them. In order to get maintainers' attention way more quickier, PR should have at least a sample included. We know it's hard to test images generating software, but it doesn't mean we can not test numbers produced by intermediate algorithms used to generate these images, so either a test or a sample.

Report information
The Basics
Id: 59477
Status: open
Priority: 0/
Queue: GDGraph

People
Owner: Nobody in particular
Requestors: eric [...] eb.homelinux.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.44_01
Fixed in: (no value)



Subject: [PATCH] Add shadow to 3d pie
Hello, This is a very simple patch to add shadow to 3d pie, with this modification, they really look in 3d (see examples). The patch applies to the latest version. Bye
Subject: with.png
Download with.png
image/png 2.7k
with.png
Subject: add_shadow_pie3d.patch
--- GD/Graph/pie.pm.org 2010-07-17 15:33:05.000000000 +0200 +++ GD/Graph/pie.pm 2010-07-17 15:41:10.000000000 +0200 @@ -54,6 +54,24 @@ axislabelclr => 'black', ); +# ---------------------------------------------------------- +# Sub: _darken +# +# Args: $r, $g, $b +# $r, $g, $b The Red, Green, and Blue components of a color +# +# Description: Darkens the color by adding black +sub _darken { + my( $r, $g, $b ) = @_; + my $p = ($r + $g + $b) / 70; + $p = 3 if $p < 3; + my $f = _max( $r / $p, _max( $g / $p, $b / $p) ); + $r = _max( 0, int( $r - $f ) ); + $g = _max( 0, int( $g - $f ) ); + $b = _max( 0, int( $b - $f ) ); + return( $r, $g, $b ); +} # end _darken + # PRIVATE sub _has_default { my $self = shift; @@ -292,6 +310,7 @@ # different way. if ($self->{'3d'}) { + my $dc_dark = $self->set_clr(_darken($self->pick_data_clr($i + 1))); foreach my $fill ($self->_get_pie_front_coords($pa, $pb)) { my ($fx,$fy) = @$fill; @@ -300,7 +319,7 @@ # looking for a gap to fill while ( $new_y > $fy ) { if ($self->{graph}->getPixel($fx,$new_y) != $ac) { - $self->{graph}->fillToBorder($fx, $new_y, $ac, $dc); + $self->{graph}->fillToBorder($fx, $new_y, $ac, $dc_dark); last; } } continue { $new_y-- }
Subject: without.png
Download without.png
image/png 2.5k
without.png
Subject: New GD::Graph co-maintainer and new release on CPAN
Hello, You recieved this message as you filed a bug report or feature request against GD::Graph module on CPAN. My name is Ruslan and I'm new co-maintainer of the module. I've updated the module to 1.45 with doc changes and released it to CPAN. See distribution status [1]. I have TODO list for several releases, so if your ticket was a patch then turning it into a nice pull request may expedite inclusion :) [1] http://search.cpan.org/~ruz/GDGraph-1.45/Graph.pm#DISTRIBUTION_STATUS -- Best regards, Ruslan.