■ Drawing |
love.graphics. | draw ( Drawable, x°, y°, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
love.graphics. | drawq ( Image/Canvas, Quad, x, y, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
■ Text |
love.graphics. | print ( text, x, y, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
love.graphics. | printf ( text, x, y, limit, align° ) |
■ Font |
Font = love.graphics. | newFont ( path/File/FileData°, size° ) |
Font = love.graphics. | setNewFont ( path/File/FileData°, size° ) |
Font = love.graphics. | newImageFont ( path/File/FileData/Image/ImageData, glyphs ) |
love.graphics. | get/setFont ( Font ) |
height = Font: | getHeight ( ) |
width = Font: | getWidth ( line ) |
width, lines = Font: | getWrap ( text, width ) |
Font: | get/setLineHeight ( height ) |
■ Shapes |
love.graphics. | line ( x1, y1, x2, y2, ... ) |
love.graphics. | polygon ( mode, ... ) |
love.graphics. | rectangle ( mode, x, y, width, height ) |
love.graphics. | circle ( mode, x, y, radius, segments° ) |
love.graphics. | arc ( mode, x, y, radius, angle1, angle2, segments° ) |
love.graphics. | point ( x, y ) |
| Line state |
love.graphics. | setLine ( width, style° ) |
love.graphics. | get/setLineWidth ( width ) |
love.graphics. | get/setLineStyle ( style ) |
| Point state |
love.graphics. | setPoint ( size, style ) |
love.graphics. | get/setPointSize ( size ) |
love.graphics. | get/setPointStyle ( style ) |
size = love.graphics. | getMaxPointSize ( ) |
■ Color |
love.graphics. | get/setColor ( red, green, blue, alpha° ) |
love.graphics. | get/setColorMode ( mode ) |
love.graphics. | get/setBackgroundColor ( red, green, blue, alpha° ) |
■ Blending |
love.graphics. | get/setBlendMode ( mode ) |
■ Draw region |
love.graphics. | get/setScissor ( x, y, width, height ) |
love.graphics. | setStencil ( function ) |
love.graphics. | setInvertedStencil ( function ) |
■ Coordinate system |
love.graphics. | translate ( dx, dy ) |
love.graphics. | rotate ( angle ) |
love.graphics. | scale ( sx, sy° ) |
love.graphics. | shear ( kx, ky ) |
| Stack |
love.graphics. | push ( ) |
love.graphics. | pop ( ) |
■ Image |
Image = love.graphics. | newImage ( path/File/ImageData ) |
pixels = Image: | getWidth/Height ( ) |
Image: | get/setFilter ( minify, magnify ) |
love.graphics. | get/setDefaultImageFilter ( minify, magnify ) |
Image: | get/setWrap ( horizontal, vertical ) |
■ Quad |
Quad = love.graphics. | newQuad ( x, y, width, height, sw, sh ) |
Quad: | get/setViewport ( x, y, width, height ) |
Quad: | flip ( x, y ) |
■ Canvas |
Canvas = love.graphics. | newCanvas ( width°, height° ) |
pixels = Canvas: | getWidth/Height ( ) |
love.graphics. | get/setCanvas ( ) |
Canvas: | renderTo ( function ) |
Canvas: | clear ( red, green, blue, alpha° ) |
ImageData = Canvas: | getImageData ( ) |
Canvas: | get/setFilter ( minify, magnify ) |
Canvas: | get/setWrap ( horizontal, vertical ) |
■ SpriteBatch |
SpriteBatch = love.graphics. | newSpriteBatch ( Image, size°, usage° ) |
SpriteBatch: | get/setImage ( Image ) |
id = SpriteBatch: | add ( x, y, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
id = SpriteBatch: | addq ( Quad, x, y, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
SpriteBatch: | set ( id, x, y, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
SpriteBatch: | setColor ( ) |
id = SpriteBatch: | setq ( id, Quad, x, y, r°, sx°, sy°, ox°, oy°, kx°, ky° ) |
SpriteBatch: | clear ( ) |
SpriteBatch: | bind ( ) |
SpriteBatch: | unbind ( ) |
■ ParticleSystem |
ParticleSystem = love.graphics. | newParticleSystem ( Image, buffer ) |
ParticleSystem: | setSprite ( Image ) |
ParticleSystem: | setBufferSize ( buffer ) |
ParticleSystem: | update ( dt ) |
| Controls |
ParticleSystem: | start ( ) |
ParticleSystem: | stop ( ) |
ParticleSystem: | pause ( ) |
ParticleSystem: | reset ( ) |
| Emitter |
ParticleSystem: | get/setPosition ( x, y ) |
ParticleSystem: | setLifetime ( life ) |
ParticleSystem: | setEmissionRate ( rate ) |
ParticleSystem: | get/setDirection ( direction ) |
ParticleSystem: | get/setSpread ( spread ) |
| Particles |
ParticleSystem: | setParticleLife ( min, max° ) |
ParticleSystem: | setColors ( r1, g1, b1, a1, r2, g2, b2, a2, ... ) |
ParticleSystem: | setSizes ( size1, size2, ... ) |
ParticleSystem: | setSizeVariation ( variation ) |
| Particle speed |
ParticleSystem: | setSpeed ( min, max° ) |
ParticleSystem: | setGravity ( min, max° ) |
ParticleSystem: | setRadialAcceleration ( min, max° ) |
ParticleSystem: | setTangentialAcceleration ( min, max° ) |
| Particle rotation |
ParticleSystem: | setRotation ( min, max° ) |
ParticleSystem: | setSpin ( min, max°, variation° ) |
ParticleSystem: | setSpinVariation ( variation ) |
ParticleSystem: | setOffset ( x, y ) |
| State |
count = ParticleSystem: | count ( ) |
active = ParticleSystem: | isActive ( ) |
empty = ParticleSystem: | isEmpty ( ) |
full = ParticleSystem: | isFull ( ) |
■ PixelEffect |
PixelEffect = love.graphics. | newPixelEffect ( code ) |
love.graphics. | get/setPixelEffect ( PixelEffect ) |
PixelEffect: | send ( name, value ) |
warnings = PixelEffect: | getWarnings ( ) |
■ ImageData |
ImageData = love.image. | newImageData ( path/File/FileData ) |
ImageData = love.image. | newImageData ( width, height ) |
pixels = ImageData: | getWidth/Height ( ) |
ImageData: | mapPixel ( function ) |
ImageData: | paste ( ImageData, dx, dy, sx, sy, sw, sh ) |
ImageData: | get/setPixel ( x, y, red, green, blue, alpha ) |
ImageData: | encode ( filename, format° ) |
pixels = ImageData: | getString ( ) |
■ Display |
ok = love.graphics. | get/setMode ( width°, height°, fullscreen°, vsync°, fsaa° ) |
pixels = love.graphics. | getWidth/Height ( ) |
ok = love.graphics. | toggleFullscreen ( ) |
focus = love.graphics. | hasFocus ( ) |
created = love.graphics. | isCreated ( ) |
| Window |
love.graphics. | get/setCaption ( caption ) |
love.graphics. | setIcon ( Image ) |
| Support |
modes = love.graphics. | getModes ( ) |
supported = love.graphics. | checkMode ( width, height, fullscreen° ) |
■ Miscellaneous |
ImageData = love.graphics. | newScreenshot ( ) |
isSupported = love.graphics. | isSupported ( ... ) |
love.graphics. | clear ( ) |
love.graphics. | present ( ) |
love.graphics. | reset ( ) |
■ Audio |
numSources = love.audio. | getNumSources ( ) |
love.audio. | get/setVolume ( volume ) |
■ Source |
Source = love.audio. | newSource ( path/File/SoundData, type° ) |
static = Source: | isStatic ( ) |
Source: | is/setLooping ( loop ) |
Source: | get/setVolume ( volume ) |
Source: | get/setVolumeLimits ( min, max ) |
Source: | get/setPitch ( pitch ) |
Source: | seek ( position, unit° ) |
position = Source: | tell ( unit° ) |
| Controls |
love.audio. | play ( Source ) |
love.audio. | stop ( Source ) |
love.audio. | pause ( Source ) |
love.audio. | resume ( Source ) |
love.audio. | rewind ( Source ) |
Source: | play ( ) |
Source: | stop ( ) |
Source: | pause ( ) |
Source: | resume ( ) |
Source: | rewind ( ) |
| State |
paused = Source: | isPaused ( ) |
stopped = Source: | isStopped ( ) |
| Spatial |
Source: | get/setPosition ( x, y, z ) |
Source: | get/setVelocity ( x, y, z ) |
Source: | get/setRolloff ( rolloff ) |
Source: | get/setDistance ( ref, max ) |
| Listener |
love.audio. | get/setPosition ( x, y, z ) |
love.audio. | get/setVelocity ( x, y, z ) |
love.audio. | get/setDistanceModel ( model ) |
■ SoundData |
SoundData = love.sound. | newSoundData ( path/File ) |
SoundData = love.sound. | newSoundData ( samples, rate°, bits°, channels° ) |
sample = SoundData: | getSample ( i ) |
SoundData: | setSample ( i, sample ) |
| Info |
bits = SoundData: | getBits ( ) |
channels = SoundData: | getChannels ( ) |
rate = SoundData: | getSampleRate ( ) |
■ Keyboard |
down = love.keyboard. | isDown ( key ) |
love.keyboard. | get/setKeyRepeat ( delay, interval ) |
■ Mouse |
down = love.mouse. | isDown ( button ) |
love.mouse. | get/setPosition ( x, y ) |
position = love.mouse. | getX/Y ( ) |
love.mouse. | isGrabbed/setGrab ( grabbed ) |
love.mouse. | is/setVisible ( visible ) |
■ Joystick |
down = love.joystick. | isDown ( joystick, button ) |
direction = love.joystick. | getAxis ( joystick, axis ) |
axisDirN = love.joystick. | getAxes ( joystick ) |
direction = love.joystick. | getHat ( joystick, hat ) |
dx, dy = love.joystick. | getBall ( joystick, ball ) |
| Info |
name = love.joystick. | getName ( joystick ) |
joysticks = love.joystick. | getNumJoysticks ( ) |
buttons = love.joystick. | getNumButtons ( joystick ) |
axes = love.joystick. | getNumAxes ( joystick ) |
hats = love.joystick. | getNumHats ( joystick ) |
balls = love.joystick. | getNumBalls ( joystick ) |
■ Filesystem |
data, size = love.filesystem. | read ( name, bytes° ) |
ok = love.filesystem. | write ( name, data, size° ) |
iterator = love.filesystem. | lines ( name ) |
chunk = love.filesystem. | load ( name ) |
items = love.filesystem. | enumerate ( dir ) |
ok = love.filesystem. | mkdir ( name ) |
ok = love.filesystem. | remove ( name ) |
modtime = love.filesystem. | getLastModified ( filename ) |
love.filesystem. | setIdentity ( name ) |
| Existence |
exists = love.filesystem. | exists ( filename ) |
isDir = love.filesystem. | isDirectory ( path ) |
isFile = love.filesystem. | isFile ( path ) |
| Directory paths |
path = love.filesystem. | getAppdataDirectory ( ) |
path = love.filesystem. | getSaveDirectory ( ) |
path = love.filesystem. | getUserDirectory ( ) |
path = love.filesystem. | getWorkingDirectory ( ) |
| FileData |
FileData = love.filesystem. | newFileData ( contents, name, decoder° ) |
■ File |
File = love.filesystem. | newFile ( filename ) |
ok = File: | open ( mode ) |
ok = File: | close ( ) |
data, size = File: | read ( bytes° ) |
ok = File: | write ( data, size° ) |
iterator = File: | lines ( ) |
ok = File: | seek ( position ) |
eof = File: | eof ( ) |
size = File: | getSize ( ) |
■ Event |
love.event. | push ( e, a, b, c, d ) |
love.event. | quit ( ) |
iterator = love.event. | poll ( ) |
e, a, b, c, d = love.event. | wait ( ) |
love.event. | pump ( ) |
love.event. | clear ( ) |
■ Thread |
Thread = love.thread. | newThread ( name, path/File/FileData ) |
Thread = love.thread. | getThread ( name ) |
threads = love.thread. | getThreads ( ) |
msgNames = Thread: | getKeys ( ) |
name = Thread: | getName ( ) |
Thread: | start ( ) |
Thread: | wait ( ) |
| Message box |
Thread: | set ( name, value ) |
value = Thread: | get ( name ) |
value = Thread: | peek ( name ) |
value = Thread: | demand ( name ) |
■ Timer |
fps = love.timer. | getFPS ( ) |
love.timer. | sleep ( s ) |
dt = love.timer. | getDelta ( ) |
love.timer. | step ( ) |
| Timing |
time = love.timer. | getMicroTime ( ) |
time = love.timer. | getTime ( ) |