From 543704f0f54cbb1de78754ad8a323c482ab6829c Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 14 Dec 2024 12:29:29 -0800 Subject: Loop style nits --- src/interactive/canvas.lisp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/interactive/canvas.lisp') diff --git a/src/interactive/canvas.lisp b/src/interactive/canvas.lisp index f4b2b74..2accb8a 100644 --- a/src/interactive/canvas.lisp +++ b/src/interactive/canvas.lisp @@ -75,13 +75,12 @@ (,g (aref ,px 1)) (,b (aref ,px 2)) (,a (aref ,px 3))) - (loop for ,x from (if ,lv ,lv 0) below (if ,rv ,rv (pixel-width ,pxs)) do - (loop for ,y from (if ,bv ,bv 0) below (if ,tv ,tv (pixel-height ,pxs)) - do (progn - (setf ,px (adjust-array ,px 4 - :displaced-to (pixels-data ,pxs) - :displaced-index-offset (pixel-offset ,x ,y ,pxs))) - ,@body))))))) + (loop :for ,x :from (if ,lv ,lv 0) :below (if ,rv ,rv (pixel-width ,pxs)) :do + (loop :for ,y :from (if ,bv ,bv 0) :below (if ,tv ,tv (pixel-height ,pxs)) :do + (setf ,px (adjust-array ,px 4 + :displaced-to (pixels-data ,pxs) + :displaced-index-offset (pixel-offset ,x ,y ,pxs))) + ,@body)))))) (defun clear-canvas (canvas &key (r 0) (g 0) (b 0) (a 255)) (with-pixels-rect (x y pr pg pb pa) (canvas) -- cgit v1.2.3