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)
downloadview.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
ght .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
void clear_empty(void **state);
void reset_after_create(void **state);
void find_after_create(void **state);
void get_after_create_returns_null(void **state);
void add_one_and_complete(void **state);
void add_two_and_complete_returns_first(void **state);
void add_two_and_complete_returns_second(void **state);
void add_two_adds_two(void **state);
void add_two_same_adds_one(void **state);
void add_two_same_updates(void **state);