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.drawf( string, x, y, limit, align )
Draws text in the current color, with word wrap and alignment.
Usage
love.graphics.drawf( string, x, y, limit, align )
Arguments
stringA text string.
xThe position on the x-axis.
yThe position on the y-axis.
limitWrap the line after this many horizontal pixels.
alignThe alignment
Returns
Nothing
Examples
Example 1: Draw text that cannot go beyond a 100 pixel wide box and aligned. love.graphics.draw("This text is going to be broken by the auto-breaker! Breakdown!", 50, 50, 100, love.align_left) -- left
love.graphics.draw("This text is going to be broken by the auto-breaker! Breakdown!", 50, 50, 100, love.align_center) -- center
love.graphics.draw("This text is going to be broken by the auto-breaker! Breakdown!", 50, 50, 100, love.align_right) -- right