Skip to content

Commit

Permalink
TSimbaImage: Prefer returning a new image than self modifying
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Jul 26, 2023
1 parent 1e8bcdc commit 3e3bcc9
Show file tree
Hide file tree
Showing 6 changed files with 453 additions and 732 deletions.
10 changes: 6 additions & 4 deletions Source/Simba.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
<LinkSmart Value="True"/>
</Linking>
<Other>
<CompilerMessages>
<IgnoredMessages idx5024="True" idx4055="True"/>
</CompilerMessages>
<CustomOptions Value="-CfSSE3
-dStaticFFI
-dLape_CDECL
Expand Down Expand Up @@ -110,14 +113,13 @@
<LinkSmart Value="True"/>
</Linking>
<Other>
<CompilerMessages>
<IgnoredMessages idx5024="True" idx4055="True"/>
</CompilerMessages>
<CustomOptions Value="-CfSSE64
-dStaticFFI
-dLape_CDECL
-dLape_NoExtended"/>
<OtherDefines Count="2">
<Define0 Value="StaticFFI"/>
<Define1 Value="Lape_CDECL"/>
</OtherDefines>
<CreateMakefileOnBuild Value="True"/>
</Other>
</CompilerOptions>
Expand Down
2 changes: 2 additions & 0 deletions Source/Simba.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
SetHeapTraceOutput(IntToStr(GetProcessID()) + '.trc');
{$ENDIF}

DebugLogger.CloseLogFileBetweenWrites := True;

Application.CaptureExceptions := False;
Application.Initialize();

Expand Down
2 changes: 1 addition & 1 deletion Source/imagebox/simba.imagebox_zoom.pas
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ procedure TSimbaImageBoxZoom.Move(Image: TSimbaImage; X, Y: Integer);

for LoopX := 0 to FBitmap.Width - 1 do
for LoopY := 0 to FBitmap.Height - 1 do
if Image.PointInBitmap(X + LoopX, Y + LoopY) then
if Image.PointInImage(X + LoopX, Y + LoopY) then
FBitmap.Canvas.Pixels[LoopX, LoopY] := Image.Pixel[X + LoopX, Y + LoopY]
else
FBitmap.Canvas.Pixels[LoopX, LoopY] := clBlack;
Expand Down
Loading

0 comments on commit 3e3bcc9

Please sign in to comment.