SRVDX4I5QKWAH3Y5DX25PG34U7NY55H46ZYG2APH47BUZT3EJ2HAC table.insert(Lines.current.shapes, Lines.current.pending)elseif Lines.current.pending.mode == 'line' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal j = Drawing.insert_point(Lines.current.points, mx,my)Lines.current.pending.p2 = jtable.insert(Lines.current.shapes, Lines.current.pending)
table.insert(drawing.shapes, drawing.pending)elseif drawing.pending.mode == 'line' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h thenlocal j = Drawing.insert_point(drawing.points, mx,my)drawing.pending.p2 = jtable.insert(drawing.shapes, drawing.pending)
elseif Lines.current.pending.mode == 'manhattan' thenlocal p1 = Lines.current.points[Lines.current.pending.p1]local mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h then
elseif drawing.pending.mode == 'manhattan' thenlocal p1 = drawing.points[drawing.pending.p1]local mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h then
local p2 = Lines.current.points[Lines.current.pending.p2]love.mouse.setPosition(16+Drawing.pixels(p2.x), Lines.current.y+Drawing.pixels(p2.y))table.insert(Lines.current.shapes, Lines.current.pending)
local p2 = drawing.points[drawing.pending.p2]love.mouse.setPosition(16+Drawing.pixels(p2.x), drawing.y+Drawing.pixels(p2.y))table.insert(drawing.shapes, drawing.pending)
elseif Lines.current.pending.mode == 'polygon' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thentable.insert(Lines.current.pending.vertices, Drawing.insert_point(Lines.current.points, mx,my))table.insert(Lines.current.shapes, Lines.current.pending)
elseif drawing.pending.mode == 'polygon' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h thentable.insert(drawing.pending.vertices, Drawing.insert_point(drawing.points, mx,my))table.insert(drawing.shapes, drawing.pending)
elseif Lines.current.pending.mode == 'rectangle' thenassert(#Lines.current.pending.vertices <= 2)if #Lines.current.pending.vertices == 2 thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal first = Lines.current.points[Lines.current.pending.vertices[1]]local second = Lines.current.points[Lines.current.pending.vertices[2]]
elseif drawing.pending.mode == 'rectangle' thenassert(#drawing.pending.vertices <= 2)if #drawing.pending.vertices == 2 thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h thenlocal first = drawing.points[drawing.pending.vertices[1]]local second = drawing.points[drawing.pending.vertices[2]]
table.insert(Lines.current.pending.vertices, Drawing.insert_point(Lines.current.points, thirdx,thirdy))table.insert(Lines.current.pending.vertices, Drawing.insert_point(Lines.current.points, fourthx,fourthy))table.insert(Lines.current.shapes, Lines.current.pending)
table.insert(drawing.pending.vertices, Drawing.insert_point(drawing.points, thirdx,thirdy))table.insert(drawing.pending.vertices, Drawing.insert_point(drawing.points, fourthx,fourthy))table.insert(drawing.shapes, drawing.pending)
elseif Lines.current.pending.mode == 'square' thenassert(#Lines.current.pending.vertices <= 2)if #Lines.current.pending.vertices == 2 thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal first = Lines.current.points[Lines.current.pending.vertices[1]]local second = Lines.current.points[Lines.current.pending.vertices[2]]
elseif drawing.pending.mode == 'square' thenassert(#drawing.pending.vertices <= 2)if #drawing.pending.vertices == 2 thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h thenlocal first = drawing.points[drawing.pending.vertices[1]]local second = drawing.points[drawing.pending.vertices[2]]
table.insert(Lines.current.pending.vertices, Drawing.insert_point(Lines.current.points, thirdx,thirdy))table.insert(Lines.current.pending.vertices, Drawing.insert_point(Lines.current.points, fourthx,fourthy))table.insert(Lines.current.shapes, Lines.current.pending)
table.insert(drawing.pending.vertices, Drawing.insert_point(drawing.points, thirdx,thirdy))table.insert(drawing.pending.vertices, Drawing.insert_point(drawing.points, fourthx,fourthy))table.insert(drawing.shapes, drawing.pending)
elseif Lines.current.pending.mode == 'circle' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal center = Lines.current.points[Lines.current.pending.center]Lines.current.pending.radius = geom.dist(center.x,center.y, mx,my)table.insert(Lines.current.shapes, Lines.current.pending)
elseif drawing.pending.mode == 'circle' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h thenlocal center = drawing.points[drawing.pending.center]drawing.pending.radius = geom.dist(center.x,center.y, mx,my)table.insert(drawing.shapes, drawing.pending)
elseif Lines.current.pending.mode == 'arc' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-Lines.current.y)if mx >= 0 and mx < 256 and my >= 0 and my < Lines.current.h thenlocal center = Lines.current.points[Lines.current.pending.center]Lines.current.pending.end_angle = geom.angle_with_hint(center.x,center.y, mx,my, Lines.current.pending.end_angle)table.insert(Lines.current.shapes, Lines.current.pending)
elseif drawing.pending.mode == 'arc' thenlocal mx,my = Drawing.coord(x-16), Drawing.coord(y-drawing.y)if mx >= 0 and mx < 256 and my >= 0 and my < drawing.h thenlocal center = drawing.points[drawing.pending.center]drawing.pending.end_angle = geom.angle_with_hint(center.x,center.y, mx,my, drawing.pending.end_angle)table.insert(drawing.shapes, drawing.pending)