TAChart: Fix wmf drawer ignoring size of destination rectangle (see http://forum.lazarus.freepascal.org/index.php/topic,25972.msg158712.html).

git-svn-id: trunk@46346 -
This commit is contained in:
wp 2014-09-29 15:47:26 +00:00
parent 38a1473ed5
commit afebfc0820

View File

@ -119,6 +119,9 @@ end;
procedure TWindowsMetafileDrawer.DrawingBegin(const ABoundingBox: TRect);
begin
inherited DrawingBegin(ABoundingBox);
FreeAndNil(FCanvas);
FMetafile.Width := ABoundingBox.Right - ABoundingBox.Left;
FMetafile.Height := ABoundingBox.Bottom - ABoundingBox.Top;
if FCanvas = nil then
FCanvas := TMetafileCanvas.Create(FMetafile, 0);
end;