mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-02 19:24:46 +01:00
TAChart: Move BoundingBoxToCenterAndHalfRadius procedure to TAGeometry unit
git-svn-id: trunk@30204 -
This commit is contained in:
parent
4d9fc7f139
commit
6c41287908
@ -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.
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user