TeeCreateMetafile and v.2010

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

TeeCreateMetafile and v.2010

Post by johnnix » Tue Oct 05, 2010 9:54 am

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

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

Re: TeeCreateMetafile and v.2010

Post by Narcís » Wed Oct 06, 2010 10:02 am

Hi johnnix,

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

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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: TeeCreateMetafile and v.2010

Post by johnnix » Wed Oct 06, 2010 12:08 pm

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...
Attachments
TestProject.zip
(3.45 KiB) Downloaded 543 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: TeeCreateMetafile and v.2010

Post by Sandra » Wed Oct 06, 2010 3:41 pm

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,
Best Regards,
Sandra Pazos / 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

johnnix
Advanced
Posts: 192
Joined: Tue Jul 10, 2007 12:00 am

Re: TeeCreateMetafile and v.2010

Post by johnnix » Thu Oct 07, 2010 5:03 am

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

Post Reply