What exactly is the connection between an image's centre (as set by setCenter, or the default centre), and the position of a partial image on the screen? I have a feeling that any partial bitmap is automatically centred, regardless of setCenter (and that there is no control over the centre of the partial image).
For example, I have this code:
Code: Select all
function load()
image = love.graphics.newImage("square.png")
image:setCentre(0, 0)
end
The image is a 100x100 pixels square. When I draw it like this:
Code: Select all
love.graphics.draw(image, 100, 100)
it's doing what I'm asking it to do, but when I draw it like this:
Code: Select all
love.graphics.draws(image, 100, 100, 0, 0, 100, 100)
the image is centred about (100, 100). I don't think I have any control over the centre point of the partial bitmap.
I thought that this could be a solution to the sprite-sheet problem (and the image-from-image suggestion), but having no control over the centre point means that I can't (for example) rotate a partial image about its real centre (unless it's exactly the bitmap's centre).