Exporting 'themed-charts' to WMF, EMF & BMP

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Exporting 'themed-charts' to WMF, EMF & BMP

Post by Ed » Tue Mar 29, 2005 4:06 pm

Delphi 7, Chart Pro 7.04
When I export a chart to WMF or EMF that is using any theme, I end up getting a black background for the chart:

www.retireneeds.com/files/Chart1.EMF
www.retireneeds.com/files/Chart1.WMF

The exact same chart rendered to a BMP looks like this:

www.retireneeds.com/files/Chart1.BMP

what is the problem with the EMF/WMF exporting that the background of the chart is black? Anyway to fix this?

Thanks
Ed Dressel

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 Mar 29, 2005 4:34 pm

Hi Ed,

I haven't been able to reproduce the problem here.

I have created an example project doing something similar to the images you posted and this works ok using the latest TeeChart sources we have. I'm going to post this example and it's resulting metafile in the [url]news://www.steema.net/steema.public.attachments[/url] newsgroups. I've used some gradients in the walls and also a GridBand tool on the left axis

There may be slight variations between the version you have an mine but none afecting what you reported.

Could you please play with my project if you can reproduce the problem? If so please save and post it at the newsgroups so that I can reproduce the problem here.
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

Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Post by Ed » Tue Mar 29, 2005 5:32 pm

Thanks for the quick response! I sincerely appreciate it. )This has got me a bit stresses as I sold the company on the change and now that I am doing it there may be bugs somewhere).

Your code worked fine. I added the theme support to your demo and the problem reproduced. I posted a reply in the attachment newsgroups altering your source code. Click on a theme and the 'export' button (I added) and look at the Chart.* image files in the directory that the exe file exists in.

If you find the problem, please let me know.

Thanks
Ed Dressel

Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Post by Ed » Tue Mar 29, 2005 8:50 pm

I found that setting the chart.backwall.transparent := true before creating the WMF fixes the problem for all styles but 'Facts', which doesn't want to work not matter why I attempt to do.

Any thoughts?

Ed Dressel

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

Post by Narcís » Wed Mar 30, 2005 7:42 am

Hi Ed,

Thanks for modifying my project.

The problem is with gridbandtool transparency. After using "Facts" theme the transparency is not reset to 0. Obviously wmf/emf does not support "transparent" brush styles (custom Alpha values).

You'll get the same results with all objects, if transparency is not 0, for example: add a TAnnotation tool to chart, set transparency to 50 and annotation tool back color to clBlack. When exported, transparency will be ignored and only black annotation rectangle will be shown.

Some workarounds could be:

- Using different export format (jpeg, png).
- Setting transparency to 0 before exporting.
- In "Facts" case : set GridBandTool (both stripes) transparency to 0.
Example:

Code: Select all

      Band1.Color = clSilver
      Band2.Color = clWhite
This can be done at design time via editor or at runtime via code. Or event at Facts theme level, in code, in ApplyTheme method call.

I have already added your request to our list to be considered for inclusion in future releases.
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

Ed
Newbie
Newbie
Posts: 33
Joined: Tue Mar 09, 2004 5:00 am
Location: Oregon, USA
Contact:

Post by Ed » Wed Mar 30, 2005 4:42 pm

>I have already added your request to our list to be considered for inclusion in future releases.

Thanks for the timely response.

Just a point of clarification--is this seen as a bug or a feature request? I see it as a bug. Please comment.

Ed Dressel

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

Post by Narcís » Thu Mar 31, 2005 7:37 am

Hi Ed,

A missing feature because transparent brushes are not that easy to handle in metafile. In the end, it's just a classification name, so it can also be considered a bug, but fixing/implementing it is not an easy task.
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