Image rotation
Posted: Sat Jan 07, 2012 9:49 pm
Hello.
How to rotate the image created by love.graphics.newImage()?
Very thanks for replies.
How to rotate the image created by love.graphics.newImage()?
Very thanks for replies.
Code: Select all
function love.draw()
love.graphics.rotate(angleInRadians) -- Rotates all items drawn.
love.graphics.draw(yourImage,x,y) -- Draws your image.
end
Code: Select all
radian = angle*math.pi/180
Code: Select all
love.graphics.draw(image, x, y, rotation_in_radians, scale_x, scale_y, offset_x, offset_y)