Demo of an experimental lua-based markup language
on.draw = function()
	love.graphics.setColor(0,0,0)
	love.graphics.line(50, 0, 50, App.screen.height)
	for i=0,100 do
		love.graphics.print(tostring(i), 30, i*100)
		love.graphics.line(25, i*100, 75, i*100)
	end
	local vy0 = vy(0)
	love.graphics.line(100, vy0, 100, App.screen.height)
	for i=0,100 do
		love.graphics.print(tostring(i), 80, vy0+i*100)
	end
	love.graphics.line(vx(0), vy(0), vx(0), vy(1000000))
	love.graphics.line(vx(0), vy(0), vx(1000000), vy(0))
	for i=0,100 do
		love.graphics.print(tostring(i), vx(0)-20, vy(i*100))
	end
	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
			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