Version 0.3.2
LÖVE Documentation
OverviewLicenseCreditsInstallingGetting started
Devices
love.graphicslove.audiolove.keyboardlove.mouselove.filesystemlove.timerlove.system
Types
AnimationColorFontFileImageMusicParticleSystemSound
Callbacks
loadupdatedrawmousepressedmousereleasedkeypressedkeyreleased
Miscellaneous
ConstantsConfig filesKeyboard shortcuts
Function
love.graphics.draw( sprite, x, y, angle, sx, sy )
Usage
love.graphics.draw( sprite, x, y, angle, sx, sy )
Arguments
spriteAn Image or Animation object.
xThe position on the x-axis.
yThe position on the y-axis.
angleThe angle of rotation (in degrees).
sxThe scale factor along the x-axis.
syThe scale factor along the y-axis.
Returns
Nothing
Examples
Example 1: Draw an image in different scales scaled. image = love.graphics.newImage("image.png")
love.graphics.draw(image, 50, 50, 0, 1, 2) -- tall image
love.graphics.draw(image, 50, 50, 0, 2, 1) -- wide image
love.graphics.draw(image, 50, 50, 0, 2, 2) -- image is twice as big