diff options
Diffstat (limited to 'src/interactive/canvas.lisp')
-rw-r--r-- | src/interactive/canvas.lisp | 13 |
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) |