Hello.
We are using TeeChart Pro 2014 together with Report Builder 15.02 in Delphi 7.
Digital Metaphors told me, that they only call an internal TeeChart routine to export the chart to a metafile image and then display that image on the report.
When using gradients within the chart, the metafile image looks quite horrible.
We just updated from TeeChart Pro 7.06 to 2014. The metafile image generated by the old TeeChart version looked pretty ok.
Regards
Ugly metafile image when using gradients
-
- Newbie
- Posts: 9
- Joined: Fri Dec 21, 2012 12:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Ugly metafile image when using gradients
Hello,
This is a GDI+ bug with gradients (ID562). If you sign up to Steema Software's bugzilla system, you'll be able to receive automatic updates. The GDI+ canvas was set as the default canvas in May 2013 release (see version info page) for aesthetic purposes as it offers superior rendering but GDI is faster than GDI+ so is still preferable in some scenarios.
A workaround to the problem is using the GDI canvas for the export:
Does using GDI canvas for the export works fine for you? Is it available in Report Builder?
This is a GDI+ bug with gradients (ID562). If you sign up to Steema Software's bugzilla system, you'll be able to receive automatic updates. The GDI+ canvas was set as the default canvas in May 2013 release (see version info page) for aesthetic purposes as it offers superior rendering but GDI is faster than GDI+ so is still preferable in some scenarios.
A workaround to the problem is using the GDI canvas for the export:
Code: Select all
uses TeCanvas;
procedure TForm1.Button1Click(Sender: TObject);
begin
Chart1.Canvas:=TTeeCanvas3D.Create;
Image1.Picture.Graphic := Chart1.TeeCreateMetafile(True, Rect(0, 0,
Chart1.Width, Chart1.Height));
Chart1.Canvas:=TGDIPlusCanvas.Create;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 9
- Joined: Fri Dec 21, 2012 12:00 am
Re: Ugly metafile image when using gradients
Hello,
Using GDI instead of GDI+ looks indeed a lot better in this case.
I have no idea about Report Builder, but I just sent them a mail.
Can you tell me how to check at runtime whether the gradient is active or not?
Regards
Using GDI instead of GDI+ looks indeed a lot better in this case.
I have no idea about Report Builder, but I just sent them a mail.
Can you tell me how to check at runtime whether the gradient is active or not?
Regards
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Ugly metafile image when using gradients
Hello,
Thanks for your feedback, I'm glad to hear that.DeskCenter wrote: Using GDI instead of GDI+ looks indeed a lot better in this case.
They should be aware of that. They brought the issue to me earlier this month. That's why I created the bugzilla ticket. I also told them about the workaround.DeskCenter wrote: I have no idea about Report Builder, but I just sent them a mail.
Yes, you should use TPieSeries.Gradient.Visible property, for example:DeskCenter wrote: Can you tell me how to check at runtime whether the gradient is active or not?
Code: Select all
if Series1.Gradient.Visible then
begin
//Use GDI canvas to export
end
else
begin
//Use GDI+ canvas to export
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 9
- Joined: Fri Dec 21, 2012 12:00 am
Re: Ugly metafile image when using gradients
Hello,
Thanks for the example code, that was exactly what I was looking for.
I'll stay in touch with Report Builder to get around this bug.
Thanks for your help.
Regards.
Thanks for the example code, that was exactly what I was looking for.
I'll stay in touch with Report Builder to get around this bug.
Thanks for your help.
Regards.