From a439cb27a908d1013de67f180200ba27083c903a Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Fri, 13 Aug 2021 12:29:20 -0500 Subject: fixed bug in height/width switching --- imbricate.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'imbricate.lisp') diff --git a/imbricate.lisp b/imbricate.lisp index 7fe10a7..d1736a2 100644 --- a/imbricate.lisp +++ b/imbricate.lisp @@ -154,13 +154,13 @@ a compact logical 2d plane" (defun render-sheet (plan) "Generates and returns a single image from a plan." - (let ((sheet (opticl:make-8-bit-rgba-image (rect-width plan) (rect-height plan)))) + (let ((sheet (opticl:make-8-bit-rgba-image (rect-height plan) (rect-width plan)))) (dolist (tile (positioned plan) sheet) (with-slots (x y width height data) tile (dotimes (px width) (dotimes (py height) - (setf (opticl:pixel sheet (+ x px) (+ y py) ) - (opticl:pixel data px py )))))))) + (setf (opticl:pixel sheet (+ y py) (+ x px) ) + (opticl:pixel data py px )))))))) (defun make-sheet-info (plan) @@ -172,7 +172,7 @@ a compact logical 2d plane" (opticl:convert-image-to-rgba (opticl:read-png-file path)))) - (opticl:with-image-bounds (w h) data + (opticl:with-image-bounds (h w) data (make-instance 'tile :path path :data data -- cgit v1.2.3