mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-03 21:38:21 +02:00
TAChart: Undo part of r60075 #361e42f65a (see Issue #34898).
git-svn-id: branches/fixes_2_0@60194 -
This commit is contained in:
parent
bef942e6c5
commit
191dd10a60
@ -1847,13 +1847,6 @@ begin
|
||||
s.VisitSources(AVisitor, AAxis, AData);
|
||||
end;
|
||||
|
||||
function SgnInt(X: Double): Integer;
|
||||
begin
|
||||
if X > 0 then Result := +1
|
||||
else if X < 0 then Result := -1
|
||||
else Result := 0;
|
||||
end;
|
||||
|
||||
function TChart.XGraphToImage(AX: Double): Integer;
|
||||
begin
|
||||
Result := ImgRoundChecked(FScale.X * AX + FOffset.X);
|
||||
@ -1861,12 +1854,7 @@ end;
|
||||
|
||||
function TChart.XImageToGraph(AX: Integer): Double;
|
||||
begin
|
||||
if AX >= MAX_COORD then
|
||||
Result := Infinity * SgnInt(FScale.X)
|
||||
else if AX <= -MAX_COORD then
|
||||
Result := -Infinity * SgnInt(FScale.X)
|
||||
else
|
||||
Result := (AX - FOffset.X) / FScale.X;
|
||||
Result := (AX - FOffset.X) / FScale.X;
|
||||
end;
|
||||
|
||||
function TChart.YGraphToImage(AY: Double): Integer;
|
||||
@ -1876,12 +1864,7 @@ end;
|
||||
|
||||
function TChart.YImageToGraph(AY: Integer): Double;
|
||||
begin
|
||||
if AY >= MAX_COORD then
|
||||
Result := Infinity * SgnInt(FScale.Y)
|
||||
else if AY <= -MAX_COORD then
|
||||
Result := -Infinity * SgnInt(FScale.Y)
|
||||
else
|
||||
Result := (AY - FOffset.Y) / FScale.Y;
|
||||
Result := (AY - FOffset.Y) / FScale.Y;
|
||||
end;
|
||||
|
||||
procedure TChart.ZoomFull(AImmediateRecalc: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user