mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 11:19:55 +01:00
TAChart: Undo part of r60075 #361e42f65a (see issue #34898).
git-svn-id: trunk@60105 -
This commit is contained in:
parent
974e1fea09
commit
033dcb2dee
@ -1856,13 +1856,6 @@ begin
|
|||||||
s.VisitSources(AVisitor, AAxis, AData);
|
s.VisitSources(AVisitor, AAxis, AData);
|
||||||
end;
|
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;
|
function TChart.XGraphToImage(AX: Double): Integer;
|
||||||
begin
|
begin
|
||||||
Result := ImgRoundChecked(FScale.X * AX + FOffset.X);
|
Result := ImgRoundChecked(FScale.X * AX + FOffset.X);
|
||||||
@ -1870,12 +1863,7 @@ end;
|
|||||||
|
|
||||||
function TChart.XImageToGraph(AX: Integer): Double;
|
function TChart.XImageToGraph(AX: Integer): Double;
|
||||||
begin
|
begin
|
||||||
if AX >= MAX_COORD then
|
Result := (AX - FOffset.X) / FScale.X;
|
||||||
Result := Infinity * SgnInt(FScale.X)
|
|
||||||
else if AX <= -MAX_COORD then
|
|
||||||
Result := -Infinity * SgnInt(FScale.X)
|
|
||||||
else
|
|
||||||
Result := (AX - FOffset.X) / FScale.X;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TChart.YGraphToImage(AY: Double): Integer;
|
function TChart.YGraphToImage(AY: Double): Integer;
|
||||||
@ -1885,12 +1873,7 @@ end;
|
|||||||
|
|
||||||
function TChart.YImageToGraph(AY: Integer): Double;
|
function TChart.YImageToGraph(AY: Integer): Double;
|
||||||
begin
|
begin
|
||||||
if AY >= MAX_COORD then
|
Result := (AY - FOffset.Y) / FScale.Y;
|
||||||
Result := Infinity * SgnInt(FScale.Y)
|
|
||||||
else if AY <= -MAX_COORD then
|
|
||||||
Result := -Infinity * SgnInt(FScale.Y)
|
|
||||||
else
|
|
||||||
Result := (AY - FOffset.Y) / FScale.Y;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TChart.ZoomFull(AImmediateRecalc: Boolean);
|
procedure TChart.ZoomFull(AImmediateRecalc: Boolean);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user