Nocare3/love2dapi_chunks huggingface dataset:
Rasterizer:getHeight
Gets font height.
height = Rasterizer:getHeight()
height number Font height
Rasterizer:getLineHeight
Gets line height of a font.
height = Rasterizer:getLineHeight()
height number Line height of a font.
Rasterizer:hasGlyphs
Checks if font contains specified glyphs.
hasGlyphs = Rasterizer:hasGlyphs( glyph1, glyph2, ... )
glyph1 string or number Glyph
glyph2 string or number Glyph
... string or number Additional glyphs
hasGlyphs boolean Whatever font contains specified glyphs.
love.graphics.applyTransform
Applies the given Transform object to the current coordinate transformation.

This effectively multiplies the existing coordinate transformation's matrix with the Transform object's internal matrix to produce the new coordinate transformation.
love.graphics.applyTransform( transform )
transform Transform The Transform object to apply to the current graphics coordinate transform.
love.graphics.arc
Draws a filled or unfilled arc at position (x, y). The arc is drawn from angle1 to angle2 in radians. The segments parameter determines how many segments are used to draw the arc. The more segments, the smoother the edge.
love.graphics.arc( drawmode, x, y, radius, angle1, angle2, segments )
drawmode DrawMode How to draw the arc.
x number The position of the center along x-axis.
y number The position of the center along y-axis.
radius number Radius of the arc.
angle1 number The angle at which the arc begins.
angle2 number The angle at which the arc terminates.
segments (10) number The number of segments used for drawing the arc.
love.graphics.arc( drawmode, arctype, x, y, radius, angle1, angle2, segments )
drawmode DrawMode How to draw the arc.
arctype ArcType The type of arc to draw.
x number The position of the center along x-axis.
y number The position of the center along y-axis.
radius number Radius of the arc.
angle1 number The angle at which the arc begins.
angle2 number The angle at which the arc terminates.
segments (10) number The number of segments used for drawing the arc.
love.graphics.captureScreenshot
Creates a screenshot once the current frame is done (after love.draw has finished).

Since this function enqueues a screenshot capture rather than executing it immediately, it can be called from an input callback or love.update and it will still capture all of what's drawn to the screen in that frame.
love.graphics.captureScreenshot( filename )
filename string The filename to save the screenshot to. The encoded image type is determined based on the extension of the filename, and must be one of the ImageFormats.
love.graphics.captureScreenshot( callback )
callback function Function which gets called once the screenshot has been captured. An ImageData is passed into the function as its only argument.
love.graphics.captureScreenshot( channel )
channel Channel The Channel to push the generated ImageData to.
love.graphics.circle
Draws a circle.
love.graphics.circle( mode, x, y, radius )
mode DrawMode How to draw the circle.
x number The position of the center along x-axis.
y number The position of the center along y-axis.
radius number The radius of the circle.
love.graphics.circle( mode, x, y, radius, segments )
mode DrawMode How to draw the circle.
x number The position of the center along x-axis.
y number The position of the center along y-axis.
radius number The radius of the circle.
segments number The number of segments used for drawing the circle. Note: The default variable for the segments parameter varies between different versions of LÖVE.
love.graphics.clear
Clears the screen or active Canvas to the specified color.

This function is called automatically before love.draw in the default love.run function. See the example in love.run for a typical use of this function.

Note that the scissor area bounds the cleared region.

In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.

In versions prior to background color instead.
love.graphics.clear()
love.graphics.clear( r, g, b, a, clearstencil, cleardepth )
r number The red channel of the color to clear the screen to.
g number The green channel of the color to clear the screen to.
b number The blue channel of the color to clear the screen to.
a (1) number The alpha channel of the color to clear the screen to.
clearstencil (true) boolean Whether to clear the active stencil buffer, if present. It can also be an integer between 0 and 255 to clear the stencil buffer to a specific value.
cleardepth (true) boolean Whether to clear the active depth buffer, if present. It can also be a number between 0 and 1 to clear the depth buffer to a specific value.
love.graphics.clear( color, ..., clearstencil, cleardepth )
color table A table in the form of {r, g, b, a} containing the color to clear the first active Canvas to.
... table Additional tables for each active Canvas.
clearstencil (true) boolean Whether to clear the active stencil buffer, if present. It can also be an integer between 0 and 255 to clear the stencil buffer to a specific value.
cleardepth (true) boolean Whether to clear the active depth buffer, if present. It can also be a number between 0 and 1 to clear the depth buffer to a specific value.
love.graphics.clear( clearcolor, clearstencil, cleardepth )
clearcolor boolean Whether to clear the active color canvas to transparent black (0, 0, 0, 0). Typically this should be set to false with this variant of the function.
clearstencil boolean Whether to clear the active stencil buffer, if present. It can also be an integer between 0 and 255 to clear the stencil buffer to a specific value.
cleardepth boolean Whether to clear the active depth buffer, if present. It can also be a number between 0 and 1 to clear the depth buffer to a specific value.
love.graphics.discard
Discards (trashes) the contents of the screen or active Canvas. This is a performance optimization function with niche use cases.

If the active Canvas has just been changed and the 'replace' BlendMode is about to be used to draw something which covers the entire screen, calling love.graphics.discard rather than calling love.graphics.clear or doing nothing may improve performance on mobile devices.

On some desktop systems this function may do nothing.
love.graphics.discard( discardcolor, discardstencil )
discardcolor (true) boolean Whether to discard the texture(s) of the active Canvas(es) (the contents of the screen if no Canvas is active.)
discardstencil (true) boolean Whether to discard the contents of the stencil buffer of the screen / active Canvas.
love.graphics.discard( discardcolors, discardstencil )
discardcolors table An array containing boolean values indicating whether to discard the texture of each active Canvas, when multiple simultaneous Canvases are active.
discardstencil (true) boolean Whether to discard the contents of the stencil buffer of the screen / active Canvas.
love.graphics.draw
Draws a Drawable object (an Image, Canvas, SpriteBatch, ParticleSystem, Mesh, Text object, or Video) on the screen with optional rotation, scaling and shearing.

Objects are drawn relative to their local coordinate system. The origin is by default located at the top left corner of Image and Canvas. All scaling, shearing, and rotation arguments transform the object relative to that point. Also, the position of the origin can be specified on the screen coordinate system.

It's possible to rotate an object about its center by offsetting the origin to the center. Angles must be given in radians for rotation. One can also use a negative scaling factor to flip about its centerline.

Note that the offsets are applied before rotation, scaling, or shearing; scaling and shearing are applied before rotation.

The right and bottom edges of the object are shifted at an angle defined by the shearing factors.

When using the default shader anything drawn with this function will be tinted according to the currently selected color. Set it to pure white to preserve the object's original colors.
love.graphics.draw( drawable, x, y, r, sx, sy, ox, oy, kx, ky )
drawable Drawable A drawable object.
x (0) number The position to draw the object (x-axis).
y (0) number The position to draw the object (y-axis).
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.draw( texture, quad, x, y, r, sx, sy, ox, oy, kx, ky )
texture Texture A Texture (Image or Canvas) to texture the Quad with.
quad Quad The Quad to draw on screen.
x number The position to draw the object (x-axis).
y number The position to draw the object (y-axis).
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.draw( drawable, transform )
drawable Drawable A drawable object.
transform Transform Transformation object.
love.graphics.draw( texture, quad, transform )
texture Texture A Texture (Image or Canvas) to texture the Quad with.
quad Quad The Quad to draw on screen.
transform Transform Transformation object.
love.graphics.drawInstanced
Draws many instances of a Mesh with a single draw call, using hardware geometry instancing.

Each instance can have unique properties (positions, colors, etc.) but will not by default unless a custom per-instance vertex attributes or the love_InstanceID GLSL 3 vertex shader variable is used, otherwise they will all render at the same position on top of each other.

Instancing is not supported by some older GPUs that are only capable of using OpenGL ES 2 or OpenGL 2. Use love.graphics.getSupported to check.
love.graphics.drawInstanced( mesh, instancecount, x, y, r, sx, sy, ox, oy, kx, ky )
mesh Mesh The mesh to render.
instancecount number The number of instances to render.
x (0) number The position to draw the instances (x-axis).
y (0) number The position to draw the instances (y-axis).
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.drawInstanced( mesh, instancecount, transform )
mesh Mesh The mesh to render.
instancecount number The number of instances to render.
transform Transform A transform object.
love.graphics.drawLayer
Draws a layer of an Array Texture.
love.graphics.drawLayer( texture, layerindex, x, y, r, sx, sy, ox, oy, kx, ky )
texture Texture The Array Texture to draw.
layerindex number The index of the layer to use when drawing.
x (0) number The position to draw the texture (x-axis).
y (0) number The position to draw the texture (y-axis).
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.drawLayer( texture, layerindex, quad, x, y, r, sx, sy, ox, oy, kx, ky )
texture Texture The Array Texture to draw.
layerindex number The index of the layer to use when drawing.
quad Quad The subsection of the texture's layer to use when drawing.
x (0) number The position to draw the texture (x-axis).
y (0) number The position to draw the texture (y-axis).
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis).
sy (sx) number Scale factor (y-axis).
ox (0) number Origin offset (x-axis).
oy (0) number Origin offset (y-axis).
kx (0) number Shearing factor (x-axis).
ky (0) number Shearing factor (y-axis).
love.graphics.drawLayer( texture, layerindex, transform )
texture Texture The Array Texture to draw.
layerindex number The index of the layer to use when drawing.
transform Transform A transform object.
love.graphics.drawLayer( texture, layerindex, quad, transform )
texture Texture The Array Texture to draw.
layerindex number The index of the layer to use when drawing.
quad Quad The subsection of the texture's layer to use when drawing.
transform Transform A transform object.
love.graphics.ellipse
Draws an ellipse.
love.graphics.ellipse( mode, x, y, radiusx, radiusy )
mode DrawMode How to draw the ellipse.
x number The position of the center along x-axis.
y number The position of the center along y-axis.
radiusx number The radius of the ellipse along the x-axis (half the ellipse's width).
radiusy number The radius of the ellipse along the y-axis (half the ellipse's height).
love.graphics.ellipse( mode, x, y, radiusx, radiusy, segments )
mode DrawMode How to draw the ellipse.
x number The position of the center along x-axis.
y number The position of the center along y-axis.
radiusx number The radius of the ellipse along the x-axis (half the ellipse's width).
radiusy number The radius of the ellipse along the y-axis (half the ellipse's height).
segments number The number of segments used for drawing the ellipse.
love.graphics.flushBatch
Immediately renders any pending automatically batched draws.

LÖVE will call this function internally as needed when most state is changed, so it is not necessary to manually call it.

The current batch will be automatically flushed by love.graphics state changes (except for the transform stack and the current color), as well as Shader:send and methods on Textures which change their state. Using a different Image in consecutive love.graphics.draw calls will also flush the current batch.

SpriteBatches, ParticleSystems, Meshes, and Text objects do their own batching and do not affect automatic batching of other draws, aside from flushing the current batch when they're drawn.
love.graphics.flushBatch()
love.graphics.getBackgroundColor
Gets the current background color.

In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
r, g, b, a = love.graphics.getBackgroundColor()
r number The red component (0-1).
g number The green component (0-1).
b number The blue component (0-1).
a number The alpha component (0-1).
love.graphics.getBlendMode
Gets the blending mode.
mode, alphamode = love.graphics.getBlendMode()
mode BlendMode The current blend mode.
alphamode BlendAlphaMode The current blend alpha mode – it determines how the alpha of drawn objects affects blending.
love.graphics.getCanvas
Gets the current target Canvas.
canvas = love.graphics.getCanvas()
canvas Canvas The Canvas set by setCanvas. Returns nil if drawing to the real screen.
love.graphics.getCanvasFormats
Gets the available Canvas formats, and whether each is supported.
formats = love.graphics.getCanvasFormats()
formats table A table containing CanvasFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.
formats = love.graphics.getCanvasFormats( readable )
readable boolean If true, the returned formats will only be indicated as supported if readable flag set to true for that format, and vice versa if the parameter is false.
formats table A table containing CanvasFormats as keys, and a boolean indicating whether the format is supported as values (taking into account the readable parameter). Not all systems support all formats.
love.graphics.getColor
Gets the current color.

In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
r, g, b, a = love.graphics.getColor()
r number The red component (0-1).
g number The green component (0-1).
b number The blue component (0-1).
a number The alpha component (0-1).
love.graphics.getColorMask
Gets the active color components used when drawing. Normally all 4 components are active unless love.graphics.setColorMask has been used.

The color mask determines whether individual components of the colors of drawn objects will affect the color of the screen. They affect love.graphics.clear and Canvas:clear as well.
r, g, b, a = love.graphics.getColorMask()
r boolean Whether the red color component is active when rendering.
g boolean Whether the green color component is active when rendering.
b boolean Whether the blue color component is active when rendering.
a boolean Whether the alpha color component is active when rendering.
love.graphics.getDPIScale
Gets the DPI scale factor of the window.

The DPI scale factor represents relative pixel density. The pixel density inside the window might be greater (or smaller) than the 'size' of the window. For example on a retina screen in Mac OS X with the highdpi window flag enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. love.graphics.getDPIScale() would return 2 in that case.

The love.window.fromPixels and love.window.toPixels functions can also be used to convert between units.

The highdpi window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled.
scale = love.graphics.getDPIScale()
scale number The pixel scale factor associated with the window.
love.graphics.getDefaultFilter
Returns the default scaling filters used with Images, Canvases, and Fonts.
min, mag, anisotropy = love.graphics.getDefaultFilter()
min FilterMode Filter mode used when scaling the image down.
mag FilterMode Filter mode used when scaling the image up.
anisotropy number Maximum amount of Anisotropic Filtering used.
love.graphics.getDepthMode
Gets the current depth test mode and whether writing to the depth buffer is enabled.

This is low-level functionality designed for use with custom vertex shaders and Meshes with custom vertex attributes. No higher level APIs are provided to set the depth of 2D graphics such as shapes, lines, and Images.
comparemode, write = love.graphics.getDepthMode()
comparemode CompareMode Depth comparison mode used for depth testing.
write boolean Whether to write update / write values to the depth buffer when rendering.
love.graphics.getDimensions
Gets the width and height in pixels of the window.
width, height = love.graphics.getDimensions()
width number The width of the window.
height number The height of the window.
love.graphics.getFont
Gets the current Font object.
font = love.graphics.getFont()
font Font The current Font. Automatically creates and sets the default font, if none is set yet.
love.graphics.getFrontFaceWinding
Gets whether triangles with clockwise- or counterclockwise-ordered vertices are considered front-facing.

This is designed for use in combination with Mesh face culling. Other love.graphics shapes, lines, and sprites are not guaranteed to have a specific winding order to their internal vertices.
winding = love.graphics.getFrontFaceWinding()
winding VertexWinding The winding mode being used. The default winding is counterclockwise ('ccw').
love.graphics.getHeight
Gets the height in pixels of the window.
height = love.graphics.getHeight()
height number The height of the window.
love.graphics.getImageFormats
Gets the raw and compressed pixel formats usable for Images, and whether each is supported.
formats = love.graphics.getImageFormats()
formats table A table containing PixelFormats as keys, and a boolean indicating whether the format is supported as values. Not all systems support all formats.
love.graphics.getLineJoin
Gets the line join style.
join = love.graphics.getLineJoin()
join LineJoin The LineJoin style.
love.graphics.getLineStyle
Gets the line style.
style = love.graphics.getLineStyle()
style LineStyle The current line style.
love.graphics.getLineWidth
Gets the current line width.
width = love.graphics.getLineWidth()
width number The current line width.
love.graphics.getMeshCullMode
Gets whether back-facing triangles in a Mesh are culled.

Mesh face culling is designed for use with low level custom hardware-accelerated 3D rendering via custom vertex attributes on Meshes, custom vertex shaders, and depth testing with a depth buffer.
mode = love.graphics.getMeshCullMode()
mode CullMode The Mesh face culling mode in use (whether to render everything, cull back-facing triangles, or cull front-facing triangles).
love.graphics.getPixelDimensions
Gets the width and height in pixels of the window.

love.graphics.getDimensions gets the dimensions of the window in units scaled by the screen's DPI scale factor, rather than pixels. Use getDimensions for calculations related to drawing to the screen and using the graphics coordinate system (calculating the center of the screen, for example), and getPixelDimensions only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example).
pixelwidth, pixelheight = love.graphics.getPixelDimensions()
pixelwidth number The width of the window in pixels.
pixelheight number The height of the window in pixels.
love.graphics.getPixelHeight
Gets the height in pixels of the window.

The graphics coordinate system and DPI scale factor, rather than raw pixels. Use getHeight for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelHeight only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example).
pixelheight = love.graphics.getPixelHeight()
pixelheight number The height of the window in pixels.
love.graphics.getPixelWidth
Gets the width in pixels of the window.

The graphics coordinate system and DPI scale factor, rather than raw pixels. Use getWidth for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelWidth only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example).
pixelwidth = love.graphics.getPixelWidth()
pixelwidth number The width of the window in pixels.
love.graphics.getPointSize
Gets the point size.
size = love.graphics.getPointSize()
size number The current point size.
love.graphics.getRendererInfo
Gets information about the system's video card and drivers.
name, version, vendor, device = love.graphics.getRendererInfo()
name string The name of the renderer, e.g. 'OpenGL' or 'OpenGL ES'.
version string The version of the renderer with some extra driver-dependent version info, e.g. '2.1 INTEL-8.10.44'.
vendor string The name of the graphics card vendor, e.g. 'Intel Inc'.
device string The name of the graphics card, e.g. 'Intel HD Graphics 3000 OpenGL Engine'.
love.graphics.getScissor
Gets the current scissor box.
x, y, width, height = love.graphics.getScissor()
x number The x-component of the top-left point of the box.
y number The y-component of the top-left point of the box.
width number The width of the box.
height number The height of the box.
love.graphics.getShader
Gets the current Shader. Returns nil if none is set.
shader = love.graphics.getShader()
shader Shader The currently active Shader, or nil if none is set.
love.graphics.getStackDepth
Gets the current depth of the transform / state stack (the number of pushes without corresponding pops).
depth = love.graphics.getStackDepth()
depth number The current depth of the transform and state love.graphics stack.