about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-16 23:06:44 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-16 23:06:44 -0700
commit8446ec0fbb38010ba7338dc693ada9c67bf3282a (patch)
treed554dfbafa704f20996be494744c284d8c299df8
parent2194b388f800ca267edf7953bd4a2aa3c34a62df (diff)
downloadlines.love-8446ec0fbb38010ba7338dc693ada9c67bf3282a.tar.gz
respect zoom when drawing drawings
-rw-r--r--main.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.lua b/main.lua
index 85843dd..f47b61f 100644
--- a/main.lua
+++ b/main.lua
@@ -598,9 +598,13 @@ function keychord_pressed(chord)
       end
     end
   elseif chord == 'C-=' then
+    drawingw = drawingw/zoom
     zoom = zoom+0.5
+    drawingw = drawingw*zoom
   elseif chord == 'C--' then
+    drawingw = drawingw/zoom
     zoom = zoom-0.5
+    drawingw = drawingw*zoom
   -- shortcuts for drawings
   elseif chord == 'escape' and love.mouse.isDown('1') then
     local drawing = current_drawing()