on.draw = function() for _,obj in ipairs(Surface) do love.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0) if obj.type == 'rectangle' then if obj.text_node and obj.text_node == Cursor_node.surface_node then love.graphics.setColor(0.7, 0.7, 0, 0.4) end love.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h), scale(obj.rx or 0),scale(obj.ry or obj.rx or 0)) elseif obj.type == 'line' then love.graphics.line(unpack(obj.zdata)) elseif obj.type == 'circle' then love.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius)) elseif obj.type == 'arc' then love.graphics.arc(obj.drawmode or 'line', obj.arctype or 'open', vx(obj.x), vy(obj.y), scale(obj.radius), obj.angle1, obj.angle2, obj.segments) elseif obj.type == 'ellipse' then love.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy)) elseif obj.type == 'bezier' then love.graphics.line(unpack(obj.zdata)) elseif obj.type == 'text' then if obj.w == nil then love.graphics.draw(obj.text, vx(obj.x), vy(obj.y)) else edit.draw(obj.editor, obj.fg or {r=0,g=0,b=0}, not obj.show_cursor) end end end end