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 206 - [TV52015251] Change TPieSeries implementation to use ellipse instead of current im...
Summary: [TV52015251] Change TPieSeries implementation to use ellipse instead of curre...
Status: RESOLVED FIXED
Alias: None
Product: VCL TeeChart
Classification: Unclassified
Component: Series (show other bugs)
Version: unspecified
Hardware: All All
: Normal enhancement
Target Milestone: ---
Assignee: Steema Issue Manager
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-28 11:25 EDT by narcís calvet
Modified: 2014-02-02 07:29 EST (History)
1 user (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 narcís calvet 2013-11-20 10:03:30 EST
Change TPieSeries implementation to use ellipse instead of current implementation. Otherwise, when exporting a pie to a vectorial format (ie: Metafile) pie series is aliased when being resized.
Code to reproduce:
uses Series;
 
procedure TForm1.FormCreate(Sender: TObject);
var
 MetaFile: TMetaFile;
 Rect: TRect;
 FileName: String;
begin
 FileName:='c:\temp\Metafile8.emf';

 Chart1.AddSeries(TPieSeries.Create(Self)).FillSampleValues;
 Chart1.Legend.Visible:=False;
 Chart1[0].Marks.Visible:=False;
 Chart1.Width:=500;
 Chart1.Height:=500;

 Rect.Left := 0;
 Rect.Top := 0;
 Rect.Right := 250;
 Rect.Bottom := 150;
 MetaFile := Chart1.TeeCreateMetaFile(True, Rect);
 MetaFile.SaveToFile(FileName);
 MetaFile.Free;

 Chart2.BackImage.LoadFromFile(FileName);
 //Chart2.Align:=alClient;
 Chart2.Walls.Visible:=False;
 Chart2.Axes.Visible:=False;
 Chart2.Width:=Chart1.Width;
 Chart2.Height:=Chart1.Height;
end;
 [created:2010-10-28T10:25:24.000+01:00 reported by:narcis@steema.com reported in version:2010.01.11004 (TeeChart VCL)]
Comment 1 david berneda 2014-02-02 07:29:15 EST
This is already done when Chart1.View3D = False.
In 3D its not possible to use ellipse as the rotation / elevation / tilt might not transform to a perfect ellipse.

Latest version 3D Pie is using floats to improve pixel precision, and the curve output is much smoother. I think the output now its correct enough for Metafile scaling.