mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 04:32:30 +02:00
TAChart: Fix SIGFPE while drawing very narrow slices in 3D pie chart
git-svn-id: trunk@40112 -
This commit is contained in:
parent
271accdd82
commit
eae13b6de2
@ -262,7 +262,7 @@ begin
|
||||
for ps in FSlices do begin
|
||||
if not ps.FVisible then continue;
|
||||
ADrawer.SetBrushParams(bsSolid, SliceColor(ps.FOrigIndex));
|
||||
numSteps := Round(2 * Pi * ps.Angle * FRadius / STEP);
|
||||
numSteps := Max(Round(2 * Pi * ps.Angle * FRadius / STEP), 2);
|
||||
SetLength(p, 2 * numSteps);
|
||||
for i := 0 to numSteps - 1 do begin
|
||||
a := WeightedAverage(ps.FPrevAngle, ps.FNextAngle, i / (numSteps - 1));
|
||||
|
Loading…
Reference in New Issue
Block a user