Page 1 of 1

problem with metafile (TChart 8 Prof.)

Posted: Mon Feb 09, 2009 12:59 pm
by 10051657
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]

Posted: Tue Feb 10, 2009 12:52 pm
by 10051657
Could really nobody help me? Has nobody problems with the conversion of metafile graphics?

Posted: Tue Feb 10, 2009 3:11 pm
by narcis
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.