From 433a001f72b1c32f55a731cb484898e176c60aed Mon Sep 17 00:00:00 2001 From: zueuk Date: Thu, 18 Dec 2008 16:12:00 +0000 Subject: [PATCH] small fixes --- 2.10/Source/ControlPoint.pas | 7 +++++-- 2.10/Source/FormRender.pas | 3 ++- 2.10/Source/RenderST.pas | 18 ------------------ 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/2.10/Source/ControlPoint.pas b/2.10/Source/ControlPoint.pas index c407ae9..0c1557e 100644 --- a/2.10/Source/ControlPoint.pas +++ b/2.10/Source/ControlPoint.pas @@ -473,7 +473,6 @@ end; if xf.noPlot then pPoint^.x := MaxDouble // hack else begin - //pPoint^.x := p.x; pPoint^.y := p.y; pPoint^.c := p.c; pPoint^ := p; end; Inc(pPoint); @@ -1435,6 +1434,7 @@ begin Result.spatial_oversample := Round(c0 * cp1.spatial_oversample + c1 * cp2.spatial_oversample); Result.center[0] := c0 * cp1.center[0] + c1 * cp2.center[0]; Result.center[1] := c0 * cp1.center[1] + c1 * cp2.center[1]; + Result.FAngle := c0 * cp1.FAngle + c1 * cp2.FAngle; Result.pixels_per_unit := c0 * cp1.pixels_per_unit + c1 * cp2.pixels_per_unit; // Result.background[0] := c0 * cp1.background[0] + c1 * cp2.background[0]; // Result.background[1] := c0 * cp1.background[1] + c1 * cp2.background[1]; @@ -1938,7 +1938,10 @@ end; /////////////////////////////////////////////////////////////////////////////// function TControlPoint.GetRelativeGammaThreshold: double; begin - Result := gamma_threshold / Fbrightness; + if Fbrightness <> 0 then + Result := gamma_threshold / Fbrightness + else + Result := gamma_threshold; end; procedure TControlPoint.SetRelativeGammaThreshold(gtr: double); diff --git a/2.10/Source/FormRender.pas b/2.10/Source/FormRender.pas index def2d12..3966494 100644 --- a/2.10/Source/FormRender.pas +++ b/2.10/Source/FormRender.pas @@ -419,7 +419,8 @@ begin begin MaxMemory := StrToIntDef(cbMaxMemory.text, 0); if MaxMemory * 1024*1024 < ImageWidth * (int64(ImageHeight) * 4 + oversample) then begin - Application.MessageBox('Invalid maximum memory value', 'Apophysis', 16); + // Must be enough memory to hold the final image (RGBA) + Application.MessageBox('Maximum memory value is too small', 'Apophysis', 16); exit; end; end; diff --git a/2.10/Source/RenderST.pas b/2.10/Source/RenderST.pas index 418e858..9e952ab 100644 --- a/2.10/Source/RenderST.pas +++ b/2.10/Source/RenderST.pas @@ -51,24 +51,6 @@ begin useFinalXform := fcp.FinalXformEnabled and fcp.HasFinalXform; fcp.Prepare; -{ - for i := 0 to n - 1 do begin - fcp.xform[i].Prepare; - totValue := totValue + fcp.xform[i].density; - end; - - LoopValue := 0; - for i := 0 to PROP_TABLE_SIZE-1 do begin - propsum := 0; - j := -1; - repeat - inc(j); - propsum := propsum + fcp.xform[j].density; - until (propsum > LoopValue) or (j = n - 1); - PropTable[i] := fcp.xform[j]; - LoopValue := LoopValue + TotValue / PROP_TABLE_SIZE; - end; -} end; ///////////////////////////////////////////////////////////////////////////////