TAChart: Update to the recent version of FPVectorial

git-svn-id: trunk@37727 -
This commit is contained in:
ask 2012-06-22 20:19:57 +00:00
parent cb7d4739ca
commit c5ebe15fc6
3 changed files with 9 additions and 7 deletions

View File

@ -7,7 +7,7 @@ object Form1: TForm1
ClientHeight = 342
ClientWidth = 422
Position = poScreenCenter
LCLVersion = '0.9.31'
LCLVersion = '1.1'
object Chart1: TChart
Left = 0
Height = 300

View File

@ -40,15 +40,17 @@ uses
procedure SaveAs(AChart: TChart; AFormat: TvVectorialFormat);
const
ext: array [TvVectorialFormat] of String = (
'pdf', 'svg', 'cdr', 'wmf', 'dxf', 'ps', 'eps', 'gcode5', 'gcode6');
'pdf', 'svg', 'cdr', 'wmf', 'dxf', 'laf', 'laz', 'ps', 'eps',
'gcode5', 'gcode6', 'mathml', 'raw');
var
d: TvVectorialDocument;
v: IChartDrawer;
begin
d := TvVectorialDocument.Create;
d.AddPage;
d.Width := AChart.Width;
d.Height := AChart.Height;
v := TFPVectorialDrawer.Create(d);
v := TFPVectorialDrawer.Create(d.GetCurrentPage);
v.DoChartColorToFPColor := @ChartColorSysToFPColor;
with AChart do
Draw(v, Rect(0, 100, Width, Height + 100));

View File

@ -31,7 +31,7 @@ type
FBoundingBox: TRect;
FBrushColor: TFPColor;
FBrushStyle: TFPBrushStyle;
FCanvas: TvVectorialDocument;
FCanvas: TvVectorialPage;
FFontSize: Integer;
FPenColor: TFPColor;
@ -45,7 +45,7 @@ type
function SimpleTextExtent(const AText: String): TPoint; override;
procedure SimpleTextOut(AX, AY: Integer; const AText: String); override;
public
constructor Create(ACanvas: TvVectorialDocument);
constructor Create(ACanvas: TvVectorialPage);
public
procedure AddToFontOrientation(ADelta: Integer);
procedure ClippingStart;
@ -107,7 +107,7 @@ begin
// Not implemented.
end;
constructor TFPVectorialDrawer.Create(ACanvas: TvVectorialDocument);
constructor TFPVectorialDrawer.Create(ACanvas: TvVectorialPage);
begin
inherited Create;
FCanvas := ACanvas;
@ -123,7 +123,7 @@ var
cx, cy, rx, ry: Integer;
begin
BoundingBoxToCenterAndHalfRadius(AX1, AY1, AX2, AY2, cx, cy, rx, ry);
FCanvas.AddEllipse(cx, InvertY(cy), 0, rx, ry, 0.0);
FCanvas.AddEllipse(cx, InvertY(cy), rx, ry, 0.0);
end;
procedure TFPVectorialDrawer.FillRect(AX1, AY1, AX2, AY2: Integer);