Opened 14 years ago

Closed 13 years ago

#3232 closed defect (fixed)

Rounding problem when rendering pie charts with GD

Reported by: tamas Owned by: sdlime
Priority: normal Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: dmorissette

Description

I've run into an issue when rendering a pie chart with the following values:

value1 = 89334182.007166 --> color:blue value2 = 521709.219345 --> color:red value3 = 28923.37647 --> color:yellow

the whole pie is rendered as yellow which is incorrect in this case.

Further information:

This problem is related to the following lines in mapchart.c (ln 277)

angle*=360.0/dTotal; When rendering value3 angle=0.11584176 therefore gdImageFilledArc gots the same value of '(int)start' and '(int)(start+angle)' and redraws the chart with yellow color.

Change History (2)

comment:1 by tamas, 14 years ago

Cc: dmorissette added

comment:2 by tbonfort, 13 years ago

Resolution: fixed
Status: newclosed

should be fixed with the new rendering pipeline (we don't use gdImageArc anymore)

Note: See TracTickets for help on using tickets.