mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-09 21:18:20 +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);
|
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);
|
||||||
@ -1861,11 +1854,6 @@ end;
|
|||||||
|
|
||||||
function TChart.XImageToGraph(AX: Integer): Double;
|
function TChart.XImageToGraph(AX: Integer): Double;
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
@ -1876,11 +1864,6 @@ end;
|
|||||||
|
|
||||||
function TChart.YImageToGraph(AY: Integer): Double;
|
function TChart.YImageToGraph(AY: Integer): Double;
|
||||||
begin
|
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;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user