From 038f06a342acfbd4c8e8aa1519b49361d8dc1bbc Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 17 Jul 2022 07:58:51 -0700 Subject: drop some redundant args from Text.draw --- edit.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'edit.lua') diff --git a/edit.lua b/edit.lua index abb6260..772d638 100644 --- a/edit.lua +++ b/edit.lua @@ -38,9 +38,9 @@ function edit.initialize_state(top, left, right, font_height, line_height) -- c -- a text is a table with: -- mode = 'text', -- string data, - -- startpos, the index of data the line starts rendering from (if currently on screen), can only be >1 for topmost line on screen - -- starty, the y coord in pixels -- some cached data that's blown away and recomputed when data changes: + -- startpos, the index of data the line starts rendering from (if currently on screen), can only be >1 for topmost line on screen + -- starty, the y coord in pixels -- fragments: snippets of rendered love.graphics.Text, guaranteed to not wrap -- screen_line_starting_pos: optional array of grapheme indices if it wraps over more than one screen line -- a drawing is a table with: @@ -163,7 +163,7 @@ function edit.draw(State) line.startpos = State.screen_top1.pos end --? print('text.draw', y, line_index) - y, State.screen_bottom1.pos = Text.draw(State, line, line_index, line.starty) + y, State.screen_bottom1.pos = Text.draw(State, line_index) y = y + State.line_height --? print('=> y', y) end -- cgit 1.4.1-2-gfad0