aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interactive/canvas.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-12-14 12:29:29 -0800
committercolin <colin@cicadas.surf>2024-12-14 12:29:29 -0800
commit543704f0f54cbb1de78754ad8a323c482ab6829c (patch)
tree7528c0105516a2a2800e432de9f4f1a6c3fe506e /src/interactive/canvas.lisp
parent3a2217263d581be9a7f629b10d75aa8e3d581890 (diff)
Loop style nitsHEADmain
Diffstat (limited to 'src/interactive/canvas.lisp')
-rw-r--r--src/interactive/canvas.lisp13
1 files changed, 6 insertions, 7 deletions
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)