Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 166 - [TV52013895] It seems that shadow's transparency of the annotation tool isn't expo...
Summary: [TV52013895] It seems that shadow's transparency of the annotation tool isn't...
Status: IN_PROGRESS
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Chart (show other bugs)
Version: unspecified
Hardware: All All
: Normal enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 11:02 EST by yeray alonso
Modified: 2015-05-20 12:09 EDT (History)
2 users (show)

See Also:
Chart Series: ---
Delphi / C++ Builder RAD IDE Version:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yeray alonso 2013-11-20 10:01:20 EST
It seems that shadow's transparency of the annotation tool isn't exported well. There may be a problem with smoth's transparency
forums topic:
http://www.teechart.net/support/viewtopic.php?p=38046

In addition, the bar series shadow is exported well only to jpeg, not for png and gif.
forum topic:
http://www.teechart.net/support/viewtopic.php?f=3&t=10784
It could be related with transparency exportation (and maybe also with gradients).
Here is a test:
uses series, teepng, teejpeg, JPEG, TeeGIF, GIFImage, TeeBmpOptions;
procedure TForm1.FormCreate(Sender: TObject);
var Series1: TBarSeries;
    tmpBitmap:TBitmap;
    Metafile: TMetafile;
    MetaCanvas: TMetafileCanvas;
    Bitmap: TBMPExportFormat;
begin
  //Chart Setup
  Chart1.View3D:=false;
  Series1:=Chart1.AddSeries(TBarSeries.Create(self)) as TBarSeries;
  Series1.Shadow.HorizSize:=5;
  Series1.Shadow.VertSize:=-5;
  Series1.Transparency:=50;
  Series1.FillSampleValues(5);
  //BMP
  Chart1.SaveToBitmapFile('C:\Users\admin\Desktop\test.bmp');
  //GIF
  With TGIFImage.Create do
  begin
    Assign(Chart1.TeeCreateBitmap(Chart1.Color,Rect(0,0,Chart1.Width,Chart1.Height)));
    SaveToFile('C:\Users\admin\Desktop\test.gif');
    Free;
  end;
  //JPG
  tmpBitmap:=TBitmap.Create;
  tmpBitmap.Width :=Chart1.Width;
  tmpBitmap.Height:=Chart1.Height;
  Chart1.Draw(tmpBitmap.Canvas,Rect(0,0,tmpBitmap.Width,tmpBitmap.Height));
  with TJPEGImage.Create do
  begin
    Assign(tmpBitmap);
    SaveToFile('C:\Users\admin\Desktop\test.jpg');
    Free;
  end;
  //metafile
  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('C:\Users\admin\Desktop\test.emf');
  finally
    Metafile.Free;
  end;
end; [created:2009-02-25T11:02:32.000+01:00 reported by:yeray@steema.com reported in version:8.04 (TeeChart VCL)]
Comment 1 david berneda 2015-05-20 12:09:08 EDT
PNG is exporting fine with current release.

GIF (in TeeGIF implementation9 supports 256 colors only, the transparency might not fit well due to alpha.

btw: Pictures at teechart.net support forum are broken.