I'm trying to have everything be drawn to a canvas, then the canvas drawn to the window and stretched to fit it. To do this, I draw the canvas with a scaling factor of the window's dimensions divided by the canvas' dimensions. No matter what I do, my code produces errors.
Here's the line I'm having problems with:
Code: Select all
love.graphics.draw(mainCanvas, 0, 0, 0, love.window.getWidth/mainCanvas:getWidth, love.window.getHeight/mainCanvas:getHeight)
First of all, what does this mean? Can I use functions inside other functions? If I can, am I doing it right?
Even if I assign the values of the functions in question to variables first, then use the variables in the draw function, it still produces errors.