problem with metafile (TChart 8 Prof.)
Posted: Mon Feb 09, 2009 12:59 pm
Hi,
I use your TDBChart component as a third party component in a report tool. To make it possible for third party components to draw themselves, an OnDraw event exists. I have implemented this event as follows:
It is the problem now that everything is represented completely illegibly. No more axis markings are represented either. Do I make anything wrong? Can anybody help me?
Thanks in advance!
Uwe[/code]
I use your TDBChart component as a third party component in a report tool. To make it possible for third party components to draw themselves, an OnDraw event exists. I have implemented this event as follows:
Code: Select all
procedure TForm1.Ll14XObjectDraw(Sender: TObject; Canvas: TCanvas;
Rect: TRect; IsDesignMode: Boolean; var IsFinished: Boolean);
var
realRect: TRect;
meta: TMetafile;
begin
realRect.Left := 0;
realRect.Top := 0;
realRect.Right := realRect.Left+(Rect.Right-Rect.Left);
realRect.Bottom := realRect.Top+(Rect.Bottom-Rect.Top);
meta := MyDBChart.TeeCreateMetafile(true, realRect);
try
Canvas.StretchDraw(Rect, meta);
finally
meta.Free;
end;
end;
Thanks in advance!
Uwe[/code]