problem with metafile (TChart 8 Prof.)

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Cogito
Newbie
Newbie
Posts: 17
Joined: Fri Feb 06, 2009 12:00 am

problem with metafile (TChart 8 Prof.)

Post by Cogito » 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:

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;
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]
Last edited by Cogito on Tue Feb 10, 2009 2:51 pm, edited 1 time in total.

Cogito
Newbie
Newbie
Posts: 17
Joined: Fri Feb 06, 2009 12:00 am

Post by Cogito » Tue Feb 10, 2009 12:52 pm

Could really nobody help me? Has nobody problems with the conversion of metafile graphics?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Feb 10, 2009 3:11 pm

Hi Cogito,

Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply