add state arg to Drawing.draw
[?]
Jul 12, 2022, 11:25 PM
7JH2ZT3FCW4WX52IJFSLGRVZWQQVYJXULSQM2BM4BJUZWG3IVGKACDependencies
- [2]
LNUHQOGHstart passing in Editor_state explicitly - [3]
AJB4LFRBtry to maintain a reasonable line width - [4]
JFFUF5ALoverride mouse state lookups in tests - [5]
GSPXUEQO. - [6]
HOSPP2ANcrisp font rendering - [7]
DRFE3B3Zmouse buttons are integers, not strings - [8]
BLWAYPKVextract a module - [9]
M6TH7VSZrip out notion of Line_width - [10]
2L4DL7PGgo through App in a couple more places - [11]
K2X6G75Zstart writing some tests for drawings - [12]
NHA7RUFImove current mode indicator slightly - [13]
LF7BWEG4group all editor globals - [14]
LAW2O3NWextract variable Margin_left - [15]
5DOTWNVMright margin - [16]
WPW3AVFSmore precise shape selection - [17]
BYG5CEMVsupport for naming points - [18]
XRLJDW3Wcasting about for more helpers to extract.. - [19]
AH744RFRshow when we're naming a point - [20]
H22OAXWEcouple of TODOs - [21]
2L5MEZV3experiment: new edit namespace - [22]
LUNH47XXmake text and drawings the same width - [23]
C45WCXJ2keep drawings within the line width slider as well - [24]
4KC7I3E2make colors easier to edit - [25]
NYQ7HD4Dmove - [26]
VHQCNMARseveral more modules - [27]
253TWKDAclean up - [28]
YJGADSGKdelete unused arg
Change contents
- replacement in edit.lua at line 155
Drawing.draw(line)Drawing.draw(State, line) - replacement in drawing.lua at line 7
function Drawing.draw(line)function Drawing.draw(State, line) - replacement in drawing.lua at line 9
if pmx < App.screen.width-Editor_state.margin_right and pmy > line.y and pmy < line.y+Drawing.pixels(line.h) thenif pmx < App.screen.width-State.margin_right and pmy > line.y and pmy < line.y+Drawing.pixels(line.h) then - replacement in drawing.lua at line 11
love.graphics.rectangle('line', Editor_state.margin_left,line.y, App.screen.width-Editor_state.margin_width,Drawing.pixels(line.h))if icon[Editor_state.current_drawing_mode] thenicon[Editor_state.current_drawing_mode](App.screen.width-Editor_state.margin_right-22, line.y+4)love.graphics.rectangle('line', State.margin_left,line.y, App.screen.width-State.margin_width,Drawing.pixels(line.h))if icon[State.current_drawing_mode] thenicon[State.current_drawing_mode](App.screen.width-State.margin_right-22, line.y+4) - replacement in drawing.lua at line 15
icon[Editor_state.previous_drawing_mode](App.screen.width-Editor_state.margin_right-22, line.y+4)icon[State.previous_drawing_mode](App.screen.width-State.margin_right-22, line.y+4) - replacement in drawing.lua at line 29
local mx,my = Drawing.coord(pmx-Editor_state.margin_left), Drawing.coord(pmy-line.y)local mx,my = Drawing.coord(pmx-State.margin_left), Drawing.coord(pmy-line.y) - replacement in drawing.lua at line 38
Drawing.draw_shape(Editor_state.margin_left,line.y, line, shape)Drawing.draw_shape(State.margin_left,line.y, line, shape) - replacement in drawing.lua at line 44
love.graphics.circle('line', Drawing.pixels(p.x)+Editor_state.margin_left,Drawing.pixels(p.y)+line.y, 4)love.graphics.circle('line', Drawing.pixels(p.x)+State.margin_left,Drawing.pixels(p.y)+line.y, 4) - replacement in drawing.lua at line 47
love.graphics.circle('fill', Drawing.pixels(p.x)+Editor_state.margin_left,Drawing.pixels(p.y)+line.y, 2)love.graphics.circle('fill', Drawing.pixels(p.x)+State.margin_left,Drawing.pixels(p.y)+line.y, 2) - replacement in drawing.lua at line 51
local x,y = Drawing.pixels(p.x)+Editor_state.margin_left+5, Drawing.pixels(p.y)+line.y+5local x,y = Drawing.pixels(p.x)+State.margin_left+5, Drawing.pixels(p.y)+line.y+5 - replacement in drawing.lua at line 53
if Editor_state.current_drawing_mode == 'name' and i == line.pending.target_point thenif State.current_drawing_mode == 'name' and i == line.pending.target_point then - replacement in drawing.lua at line 59
name_text = Editor_state.emname_text = State.em - replacement in drawing.lua at line 63
love.graphics.rectangle('fill', x,y, App.width(name_text), Editor_state.line_height)love.graphics.rectangle('fill', x,y, App.width(name_text), State.line_height) - replacement in drawing.lua at line 69
Drawing.draw_pending_shape(Editor_state.margin_left,line.y, line)Drawing.draw_pending_shape(State.margin_left,line.y, line)