mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 15:39:49 +02:00
TAChart: Extract DoubleInterval utility function
git-svn-id: trunk@27019 -
This commit is contained in:
parent
493196ea7c
commit
a11a0af094
@ -208,6 +208,7 @@ function BoundsSize(ALeft, ATop: Integer; ASize: TSize): TRect; inline;
|
||||
|
||||
function DoublePoint(AX, AY: Double): TDoublePoint; inline;
|
||||
function DoubleRect(AX1, AY1, AX2, AY2: Double): TDoubleRect; inline;
|
||||
function DoubleInterval(AStart, AEnd: Double): TDoubleInterval; inline;
|
||||
|
||||
procedure EnsureOrder(var A, B: Integer); overload; inline;
|
||||
procedure EnsureOrder(var A, B: Double); overload; inline;
|
||||
@ -365,6 +366,12 @@ begin
|
||||
Result.b.Y := AY2;
|
||||
end;
|
||||
|
||||
function DoubleInterval(AStart, AEnd: Double): TDoubleInterval;
|
||||
begin
|
||||
Result.FStart := AStart;
|
||||
Result.FEnd := AEnd;
|
||||
end;
|
||||
|
||||
procedure EnsureOrder(var A, B: Integer); overload; inline;
|
||||
begin
|
||||
if A > B then
|
||||
@ -812,8 +819,7 @@ begin
|
||||
for k := High(FIntervals) downto i do
|
||||
FIntervals[k] := FIntervals[k - 1];
|
||||
end;
|
||||
FIntervals[i].FStart := AStart;
|
||||
FIntervals[i].FEnd := AEnd;
|
||||
FIntervals[i] := DoubleInterval(AStart, AEnd);
|
||||
Changed;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user