mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:21:04 +02:00
TAChart: Fix division by zero in legend drawing
git-svn-id: trunk@29726 -
This commit is contained in:
parent
f72b27556b
commit
b87ff3d4df
@ -348,13 +348,14 @@ var
|
|||||||
i, itemHeight: Integer;
|
i, itemHeight: Integer;
|
||||||
r: TRect;
|
r: TRect;
|
||||||
begin
|
begin
|
||||||
try
|
// Draw the background and the border.
|
||||||
// Draw the background and the border.
|
ADrawer.Font := Font;
|
||||||
ADrawer.Font := Font;
|
ADrawer.Brush := BackgroundBrush;
|
||||||
ADrawer.Brush := BackgroundBrush;
|
ADrawer.Pen := Frame;
|
||||||
ADrawer.Pen := Frame;
|
ADrawer.Rectangle(ABounds);
|
||||||
ADrawer.Rectangle(ABounds);
|
if AItems.Count = 0 then exit;
|
||||||
|
|
||||||
|
try
|
||||||
r := ABounds;
|
r := ABounds;
|
||||||
r.Right -= 1;
|
r.Right -= 1;
|
||||||
ADrawer.ClippingStart(r);
|
ADrawer.ClippingStart(r);
|
||||||
|
Loading…
Reference in New Issue
Block a user