love.graphics

The graphics module.

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

Types

CanvasOff-screen render target.
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.
MeshA 2D polygon mesh used for drawing arbitrary textured shapes.
ParticleSystemUsed to create cool effects, like fire.
PixelEffectPixel shader effect.
QuadA quadrilateral with texture coordinate information.
ShaderShader effect.
SpriteBatchStore image positions in a buffer, and draw it in one call.
TextDrawable text.
TextureSuperclass for drawable objects which represent a texture.
VideoA drawable video.

Functions

love.graphics.applyTransformApplies the given Transform object to the current coordinate transformation.
love.graphics.arcDraws an arc.
love.graphics.captureScreenshotCreates a screenshot once the current frame is done.
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.discardDiscards the contents of the screen or active Canvas.
love.graphics.drawDraws objects on screen.
love.graphics.drawInstancedDraws many instances of a Mesh with a single draw call, using hardware geometry instancing.
love.graphics.drawLayerDraws a layer of an Array Texture.
love.graphics.drawqDraw a Quad with the specified Image on screen.
love.graphics.ellipseDraws an ellipse.
love.graphics.flushBatchImmediately renders any pending automatically batched draws.
love.graphics.getBackgroundColorGets the current background color.
love.graphics.getBlendModeGets the blending mode.
love.graphics.getCanvasReturns the current target Canvas.
love.graphics.getCanvasFormatsGets the available Canvas formats, and whether each is supported.
love.graphics.getCaptionGets the window caption.
love.graphics.getColorGets the current color.
love.graphics.getColorMaskGets the active color components used when drawing.
love.graphics.getColorModeGets the color mode (which controls how images are affected by the current color).
love.graphics.getCompressedImageFormatsGets the available compressed image formats, and whether each is supported.
love.graphics.getDPIScaleGets the DPI scale factor of the window.
love.graphics.getDefaultFilterReturns the default scaling filters used with Images, Canvases, and Fonts.
love.graphics.getDefaultImageFilterReturns the default scaling filters.
love.graphics.getDepthModeGets the current depth test mode and whether writing to the depth buffer is enabled.
love.graphics.getDimensionsGets the width and height of the window.
love.graphics.getFontGets the current Font object.
love.graphics.getFrontFaceWindingGets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing.
love.graphics.getHeightGets the height in pixels of the window.
love.graphics.getImageFormatsGets the pixel formats usable for Images, and whether each is supported.
love.graphics.getLineJoinGets the line join style.
love.graphics.getLineStippleGets the current line stipple.
love.graphics.getLineStyleGets the line style.
love.graphics.getLineWidthGets the current line width.
love.graphics.getMaxImageSizeGets the max supported width or height of Images and Canvases.
love.graphics.getMaxPointSizeGets the max supported point size.
love.graphics.getMeshCullModeGets whether back-facing triangles in a Mesh are culled.
love.graphics.getModeReturns the current display mode.
love.graphics.getModesGets a list of supported fullscreen modes.
love.graphics.getPixelDimensionsGets the width and height in pixels of the window.
love.graphics.getPixelEffectReturns the current PixelEffect.
love.graphics.getPixelHeightGets the height in pixels of the window.
love.graphics.getPixelWidthGets the width in pixels of the window.
love.graphics.getPointSizeGets the point size.
love.graphics.getPointStyleGets the current point style.
love.graphics.getRendererInfoGets information about the system's video card and drivers.
love.graphics.getScissorGets the current scissor box.
love.graphics.getShaderGets the current Shader.
love.graphics.getStackDepthGets the current depth of the transform / state stack (the number of pushes without corresponding pops).
... further results

Enums

AlignModeText alignment.
ArcTypeDifferent types of arcs that can be drawn.
BlendAlphaModeDifferent ways alpha affects color blending.
BlendModeDifferent ways to do color blending.
CanvasFormatCanvas texture formats.
ColorModeControls how drawn images are affected by current color.
CompareModeDifferent types of stencil test and depth test comparisons.
CullModeHow Mesh geometry is culled when rendering.
DrawModeControls whether shapes are drawn as an outline, or filled.
FilterModeHow the image is filtered when scaling.
GraphicsFeatureGraphics features that can be checked for with love.graphics.getSupported.
GraphicsLimitTypes of system-dependent graphics limits.
IndexDataTypeVertex map datatype.
LineJoinLine join style.
LineStyleThe styles in which lines are drawn.
MeshDrawModeHow a Mesh's vertices are used when drawing.
MipmapModeControls whether a Canvas has mipmaps, and its behaviour when it does.
PixelFormatPixel formats for Textures, ImageData, and CompressedImageData.
PointStyleHow points should be drawn.
SpriteBatchUsageUsage hints for SpriteBatches and Meshes.
StackTypeGraphics state stack types used with love.graphics.push.
StencilActionHow a stencil function modifies the stencil values of pixels it touches.
TextureFormatControls the canvas texture format.
TextureTypeTypes of textures (2D, cubemap, etc.)
VertexAttributeStepThe frequency at which a vertex shader fetches the vertex attribute's data from the Mesh when it's drawn.
WrapModeHow the image wraps inside a large Quad.

See Also