tachart: Fixes compilation with FPC 2.6.4 in Mac OS X

git-svn-id: trunk@54417 -
This commit is contained in:
sekelsenmat 2017-03-16 15:42:52 +00:00
parent 13e53b7fae
commit 60236a6577
3 changed files with 9 additions and 5 deletions

View File

@ -611,7 +611,7 @@ var
d, dist: Integer;
phi: Double;
rx, ry: Integer;
cosphi, sinphi: Double;
cosphi, sinphi: Math.float;
begin
Result := inherited;
@ -768,7 +768,7 @@ var
rx, ry: Integer;
d, dPerim: Integer;
p: TPoint;
phi, sinPhi, cosPhi: Double;
phi, sinPhi, cosPhi: Math.float;
begin
if AYIdx = 0 then begin
Result := inherited;

View File

@ -451,8 +451,11 @@ end;
function TChartTextElement.GetTextShiftNeeded: Boolean;
var
textdir: TDoublePoint;
lSin, lCos: Math.float;
begin
SinCos(-GetLabelAngle, textdir.y, textdir.x);
SinCos(-GetLabelAngle, lSin, lCos);
textdir.y := lSin;
textdir.x := lCos;
Result := DotProduct(textdir, FInsideDir) > 0;
end;

View File

@ -439,7 +439,7 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
var
p: array of TPoint;
pt: TDoublePoint;
phi, sinphi, cosphi, dPhi: Double;
phi, sinphi, cosphi, dPhi: Math.float;
i: Integer;
begin
case AStyle of
@ -447,7 +447,8 @@ procedure TSeriesPointer.DrawSize(ADrawer: IChartDrawer;
psFullStar : begin dPhi := pi / 6; SetLength(p, 13); end;
end;
phi := 0;
for i := 0 to High(p) do begin
for i := 0 to High(p) do
begin
SinCos(phi, sinphi, cosphi);
pt := DoublePoint(ASize.X * cosPhi, ASize.Y * sinPhi);
if odd(i) and (AStyle = psFullStar) then