TAChart: Move BoundingBoxToCenterAndHalfRadius procedure to TAGeometry unit

git-svn-id: trunk@30204 -
This commit is contained in:
ask 2011-04-05 19:01:43 +00:00
parent 4d9fc7f139
commit 6c41287908
2 changed files with 11 additions and 14 deletions

View File

@ -92,16 +92,6 @@ begin
Result[i] := PointF(X, Y);
end;
procedure BoundingBoxToCenterAndHalfRadius(
AX1, AY1, AX2, AY2: Integer;
out ACX, ACY, ARX, ARY: Integer);
begin
ACX := (AX1 + AX2) div 2;
ACY := (AY1 + AY2) div 2;
ARX := Abs(AX1 - AX2) div 2;
ARY := Abs(AY1 - AY2) div 2;
end;
{ TBGRABitmapDrawer }
procedure TBGRABitmapDrawer.AddToFontOrientation(ADelta: Integer);
@ -310,9 +300,5 @@ begin
AX, AY, FFontOrientation, AText, FFontColor, taLeftJustify);
end;
initialization
// Suppress incorrect "TAGeometry is unused" hint
Unused(DoublePoint(0, 0));
end.

View File

@ -23,6 +23,8 @@ interface
uses
TAChartUtils, Types;
procedure BoundingBoxToCenterAndHalfRadius(
AX1, AY1, AX2, AY2: Integer; out ACX, ACY, ARX, ARY: Integer);
function CopyPoints(
APoints: array of TPoint; AStartIndex, ANumPts: Integer): TPointArray;
function DoublePoint(AX, AY: Double): TDoublePoint; inline;
@ -80,6 +82,15 @@ uses
function PointLineSide(AP, A1, A2: TPoint): TValueSign; forward;
procedure BoundingBoxToCenterAndHalfRadius(
AX1, AY1, AX2, AY2: Integer; out ACX, ACY, ARX, ARY: Integer);
begin
ACX := (AX1 + AX2) div 2;
ACY := (AY1 + AY2) div 2;
ARX := Abs(AX1 - AX2) div 2;
ARY := Abs(AY1 - AY2) div 2;
end;
function CopyPoints(
APoints: array of TPoint; AStartIndex, ANumPts: Integer): TPointArray;
var