TAChart: Undo part of r60075 #361e42f65a (see issue #34898).

git-svn-id: trunk@60105 -
This commit is contained in:
wp 2019-01-18 23:31:29 +00:00
parent 974e1fea09
commit 033dcb2dee

View File

@ -1856,13 +1856,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);
@ -1870,12 +1863,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;
@ -1885,12 +1873,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);