about summary refs log tree commit diff stats
path: root/drawing.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-05-29 16:37:31 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-05-29 16:37:31 -0700
commita603847d18ac5279e5d190ac2eebdf87297590d4 (patch)
treec96aeb5817c2f009c79a061a1e475b9bda033f8a /drawing.lua
parent5b95e51c36417adff04de5a62d6ae6d067c0db04 (diff)
downloadtext.love-a603847d18ac5279e5d190ac2eebdf87297590d4.tar.gz
go through App in a couple more places
Diffstat (limited to 'drawing.lua')
-rw-r--r--drawing.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/drawing.lua b/drawing.lua
index 5575904..677cab3 100644
--- a/drawing.lua
+++ b/drawing.lua
@@ -56,11 +56,11 @@ function Drawing.draw(line)
           local name_text
           -- TODO: avoid computing name width on every repaint
           if p.name == '' then
-            name_text = love.graphics.newText(love.graphics.getFont(), 'm')  -- 1em
+            name_text = App.newText(love.graphics.getFont(), 'm')  -- 1em
           else
-            name_text = love.graphics.newText(love.graphics.getFont(), p.name)
+            name_text = App.newText(love.graphics.getFont(), p.name)
           end
-          love.graphics.rectangle('fill', x,y, math.floor(name_text:getWidth()*Zoom), math.floor(15*Zoom))
+          love.graphics.rectangle('fill', x,y, math.floor(App.width(name_text)*Zoom), math.floor(15*Zoom))
         end
       end
     end