Cause of sometimes 'invalid floating point' message

This commit is contained in:
ronaldhordijk
2005-03-23 13:28:13 +00:00
parent c9b167ae79
commit b53b214b20
3 changed files with 38 additions and 17 deletions

View File

@ -157,8 +157,13 @@ begin
scrollBrightness.Position := trunc(cp.Brightness * 100);
scrollVibrancy.Position := trunc(cp.vibrancy * 100);
scrollZoom.Position := trunc(cp.zoom * 100);
scrollCenterX.Position := trunc(cp.Center[0] * 100);
scrollCenterY.Position := trunc(cp.Center[1] * 100);
if (abs(cp.Center[0]) < 1000) and (abs(cp.Center[0]) < 1000) then begin
scrollCenterX.Position := trunc(cp.Center[0] * 100);
scrollCenterY.Position := trunc(cp.Center[1] * 100);
end else begin
scrollCenterX.Position := 0;
scrollCenterY.Position := 0;
end;
ColorPanel.color := cp.background[2] shl 16 +
cp.background[1] shl 8 + cp.background[0];
Resetting := False;