load/save freehand strokes

[?]
May 15, 2022, 9:20 PM
LBQAAJN4CGSIEO3L4UNKYTPX6MRLUJYHCMRMFTFLLTTAGCRUSE7QC

Dependencies

  • [2] YKRF5V3Z starting to load/save
  • [3] FMQ74DP3 new mode: circle
  • [4] JCSLDGAH beginnings of support for multiple shapes
  • [5] IFGAJAF7 add a level of indirection to vertices of shapes
  • [6] ZD63LJ2T bugfix: keep the click to create a new drawing from creating a new shape in the drawing
  • [7] EFMLTMZG bugfix: restrict strokes to the drawing they started in
  • [8] JVRL5TWL store device-independent coordinates inside drawings
  • [9] HWPK4SMP new mode: manhattan
  • [10] S5JIPJPI .
  • [*] OTIBCAUJ love2d scaffold

Change contents

  • replacement in main.lua at line 230
    [3.2158][3.3:97]()
    drawing.pending = {mode=current_mode, points={x=coord(x-16), y=coord(y-drawing.y)}}
    [3.2158]
    [3.621]
    drawing.pending = {mode=current_mode, points={{x=coord(x-16), y=coord(y-drawing.y)}}}
  • edit in main.lua at line 787
    [2.871]
    [2.871]
    outfile:close()
  • replacement in main.lua at line 810
    [2.1489][2.1489:1522]()
    if shape.mode == 'line' then
    [2.1489]
    [2.1522]
    if shape.mode == 'freehand' then
    outfile:write(json.encode({mode='freehand', points={{x=40,y=47}}})..'\n')
    for k,v in pairs(shape) do
    print(k, v)
    end
    for k,v in pairs(shape.points) do
    print(k,v)
    if type(v) == 'table' then
    for k,v in pairs(v) do
    print('', k,v)
    end
    end
    end
    outfile:write(json.encode(shape)..'\n')
    elseif shape.mode == 'line' then
  • edit in main.lua at line 827
    [2.1662]
    [2.1662]
    elseif shape.mode == 'circle' then