line->circle circle->line line->polygon polygon->line circle->polygon polygon->circle
RXE6NQTNS7MFNF24KFEQRVCZFQ44MDO5HPSQGQD555HPEMQA76DAC ZOOY3ME4BUD6RLWCKZFA62JNN4BMPOXH24HGTFWPWEKDECOXMFUAC NL5J7Z5H577GPKGNS5TDRVWC55VLA2UCZE34F5WR4AJ5N265UECAC OTIBCAUJ3KDQJLVDN3A536DLZGNRYMGJLORZVR3WLCGXGO6UGO6AC H7OEU6WPOKOSKV5RNAM5W62V5SYOY7VEA5VOK6JD5UEBUBIMOKUQC IFGAJAF7UWM236QV4NWP2C67TJPQGXNBC2RTZCOWPJUJYYC2MMXAC HWPK4SMPGZMXWXKCVX667676ZWN5Q2XZSTMVAADG7JNRF6XE45RQC local drawing = current_drawing()if drawing.pending.mode == 'line' thendrawing.pending.vertices = {drawing.pending.p1}elseif drawing.pending.mode == 'circle' or drawing.pending.mode == 'arc' thendrawing.pending.vertices = {drawing.pending.center}enddrawing.pending.mode = 'polygon'
elseif love.mouse.isDown('1') and chord == 'c' thencurrent_mode = 'circle'local drawing = current_drawing()if drawing.pending.mode == 'line' thendrawing.pending.center = drawing.pending.p1elseif drawing.pending.mode == 'polygon' thendrawing.pending.center = drawing.pending.vertices[1]enddrawing.pending.mode = 'circle'
assert(drawing.pending.mode == 'freehand')
if drawing.pending.mode == 'freehand' thendrawing.pending.p1 = insert_point(drawing.points, drawing.pending.points[1].x, drawing.pending.points[1].y)elseif drawing.pending.mode == 'circle' or drawing.pending.mode == 'arc' thendrawing.pending.p1 = drawing.pending.centerend