Page 1 of 2

transparent series to metafiles

Posted: Tue Nov 08, 2005 12:10 am
by 9338026
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

Posted: Tue Nov 08, 2005 12:47 pm
by narcis
Hi Dave,

Yes, this is a known problem already listed to be fixed for future releases.

Posted: Mon Dec 05, 2005 7:59 pm
by 9338026
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.

Posted: Fri Dec 09, 2005 8:50 pm
by Pep
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.

Posted: Sun Dec 11, 2005 4:39 am
by 9338026
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 :-)

Posted: Wed Sep 17, 2008 5:11 pm
by 10047094
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.

Posted: Fri Sep 19, 2008 9:33 am
by 9343260
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.

Posted: Sat Sep 20, 2008 6:40 am
by 10547355
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.

Posted: Mon Sep 22, 2008 10:44 am
by Pep
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.

Posted: Mon Sep 22, 2008 2:44 pm
by 10047094
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...

Posted: Wed Sep 24, 2008 9:12 am
by 9343260
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).

Posted: Mon Sep 29, 2008 9:28 am
by Pep
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).

Re: transparent series to metafiles

Posted: Wed Jun 30, 2010 7:16 am
by 9343260
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

Re: transparent series to metafiles

Posted: Wed Jun 30, 2010 7:26 am
by narcis
Hi bertrod,

Unfortunately not. We have done some investigation but haven't found the way to support transparency with Metafiles.

Re: transparent series to metafiles

Posted: Tue May 28, 2013 12:29 pm
by 10555332
Hello,

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

Thanks