love.graphics

The graphics module.

The graphics module is responsible for things like window management, Images, Animations, Fonts, and more.

Types

DrawableSuperclass for all things that can be drawn on screen.
FontDefines the shape of characters than can be drawn onto the screen.
Font (Français)Définit la forme de caractères qui peuvent être tracés à l'écran.
FramebufferOff-screen render target.
ImageDrawable image type.
ParticleSystemUsed to create cool effects, like fire.
QuadA quadrilateral with texture coordinate information.
SpriteBatchStore image positions in a buffer, and draw it in one call.

Functions

love.graphics.checkModeChecks if a display mode is supported.
love.graphics.circleDraws a circle.
love.graphics.clearClears the screen or active Canvas to the specified color.
love.graphics.drawDraws objects on screen.
love.graphics.drawqDraw a Quad with the specified Image on screen.
love.graphics.getBackgroundColorGets the current background color.
love.graphics.getBlendModeGets the blending mode.
love.graphics.getCaptionGets the window caption.
love.graphics.getColorGets the current color.
love.graphics.getColorModeGets the color mode (which controls how images are affected by the current color).
love.graphics.getHeightGets the height in pixels of the window.
love.graphics.getLineStippleGets the current line stipple.
love.graphics.getLineStyleGets the line style.
love.graphics.getLineWidthGets the current line width.
love.graphics.getMaxPointSizeGets the max supported point size.
love.graphics.getModesGets a list of supported fullscreen modes.
love.graphics.getPointSizeGets the point size.
love.graphics.getPointStyleGets the current point style.
love.graphics.getScissorGets the current scissor box.
love.graphics.getWidthGets the width in pixels of the window.
love.graphics.isCreatedChecks if the window has been created.
love.graphics.lineDraws lines between points.
love.graphics.newFontCreates a new Font from a TrueType Font or BMFont file.
love.graphics.newFramebufferCreates a new Framebuffer.
love.graphics.newImageCreates a new Image.
love.graphics.newImageFontCreates a new Font by loading a specifically formatted image.
love.graphics.newParticleSystemCreates a new ParticleSystem.
love.graphics.newQuadCreates a new Quad.
love.graphics.newScreenshotCreates a screenshot and returns the ImageData.
love.graphics.newSpriteBatchCreates a new SpriteBatch.
love.graphics.pointDraws a point.
love.graphics.polygonDraw a polygon.
love.graphics.popPops the current coordinate transformation from the transformation stack.
love.graphics.presentDisplays the results of drawing operations on the screen.
love.graphics.printDraws text on screen. If no Font is set, one will be created and set (once) if needed.
love.graphics.printfDraws formatted text, with word wrap and alignment.
love.graphics.pushCopies and pushes the current coordinate transformation to the transformation stack.
love.graphics.quadDraws a quadrilateral shape.
love.graphics.rectangleDraws a rectangle.
love.graphics.resetResets the current graphics settings.
love.graphics.rotateRotates the coordinate system in two dimensions.
love.graphics.scaleScales the coordinate system in two dimensions.
love.graphics.setBackgroundColorSets the background color.
love.graphics.setBlendModeSets the blending mode.
love.graphics.setCaptionSets the window caption.
love.graphics.setColorSets the color used for drawing.
love.graphics.setColorModeSets the color mode (which controls how images are affected by the current color).
love.graphics.setFontSet an already-loaded Font as the current font.
love.graphics.setIconSet window icon.
love.graphics.setLineSets the line width and style.
love.graphics.setLineStippleSets the line stipple pattern.
love.graphics.setLineStyleSets the line style.
love.graphics.setLineWidthSets the line width.
love.graphics.setModeChanges the display mode.
love.graphics.setPointSets the point size and style.
love.graphics.setPointSizeSets the point size.
love.graphics.setPointStyleSets the point style.
love.graphics.setRenderTargetCaptures drawing operations to a Framebuffer
love.graphics.setScissorSets or disables scissor.
love.graphics.toggleFullscreenToggles fullscreen.
love.graphics.translateTranslates the coordinate system in two dimensions.
love.graphics.triangleDraws a triangle.

Enums

AlignModeText alignment.
BlendModeDifferent ways to do color blending.
ColorModeControls how drawn images are affected by current color.
DrawModeControls whether shapes are drawn as an outline, or filled.
FilterModeHow the image is filtered when scaling.
LineStyleThe styles in which lines are drawn.
PointStyleHow points should be drawn.
WrapModeHow the image wraps inside a large Quad.

See Also

Other Languages