Deleting a point deletes all shapes that use it (but not other points in those shapes).
FBDRL6LHPTBPMU3R356OLY4XE4ELQQEDXMCZGCBT2RFHLR7VQXQAC VQFBNHU4GQYICYL6I7HTYHWAL4J2YQNPG6SDCNOEQL4CJ7OQAULQC T664AOUGOSFMPZAO6OGKJ26R22ORJUIBVG3QZOJL24MQXYEHBXOQC GCUARQ2GJT3Y5K6LOOA6S7SOBMSXU7VV7LT355TOMFFPBQ3ZVYKAC SNDZOK6QJUASKYLYBHIATA7WXPCPZTEYEWA63I4H7HH3JT3B4U6AC IFGAJAF7UWM236QV4NWP2C67TJPQGXNBC2RTZCOWPJUJYYC2MMXAC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC ZOOY3ME4BUD6RLWCKZFA62JNN4BMPOXH24HGTFWPWEKDECOXMFUAC JCSLDGAH2F6AIY4Z6XM6K4LOMW7EFY3E4NF5YXLMHLTYTX3A4Z3QC D2GCFTTT2RNUBFB243YTA4F2H5ZXFTFHBSKHLZ2CX4JSKRZFTUUQC WDWXNW7VH57W6KXBNXFV6NPIO5RUS7Q6QNGGI4R6HWIRXLYI5NSAC 3XD6M3CFKZJR365MHXUWJ4HGSDTPYO6WYZ4RGW7ECBBITKVQX24QC WAZVXUV2LMNGGR6WQ3NIFGSKYYLHMQAOM6VPRU4O2A3IJVLSSEZAC HWPK4SMPGZMXWXKCVX667676ZWN5Q2XZSTMVAADG7JNRF6XE45RQC if near(p, mx,my) thenlove.graphics.setColor(1,0,0)love.graphics.circle('line', pixels(p.x)+16,pixels(p.y)+line.y, 4)elselove.graphics.setColor(0,0,0)love.graphics.circle('fill', pixels(p.x)+16,pixels(p.y)+line.y, 2)
if p.deleted == nil thenif near(p, mx,my) thenlove.graphics.setColor(1,0,0)love.graphics.circle('line', pixels(p.x)+16,pixels(p.y)+line.y, 4)elselove.graphics.setColor(0,0,0)love.graphics.circle('fill', pixels(p.x)+16,pixels(p.y)+line.y, 2)end
endelseif chord == 'C-d' and not love.mouse.isDown('1') thenlocal drawing,i,p = select_point_at_mouse()if drawing thenfor _,shape in ipairs(drawing.shapes) doif contains_point(shape, i) thenshape.mode = 'deleted'endenddrawing.points[i].deleted = trueendlocal drawing,i,shape = select_shape_at_mouse()if drawing thenshape.mode = 'deleted'
function contains_point(shape, p)if shape.mode == 'freehand' then-- not supportedelseif shape.mode == 'line' thenprint(p, shape.p1, shape.p2)return shape.p1 == p or shape.p2 == pelseif shape.mode == 'polygon' thenreturn table.find(shape.vertices, p)elseif shape.mode == 'circle' thenreturn shape.center == pelseif shape.mode == 'arc' thenreturn shape.center == p-- ugh, how to support angleselseif shape.mode == 'deleted' then-- already doneelseassert(false)endend