TAChart: Add DrawingBegin/DrawingEnd methods to IChartDrawer

git-svn-id: trunk@30205 -
This commit is contained in:
ask 2011-04-05 20:24:28 +00:00
parent 6c41287908
commit 61fe03b598
2 changed files with 16 additions and 0 deletions

View File

@ -69,6 +69,8 @@ type
procedure ClippingStart(const AClipRect: TRect);
procedure ClippingStart;
procedure ClippingStop;
procedure DrawingBegin(const ABoundingBox: TRect);
procedure DrawingEnd;
procedure DrawLineDepth(AX1, AY1, AX2, AY2, ADepth: Integer);
procedure DrawLineDepth(const AP1, AP2: TPoint; ADepth: Integer);
procedure Ellipse(AX1, AY1, AX2, AY2: Integer);
@ -126,6 +128,8 @@ type
procedure SimpleTextOut(AX, AY: Integer; const AText: String); virtual; abstract;
public
constructor Create;
procedure DrawingBegin(const ABoundingBox: TRect); virtual;
procedure DrawingEnd; virtual;
procedure DrawLineDepth(AX1, AY1, AX2, AY2, ADepth: Integer);
procedure DrawLineDepth(const AP1, AP2: TPoint; ADepth: Integer);
procedure LineTo(AX, AY: Integer); virtual; abstract;
@ -276,6 +280,16 @@ begin
FGetFontOrientationFunc := @DummyGetFontOrientationFunc;
end;
procedure TBasicDrawer.DrawingBegin(const ABoundingBox: TRect);
begin
Unused(ABoundingBox);
end;
procedure TBasicDrawer.DrawingEnd;
begin
// Empty
end;
procedure TBasicDrawer.DrawLineDepth(AX1, AY1, AX2, AY2, ADepth: Integer);
begin
DrawLineDepth(Point(AX1, AY1), Point(AX2, AY2), ADepth);

View File

@ -677,6 +677,7 @@ var
legendItems: TChartLegendItems = nil;
legendRect: TRect;
begin
ADrawer.DrawingBegin(ARect);
Clear(ADrawer, ARect);
FClipRect := ARect;
@ -719,6 +720,7 @@ begin
OnExtentChanged(Self);
FPrevLogicalExtent := FLogicalExtent;
end;
ADrawer.DrawingEnd;
end;
procedure TChart.DrawBackWall(ADrawer: IChartDrawer);