move
[?]
May 17, 2022, 5:28 AM
ZUOL7X6VIPRCMEZURYGNHTDEIP3ZCHZW4PKVKBNXVZL5V4VOE5ZQCDependencies
- [2]
LBQAAJN4load/save freehand strokes - [3]
VVXVV2D2change data model; text can now have metadata - [4]
O2UFJ6G3switch from freehand to just straight lines - [5]
IFGAJAF7add a level of indirection to vertices of shapes - [6]
YKRF5V3Zstarting to load/save - [7]
JCSLDGAHbeginnings of support for multiple shapes - [8]
S5JIPJPI. - [9]
WDWXNW7Vslightly strange way to move points - [10]
6PUNJS5Bbackspace - [11]
EFMLTMZGbugfix: restrict strokes to the drawing they started in - [12]
G77XIN7Mselecting a stroke - [13]
NL5J7Z5Hnew mode: polygon - [14]
FMQ74DP3new mode: circle - [15]
KVHUFUFVreorg - [16]
OTIBCAUJlove2d scaffold - [17]
JVRL5TWLstore device-independent coordinates inside drawings - [18]
ZD63LJ2Tbugfix: keep the click to create a new drawing from creating a new shape in the drawing - [19]
U76D4P36fix a typo - [20]
KCIM5UTVrevert: back to freehand - [21]
MNWHXPBLmore lightweight; select just the stroke at the mouse - [22]
6LJZN727handle chords - [23]
HWPK4SMPnew mode: manhattan - [24]
XX7G2FFJintermingle freehand line drawings with text - [25]
OFA3PRBSautosave on keystrokes
Change contents
- replacement in main.lua at line 199
propagate_to_drawings(x,y, button)for i,drawing in ipairs(lines) doif drawing.mode == 'drawing' thenlocal x, y = love.mouse.getX(), love.mouse.getY()if y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 16 and x < 16+drawingw thenif current_mode == 'freehand' thendrawing.pending = {mode=current_mode, points={{x=coord(x-16), y=coord(y-drawing.y)}}}elseif current_mode == 'line' or current_mode == 'manhattan' thenlocal j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))drawing.pending = {mode=current_mode, p1=j}elseif current_mode == 'polygon' thenlocal j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))drawing.pending = {mode=current_mode, vertices={j}}elseif current_mode == 'circle' thenlocal j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))drawing.pending = {mode=current_mode, center=j}endlines.current = drawingendendend - edit in main.lua at line 284[4.2114]→[4.143:187](∅→∅),[4.451]→[4.143:187](∅→∅),[4.220]→[4.187:223](∅→∅),[4.187]→[4.187:223](∅→∅),[4.223]→[3.781:819](∅→∅),[3.819]→[4.260:316](∅→∅),[4.260]→[4.260:316](∅→∅),[4.316]→[4.520:619](∅→∅),[4.619]→[4.2115:2158](∅→∅),[4.1168]→[4.2115:2158](∅→∅),[4.2158]→[2.3:99](∅→∅),[2.99]→[4.621:695](∅→∅),[4.97]→[4.621:695](∅→∅),[4.695]→[4.631:713](∅→∅),[4.2293]→[4.631:713](∅→∅),[4.713]→[4.98:152](∅→∅),[4.152]→[4.404:594](∅→∅),[4.594]→[4.428:613](∅→∅),[4.152]→[4.2374:2386](∅→∅),[4.594]→[4.2374:2386](∅→∅),[4.613]→[4.2374:2386](∅→∅),[4.761]→[4.2374:2386](∅→∅),[4.794]→[4.2374:2386](∅→∅),[4.2374]→[4.2374:2386](∅→∅),[4.725]→[4.408:440](∅→∅),[4.1168]→[4.408:440](∅→∅),[4.2386]→[4.408:440](∅→∅),[4.408]→[4.408:440](∅→∅),[4.391]→[4.440:464](∅→∅),[4.440]→[4.440:464](∅→∅),[4.408]→[4.464:469](∅→∅),[4.464]→[4.464:469](∅→∅)
function propagate_to_drawings(x,y, button)for i,drawing in ipairs(lines) doif drawing.mode == 'drawing' thenlocal x, y = love.mouse.getX(), love.mouse.getY()if y >= drawing.y and y < drawing.y + pixels(drawing.h) and x >= 16 and x < 16+drawingw thenif current_mode == 'freehand' thendrawing.pending = {mode=current_mode, points={{x=coord(x-16), y=coord(y-drawing.y)}}}elseif current_mode == 'line' or current_mode == 'manhattan' thenlocal j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))drawing.pending = {mode=current_mode, p1=j}elseif current_mode == 'polygon' thenlocal j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))drawing.pending = {mode=current_mode, vertices={j}}elseif current_mode == 'circle' thenlocal j = insert_point(drawing.points, coord(x-16), coord(y-drawing.y))drawing.pending = {mode=current_mode, center=j}endlines.current = drawingendendendend