Page 1 of 1

TeeCreateMetafile and v.2010

Posted: Tue Oct 05, 2010 9:54 am
by 10046032
Hello,

I use v.2010 with Delphi XE. I noticed that when TTeeGDIPlus component is assigned to chart (having the Active property set to true) the TeeCreateMetafile gives a result that I do not like. Setting the TTeeGDIPlus.Active to false gives me the metafile I got with earlier versions of TeeChart and this is ok. My problem is that I have lots of TChart components on my app and I use the following code: var charts: array[0..100] of TChart
begin
for i := 0 to high(charts) do
charts.Canvas := TGDIPlusCanvas.Create;
end;

...what code should I use analog to TTeeGDIPlus.Active? Using (TChart.Canvas as TGDIPLusCanvas).AntiAlias := false does not do the trick (I mean the metafile is still ugly).

Regards

Re: TeeCreateMetafile and v.2010

Posted: Wed Oct 06, 2010 10:02 am
by narcis
Hi johnnix,

Can you please attach a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Re: TeeCreateMetafile and v.2010

Posted: Wed Oct 06, 2010 12:08 pm
by 10046032
Hello Narcis,

Here it is.... If you enable / dissable GDI+ at the left chart you will notice that the grid lines are drawn correctly when TeeGDIPLus.Active is false. I cannot reproduce this behavior for the right axis provided the fact that I need to set the canvas as suggested by Yeray here http://www.teechart.net/support/viewtop ... =3&t=11608

Thank you...

Re: TeeCreateMetafile and v.2010

Posted: Wed Oct 06, 2010 3:41 pm
by 10050769
Hello johnix,

I could reproduce your problem and I have added your request in wish-list with number [TV52015191]to regards in features versions of TeeChart VCL.

On the other hand, could you please, tell us if you need use Image Metafile (vector format) obligatory or you could work with other types of images (raster format)? So we can try to find a workaround for you.

Thanks,

Re: TeeCreateMetafile and v.2010

Posted: Thu Oct 07, 2010 5:03 am
by 10046032
Hello Sandra,

Thank you very much for your reply. This is exactly what I am trying to do :) I use TChart and FastReports extensively in my apps and over the years I found out that the best way (for me) to present a chart inside a report is to use a TMetafile which appears perfect, regardless the zoom level inside the report. Now that I have 2010 I tested it with AntiAlias enabled and I have 2 issues, one with the metafile (the grid lines appear ugly) and second if I use a raster like bitmap the plot look good but if I zoom in on a page it begins to look bad (dithered etc). So I decided to provide my users 2 ways to present plots on the reports, a non AntiAliazed and AntiAlized :) So now you know why I need to completely disable TGDIPlus canvas from code!

Regards