transparent series to metafiles

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
David Novo
Newbie
Newbie
Posts: 71
Joined: Fri Jul 02, 2004 4:00 am
Location: Culver City
Contact:

transparent series to metafiles

Post by David Novo » Tue Nov 08, 2005 12:10 am

Hello,

I have charts with transparent series . Whenever I try to get a metafile using teeCreateMetafile, the series are not transparent in the metafile. Is there something I am missing?

-Dave

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 Nov 08, 2005 12:47 pm

Hi Dave,

Yes, this is a known problem already listed to be fixed for 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

David Novo
Newbie
Newbie
Posts: 71
Joined: Fri Jul 02, 2004 4:00 am
Location: Culver City
Contact:

Post by David Novo » Mon Dec 05, 2005 7:59 pm

Hi Narcis,

If you can point our where the root of the problem lies, we will be glad to investigate it. I assume that some canvas brush properties are not being set up properly to work with metafiles. We have already modified the tchart source quite extensively, and will be glad to fix the problem and send the modifications to you, if you can point us in the right direction. The drawing code is quite complex, and it will take us a while to wade through it. If you have done any research in the matter, it would be much appreciated.

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Fri Dec 09, 2005 8:50 pm

Hi David,

really is not a problem (bug), rather a missing feature, for the moment Transparency is not supported exporting to metafile. It is on our wish list, but we've not investigated about it. I've marked this feature to get priority so we can try to add it for the next TeeChart release.

David Novo
Newbie
Newbie
Posts: 71
Joined: Fri Jul 02, 2004 4:00 am
Location: Culver City
Contact:

Post by David Novo » Sun Dec 11, 2005 4:39 am

Thank you so much. We depend on metafiles to get resolution independent graphing, and we were very suprised to find out that the only feature we ever found that did not render properly to metafiles was the transparency :-)

dave novo
Newbie
Newbie
Posts: 25
Joined: Tue Oct 23, 2007 12:00 am

Post by dave novo » Wed Sep 17, 2008 5:11 pm

Hello,

Its a few years later now, and I am wondering if this has received any attention. The latest TChart release (8.02) still does not render metafiles transparently.

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Fri Sep 19, 2008 9:33 am

I agree, this is an important point.

I think many users are waiting for this feature. e.g. we are using Metafile for printing and exporting charts, and it's always annoying to explain to customers that transparency is not supported.

Kevin
Newbie
Newbie
Posts: 6
Joined: Tue Nov 13, 2007 12:00 am

Post by Kevin » Sat Sep 20, 2008 6:40 am

Some of our graphs depend on transparency and therefore look bad when we export using metafiles. For me this is also an important issue to fix.

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 22, 2008 10:44 am

Hello,

the latest TeeChart Pro sources does still not allowing to export to metafile with transparency automatically, but you should be able to do it by using the following code :

Code: Select all

procedure TForm1.BitBtn2Click(Sender: TObject);
var
  Metafile: TMetafile;
  MetaCanvas: TMetafileCanvas;
  Bitmap: TBMPExportFormat;
begin
  Metafile := TMetaFile.Create;
  try
     bitmap:= TBMPExportFormat.Create;
     bitmap.Panel:=Chart1;

     try
        Metafile.Height := Bitmap.Height;
        Metafile.Width  := Bitmap.Width;
        MetaCanvas := TMetafileCanvas.Create(Metafile, 0);
        try
           MetaCanvas.Draw(0, 0, Bitmap.Bitmap);
        finally
           MetaCanvas.Free;
        end;
     finally
        Bitmap.Free;
     end;

     Metafile.SaveToFile('E:\tmp\Chart1EMF2.emf');

  finally
    Metafile.Free;
  end;
end;
Let me know if you still having difficulties getting a metafile with transparency.

dave novo
Newbie
Newbie
Posts: 25
Joined: Tue Oct 23, 2007 12:00 am

Post by dave novo » Mon Sep 22, 2008 2:44 pm

Hello,

Will this not just embed a bitmap inside a metafile? In that case, it will have the same problems scaling as a bitmap has...

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Post by bertrod » Wed Sep 24, 2008 9:12 am

I tried your solution Pep for printing, and I have transparency, but the quality is not as good as metafile (due to the bitmap I guess).

Pep
Site Admin
Site Admin
Posts: 3301
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Sep 29, 2008 9:28 am

Hello,

yes, as it uses a internal bmp to be used in metafile. I'm afraid there's not another way for the moment. We'll try to add this feature for further releases (posted as priority request).

bertrod
Advanced
Posts: 151
Joined: Wed Sep 07, 2005 4:00 am

Re: transparent series to metafiles

Post by bertrod » Wed Jun 30, 2010 7:16 am

Hello,

I see that there are a few topics about the Transparency with metafiles. I wanted to know if there has been some improvement in the release VCL 2010 to handle transparency in metafiles ?

Thanks

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

Re: transparent series to metafiles

Post by Narcís » Wed Jun 30, 2010 7:26 am

Hi bertrod,

Unfortunately not. We have done some investigation but haven't found the way to support transparency with Metafiles.
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

kArTuS
Newbie
Newbie
Posts: 1
Joined: Tue Mar 02, 2010 12:00 am

Re: transparent series to metafiles

Post by kArTuS » Tue May 28, 2013 12:29 pm

Hello,

I wanted to know if some improvements concerning transparency support in metafiles are scheduled ?

Thanks

Post Reply