main function
stringlengths
8
40
chunks
stringlengths
41
8.32k
repo_name
stringclasses
1 value
Rasterizer:getGlyphCount
Rasterizer:getGlyphCount Gets number of glyphs in font. count = Rasterizer:getGlyphCount() count number Glyphs count.
love2d-community.github.io/love-api
Rasterizer:getGlyphData
Rasterizer:getGlyphData Gets glyph data of a specified glyph. glyphData = Rasterizer:getGlyphData( glyph ) glyph string Glyph glyphData GlyphData Glyph data glyphData = Rasterizer:getGlyphData( glyphNumber ) glyphNumber number Glyph number glyphData GlyphData Glyph data
love2d-community.github.io/love-api
Rasterizer:getHeight
Rasterizer:getHeight Gets font height. height = Rasterizer:getHeight() height number Font height
love2d-community.github.io/love-api
Rasterizer:getLineHeight
Rasterizer:getLineHeight Gets line height of a font. height = Rasterizer:getLineHeight() height number Line height of a font.
love2d-community.github.io/love-api
Rasterizer:hasGlyphs
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.
love2d-community.github.io/love-api
love.graphics.applyTransform
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 ) trans...
love2d-community.github.io/love-api
love.graphics.arc
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 D...
love2d-community.github.io/love-api
love.graphics.captureScreenshot
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 ...
love2d-community.github.io/love-api
love.graphics.circle
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 Draw...
love2d-community.github.io/love-api
love.graphics.clear
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, colo...
love2d-community.github.io/love-api
love.graphics.discard
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.disc...
love2d-community.github.io/love-api
love.graphics.draw
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. A...
love2d-community.github.io/love-api
love.graphics.drawInstanced
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,...
love2d-community.github.io/love-api
love.graphics.drawLayer
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 pos...
love2d-community.github.io/love-api
love.graphics.ellipse
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). r...
love2d-community.github.io/love-api
love.graphics.flushBatch
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...
love2d-community.github.io/love-api
love.graphics.getBackgroundColor
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...
love2d-community.github.io/love-api
love.graphics.getBlendMode
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.
love2d-community.github.io/love-api
love.graphics.getCanvas
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.
love2d-community.github.io/love-api
love.graphics.getCanvasFormats
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.grap...
love2d-community.github.io/love-api
love.graphics.getColor
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 compone...
love2d-community.github.io/love-api
love.graphics.getColorMask
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.clea...
love2d-community.github.io/love-api
love.graphics.getDPIScale
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 tak...
love2d-community.github.io/love-api
love.graphics.getDefaultFilter
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 An...
love2d-community.github.io/love-api
love.graphics.getDepthMode
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, ...
love2d-community.github.io/love-api
love.graphics.getDimensions
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.
love2d-community.github.io/love-api
love.graphics.getFont
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.
love2d-community.github.io/love-api
love.graphics.getFrontFaceWinding
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...
love2d-community.github.io/love-api
love.graphics.getHeight
love.graphics.getHeight Gets the height in pixels of the window. height = love.graphics.getHeight() height number The height of the window.
love2d-community.github.io/love-api
love.graphics.getImageFormats
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 forma...
love2d-community.github.io/love-api
love.graphics.getLineJoin
love.graphics.getLineJoin Gets the line join style. join = love.graphics.getLineJoin() join LineJoin The LineJoin style.
love2d-community.github.io/love-api
love.graphics.getLineStyle
love.graphics.getLineStyle Gets the line style. style = love.graphics.getLineStyle() style LineStyle The current line style.
love2d-community.github.io/love-api
love.graphics.getLineWidth
love.graphics.getLineWidth Gets the current line width. width = love.graphics.getLineWidth() width number The current line width.
love2d-community.github.io/love-api
love.graphics.getMeshCullMode
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...
love2d-community.github.io/love-api
love.graphics.getPixelDimensions
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 s...
love2d-community.github.io/love-api
love.graphics.getPixelHeight
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...
love2d-community.github.io/love-api
love.graphics.getPixelWidth
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 whe...
love2d-community.github.io/love-api
love.graphics.getPointSize
love.graphics.getPointSize Gets the point size. size = love.graphics.getPointSize() size number The current point size.
love2d-community.github.io/love-api
love.graphics.getRendererInfo
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....
love2d-community.github.io/love-api
love.graphics.getScissor
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.
love2d-community.github.io/love-api
love.graphics.getShader
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.
love2d-community.github.io/love-api
love.graphics.getStackDepth
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.
love2d-community.github.io/love-api
love.graphics.getStats
love.graphics.getStats Gets performance-related rendering statistics. stats = love.graphics.getStats() stats table A table with the following fields: stats.drawcalls number The number of draw calls made so far during the current frame. stats.canvasswitches number The number of times the active Canvas has been switched ...
love2d-community.github.io/love-api
love.graphics.getStencilTest
love.graphics.getStencilTest Gets the current stencil test configuration. When stencil testing is enabled, the geometry of everything that is drawn afterward will be clipped / stencilled out based on a comparison between the arguments of this function and the stencil value of each pixel that the geometry touches. The ...
love2d-community.github.io/love-api
love.graphics.getSupported
love.graphics.getSupported Gets the optional graphics features and whether they're supported on the system. Some older or low-end systems don't always support all graphics features. features = love.graphics.getSupported() features table A table containing GraphicsFeature keys, and boolean values indicating whether eac...
love2d-community.github.io/love-api
love.graphics.getSystemLimits
love.graphics.getSystemLimits Gets the system-dependent maximum values for love.graphics features. limits = love.graphics.getSystemLimits() limits table A table containing GraphicsLimit keys, and number values.
love2d-community.github.io/love-api
love.graphics.getTextureTypes
love.graphics.getTextureTypes Gets the available texture types, and whether each is supported. texturetypes = love.graphics.getTextureTypes() texturetypes table A table containing TextureTypes as keys, and a boolean indicating whether the type is supported as values. Not all systems support all types.
love2d-community.github.io/love-api
love.graphics.getWidth
love.graphics.getWidth Gets the width in pixels of the window. width = love.graphics.getWidth() width number The width of the window.
love2d-community.github.io/love-api
love.graphics.intersectScissor
love.graphics.intersectScissor Sets the scissor to the rectangle created by the intersection of the specified rectangle with the existing scissor. If no scissor is active yet, it behaves like love.graphics.setScissor. The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, includ...
love2d-community.github.io/love-api
love.graphics.inverseTransformPoint
love.graphics.inverseTransformPoint Converts the given 2D position from screen-space into global coordinates. This effectively applies the reverse of the current graphics transformations to the given position. A similar Transform:inverseTransformPoint method exists for Transform objects. globalX, globalY = love.graphi...
love2d-community.github.io/love-api
love.graphics.isActive
love.graphics.isActive Gets whether the graphics module is able to be used. If it is not active, love.graphics function and method calls will not work correctly and may cause the program to crash. The graphics module is inactive if a window is not open, or if the app is in the background on iOS. Typically the app's exe...
love2d-community.github.io/love-api
love.graphics.isGammaCorrect
love.graphics.isGammaCorrect Gets whether gamma-correct rendering is supported and enabled. It can be enabled by setting t.gammacorrect = true in love.conf. Not all devices support gamma-correct rendering, in which case it will be automatically disabled and this function will return false. It is supported on desktop s...
love2d-community.github.io/love-api
love.graphics.isWireframe
love.graphics.isWireframe Gets whether wireframe mode is used when drawing. wireframe = love.graphics.isWireframe() wireframe boolean True if wireframe lines are used when drawing, false if it's not.
love2d-community.github.io/love-api
love.graphics.line
love.graphics.line Draws lines between points. love.graphics.line( x1, y1, x2, y2, ... ) x1 number The position of first point on the x-axis. y1 number The position of first point on the y-axis. x2 number The position of second point on the x-axis. y2 number The position of second point on the y-axis. ... number You ca...
love2d-community.github.io/love-api
love.graphics.newArrayImage
love.graphics.newArrayImage Creates a new array Image. An array image / array texture is a single object which contains multiple 'layers' or 'slices' of 2D sub-images. It can be thought of similarly to a texture atlas or sprite sheet, but it doesn't suffer from the same tile / quad bleeding artifacts that texture atla...
love2d-community.github.io/love-api
love.graphics.newCanvas
love.graphics.newCanvas Creates a new Canvas object for offscreen rendering. canvas = love.graphics.newCanvas() canvas Canvas A new Canvas with dimensions equal to the window's size in pixels. canvas = love.graphics.newCanvas( width, height ) width number The desired width of the Canvas. height number The desired heigh...
love2d-community.github.io/love-api
love.graphics.newCubeImage
love.graphics.newCubeImage Creates a new cubemap Image. Cubemap images have 6 faces (sides) which represent a cube. They can't be rendered directly, they can only be used in Shader code (and sent to the shader via Shader:send). To use a cubemap image in a Shader, it must be declared as a CubeImage or samplerCube type...
love2d-community.github.io/love-api
love.graphics.newFont
love.graphics.newFont Creates a new Font from a TrueType Font or BMFont file. Created fonts are not cached, in that calling this function with the same arguments will always create a new Font object. All variants which accept a filename can also accept a Data object instead. font = love.graphics.newFont( filename ) fi...
love2d-community.github.io/love-api
love.graphics.newImage
love.graphics.newImage Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image. image = love.graphics.newImage( filename, settings ) filename string The filepath to the image file. settings table A table containing the following ...
love2d-community.github.io/love-api
love.graphics.newImageFont
love.graphics.newImageFont Creates a new specifically formatted image. In versions prior to 0.9.0, LÖVE expects ISO 8859-1 encoding for the glyphs string. font = love.graphics.newImageFont( filename, glyphs ) filename string The filepath to the image file. glyphs string A string of the characters in the image in order...
love2d-community.github.io/love-api
love.graphics.newMesh
love.graphics.newMesh Creates a new Mesh. Use Mesh:setTexture if the Mesh should be textured with an Image or Canvas when it's drawn. In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. mesh = love.graphics.newMesh( vertices, mode, usage ) vertices table The...
love2d-community.github.io/love-api
love.graphics.newParticleSystem
love.graphics.newParticleSystem Creates a new ParticleSystem. system = love.graphics.newParticleSystem( image, buffer ) image Image The image to use. buffer (1000) number The max number of particles at the same time. system ParticleSystem A new ParticleSystem. system = love.graphics.newParticleSystem( texture, buffer )...
love2d-community.github.io/love-api
love.graphics.newQuad
love.graphics.newQuad Creates a new Quad. The purpose of a Quad is to use a fraction of an image to draw objects, as opposed to drawing entire image. It is most useful for sprite sheets and atlases: in a sprite atlas, multiple sprites reside in same image, quad is used to draw a specific sprite from that image; in ani...
love2d-community.github.io/love-api
love.graphics.newShader
love.graphics.newShader Creates a new Shader object for hardware-accelerated vertex and pixel effects. A Shader contains either vertex shader code, pixel shader code, or both. Shaders are small programs which are run on the graphics card when drawing. Vertex shaders are run once for each vertex (for example, an image ...
love2d-community.github.io/love-api
love.graphics.newSpriteBatch
love.graphics.newSpriteBatch Creates a new SpriteBatch object. spriteBatch = love.graphics.newSpriteBatch( image, maxsprites ) image Image The Image to use for the sprites. maxsprites (1000) number The maximum number of sprites that the SpriteBatch can contain at any given time. Since version 11.0, additional sprites a...
love2d-community.github.io/love-api
love.graphics.newText
love.graphics.newText Creates a new drawable Text object. text = love.graphics.newText( font, textstring ) font Font The font to use for the text. textstring (nil) string The initial string of text that the new Text object will contain. May be nil. text Text The new drawable Text object. text = love.graphics.newText( f...
love2d-community.github.io/love-api
love.graphics.newVideo
love.graphics.newVideo Creates a new drawable Video. Currently only Ogg Theora video files are supported. video = love.graphics.newVideo( filename ) filename string The file path to the Ogg Theora video file. video Video A new Video. video = love.graphics.newVideo( videostream ) videostream VideoStream A video stream o...
love2d-community.github.io/love-api
love.graphics.newVolumeImage
love.graphics.newVolumeImage Creates a new volume (3D) Image. Volume images are 3D textures with width, height, and depth. They can't be rendered directly, they can only be used in Shader code (and sent to the shader via Shader:send). To use a volume image in a Shader, it must be declared as a VolumeImage or sampler3...
love2d-community.github.io/love-api
love.graphics.origin
love.graphics.origin Resets the current coordinate transformation. This function is always used to reverse any previous calls to love.graphics.rotate, love.graphics.scale, love.graphics.shear or love.graphics.translate. It returns the current transformation state to its defaults. love.graphics.origin()
love2d-community.github.io/love-api
love.graphics.points
love.graphics.points Draws one or more points. love.graphics.points( x, y, ... ) x number The position of the first point on the x-axis. y number The position of the first point on the y-axis. ... number The x and y coordinates of additional points. love.graphics.points( points ) points table A table containing multipl...
love2d-community.github.io/love-api
love.graphics.polygon
love.graphics.polygon Draw a polygon. Following the mode argument, this function can accept multiple numeric arguments or a single table of numeric arguments. In either case the arguments are interpreted as alternating x and y coordinates of the polygon's vertices. love.graphics.polygon( mode, ... ) mode DrawMode How ...
love2d-community.github.io/love-api
love.graphics.pop
love.graphics.pop Pops the current coordinate transformation from the transformation stack. This function is always used to reverse a previous push operation. It returns the current transformation state to what it was before the last preceding push. love.graphics.pop()
love2d-community.github.io/love-api
love.graphics.present
love.graphics.present Displays the results of drawing operations on the screen. This function is used when writing your own love.run function. It presents all the results of your drawing operations on the screen. See the example in love.run for a typical use of this function. love.graphics.present()
love2d-community.github.io/love-api
love.graphics.print
love.graphics.print Draws text on screen. If no Font is set, one will be created and set (once) if needed. As of LOVE 0.7.1, when using translation and scaling functions while drawing text, this function assumes the scale occurs first. If you don't script with this in mind, the text won't be in the right position, or ...
love2d-community.github.io/love-api
love.graphics.printf
love.graphics.printf Draws formatted text, with word wrap and alignment. See additional notes in love.graphics.print. The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arg...
love2d-community.github.io/love-api
love.graphics.push
love.graphics.push Copies and pushes the current coordinate transformation to the transformation stack. This function is always used to prepare for a corresponding pop operation later. It stores the current coordinate transformation state into the transformation stack and keeps it active. Later changes to the transfor...
love2d-community.github.io/love-api
love.graphics.rectangle
love.graphics.rectangle Draws a rectangle. love.graphics.rectangle( mode, x, y, width, height ) mode DrawMode How to draw the rectangle. x number The position of top-left corner along the x-axis. y number The position of top-left corner along the y-axis. width number Width of the rectangle. height number Height of the ...
love2d-community.github.io/love-api
love.graphics.replaceTransform
love.graphics.replaceTransform Replaces the current coordinate transformation with the given Transform object. love.graphics.replaceTransform( transform ) transform Transform The Transform object to replace the current graphics coordinate transform with.
love2d-community.github.io/love-api
love.graphics.reset
love.graphics.reset Resets the current graphics settings. Calling reset makes the current drawing color white, the current background color black, disables any active color component masks, disables wireframe mode and resets the current graphics transformation to the origin. It also sets both the point and line drawin...
love2d-community.github.io/love-api
love.graphics.rotate
love.graphics.rotate Rotates the coordinate system in two dimensions. Calling this function affects all future drawing operations by rotating the coordinate system around the origin by the given amount of radians. This change lasts until love.draw() exits. love.graphics.rotate( angle ) angle number The amount to rotat...
love2d-community.github.io/love-api
love.graphics.scale
love.graphics.scale Scales the coordinate system in two dimensions. By default the coordinate system in LÖVE corresponds to the display pixels in horizontal and vertical directions one-to-one, and the x-axis increases towards the right while the y-axis increases downwards. Scaling the coordinate system changes this re...
love2d-community.github.io/love-api
love.graphics.setBackgroundColor
love.graphics.setBackgroundColor Sets the background color. love.graphics.setBackgroundColor( red, green, blue, alpha ) red number The red component (0-1). green number The green component (0-1). blue number The blue component (0-1). alpha (1) number The alpha component (0-1). love.graphics.setBackgroundColor( rgba ) r...
love2d-community.github.io/love-api
love.graphics.setBlendMode
love.graphics.setBlendMode Sets the blending mode. love.graphics.setBlendMode( mode ) mode BlendMode The blend mode to use. love.graphics.setBlendMode( mode, alphamode ) mode BlendMode The blend mode to use. alphamode ('alphamultiply') BlendAlphaMode What to do with the alpha of drawn objects when blending.
love2d-community.github.io/love-api
love.graphics.setCanvas
love.graphics.setCanvas Captures drawing operations to a Canvas. love.graphics.setCanvas( canvas, mipmap ) canvas Canvas The new target. mipmap (1) number The mipmap level to render to, for Canvases with mipmaps. love.graphics.setCanvas() love.graphics.setCanvas( canvas1, canvas2, ... ) canvas1 Canvas The first render ...
love2d-community.github.io/love-api
love.graphics.setColor
love.graphics.setColor Sets the color used for drawing. In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. love.graphics.setColor( red, green, blue, alpha ) red number The amount of red. green number The amount of green. blue number The amount of blue. alpha (1) numb...
love2d-community.github.io/love-api
love.graphics.setColorMask
love.graphics.setColorMask Sets the color mask. Enables or disables specific color components when rendering and clearing the screen. For example, if '''red''' is set to '''false''', no further changes will be made to the red component of any pixels. love.graphics.setColorMask( red, green, blue, alpha ) red boolean Ren...
love2d-community.github.io/love-api
love.graphics.setDefaultFilter
love.graphics.setDefaultFilter Sets the default scaling filters used with Images, Canvases, and Fonts. love.graphics.setDefaultFilter( min, mag, anisotropy ) min FilterMode Filter mode used when scaling the image down. mag (min) FilterMode Filter mode used when scaling the image up. anisotropy (1) number Maximum amount...
love2d-community.github.io/love-api
love.graphics.setDepthMode
love.graphics.setDepthMode Configures depth testing and writing to the depth buffer. 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. love.graphics.s...
love2d-community.github.io/love-api
love.graphics.setFont
love.graphics.setFont Set an already-loaded Font as the current font or create and load a new one from the file and size. It's recommended that Font objects are created with love.graphics.newFont in the loading stage and then passed to this function in the drawing stage. love.graphics.setFont( font ) font Font The Fon...
love2d-community.github.io/love-api
love.graphics.setFrontFaceWinding
love.graphics.setFrontFaceWinding Sets 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...
love2d-community.github.io/love-api
love.graphics.setLineJoin
love.graphics.setLineJoin Sets the line join style. See LineJoin for the possible options. love.graphics.setLineJoin( join ) join LineJoin The LineJoin to use.
love2d-community.github.io/love-api
love.graphics.setLineStyle
love.graphics.setLineStyle Sets the line style. love.graphics.setLineStyle( style ) style LineStyle The LineStyle to use. Line styles include smooth and rough.
love2d-community.github.io/love-api
love.graphics.setLineWidth
love.graphics.setLineWidth Sets the line width. love.graphics.setLineWidth( width ) width number The width of the line.
love2d-community.github.io/love-api
love.graphics.setMeshCullMode
love.graphics.setMeshCullMode Sets whether back-facing triangles in a Mesh are culled. This 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. By default, both front- and back-facing triangle...
love2d-community.github.io/love-api
love.graphics.setNewFont
love.graphics.setNewFont Creates and sets a new Font. font = love.graphics.setNewFont( size ) size (12) number The size of the font. font Font The new font. font = love.graphics.setNewFont( filename, size ) filename string The path and name of the file with the font. size (12) number The size of the font. font Font The...
love2d-community.github.io/love-api
love.graphics.setPointSize
love.graphics.setPointSize Sets the point size. love.graphics.setPointSize( size ) size number The new point size.
love2d-community.github.io/love-api
love.graphics.setScissor
love.graphics.setScissor Sets or disables scissor. The scissor limits the drawing area to a specified rectangle. This affects all graphics calls, including love.graphics.clear. The dimensions of the scissor is unaffected by graphical transformations (translate, scale, ...). love.graphics.setScissor( x, y, width, heig...
love2d-community.github.io/love-api
love.graphics.setShader
love.graphics.setShader Sets or resets a Shader as the current pixel effect or vertex shaders. All drawing operations until the next ''love.graphics.setShader'' will be drawn using the Shader object specified. love.graphics.setShader( shader ) shader Shader The new shader. love.graphics.setShader()
love2d-community.github.io/love-api
love.graphics.setStencilTest
love.graphics.setStencilTest Configures or disables stencil testing. When stencil testing is enabled, the geometry of everything that is drawn afterward will be clipped / stencilled out based on a comparison between the arguments of this function and the stencil value of each pixel that the geometry touches. The stenc...
love2d-community.github.io/love-api
love.graphics.setWireframe
love.graphics.setWireframe Sets whether wireframe lines will be used when drawing. love.graphics.setWireframe( enable ) enable boolean True to enable wireframe mode when drawing, false to disable it.
love2d-community.github.io/love-api