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

Summary: [TV52013895] It seems that shadow's transparency of the annotation tool isn't expo...
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: IN_PROGRESS ---    
Severity: enhancement CC: belmic, david
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

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.