Skip to content

Instantly share code, notes, and snippets.

@denisdefreyne
Created October 27, 2013 18:42
Show Gist options
  • Save denisdefreyne/7186301 to your computer and use it in GitHub Desktop.
Save denisdefreyne/7186301 to your computer and use it in GitHub Desktop.
function love.load()
love.graphics.setBackgroundColor(203, 232, 247)
end
function love.update(dt)
end
function love.draw()
love.graphics.setColor(255, 0, 0, 255)
love.graphics.setColor(168, 89, 8, 255)
love.graphics.setLineWidth(5)
scaleAndDraw(5)
end
function draw()
love.graphics.circle("line", 50, 50, 20, 7)
end
function scaleAndDraw(limit)
if limit > 0 then
draw()
love.graphics.push()
love.graphics.scale(2, 2)
scaleAndDraw(limit-1)
love.graphics.pop()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment