diff options
author | Colin Okay <cbeok@protonmail.com> | 2021-08-13 12:29:20 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2021-08-13 12:29:20 -0500 |
commit | a439cb27a908d1013de67f180200ba27083c903a (patch) | |
tree | 047d02084e5951353eedfd6f226bc289c8693da5 /imbricate.lisp | |
parent | 71c0db335ee9801e56a8c18d7db6bcf40b8b2ac3 (diff) |
fixed bug in height/width switching
Diffstat (limited to 'imbricate.lisp')
-rw-r--r-- | imbricate.lisp | 8 |
1 files changed, 4 insertions, 4 deletions
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 |