TAChart: Fix division by zero in legend drawing

git-svn-id: trunk@29726 -
This commit is contained in:
ask 2011-03-04 11:04:43 +00:00
parent f72b27556b
commit b87ff3d4df

View File

@ -348,13 +348,14 @@ var
i, itemHeight: Integer;
r: TRect;
begin
try
// Draw the background and the border.
ADrawer.Font := Font;
ADrawer.Brush := BackgroundBrush;
ADrawer.Pen := Frame;
ADrawer.Rectangle(ABounds);
// Draw the background and the border.
ADrawer.Font := Font;
ADrawer.Brush := BackgroundBrush;
ADrawer.Pen := Frame;
ADrawer.Rectangle(ABounds);
if AItems.Count = 0 then exit;
try
r := ABounds;
r.Right -= 1;
ADrawer.ClippingStart(r);