From c0946573cef9a903de2fd859a358d67a2ee232ed Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Mon, 10 Apr 2023 23:52:26 +0200 Subject: [PATCH] LCL/TCanvas: Switch x and y loops in TCanvas.BrushCopy. Patch by lagprogramming, https://forum.lazarus.freepascal.org/index.php/topic,62996.msg476742.html --- lcl/include/canvas.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lcl/include/canvas.inc b/lcl/include/canvas.inc index 97665929b9..4c5300288f 100644 --- a/lcl/include/canvas.inc +++ b/lcl/include/canvas.inc @@ -754,8 +754,8 @@ begin // Next copy the bitmap to a intfimage to be able to make the color change lIntfImage.LoadFromBitmap(lPaintedBitmap.Handle, 0); - for x := 0 to lSrcWidth-1 do - for y := 0 to lSrcHeight-1 do + for y := 0 to lSrcHeight-1 do + for x := 0 to lSrcWidth-1 do begin lPixelColor := lIntfImage.Colors[x, y]; if (lPixelColor.red = lTransparentColor.red) and