diff options
Diffstat (limited to 'meta/3rd/love2d/library/love.graphics.lua')
-rw-r--r-- | meta/3rd/love2d/library/love.graphics.lua | 1483 |
1 files changed, 1426 insertions, 57 deletions
diff --git a/meta/3rd/love2d/library/love.graphics.lua b/meta/3rd/love2d/library/love.graphics.lua index b0bd6fc9..a73cdcd6 100644 --- a/meta/3rd/love2d/library/love.graphics.lua +++ b/meta/3rd/love2d/library/love.graphics.lua @@ -6,13 +6,13 @@ love.graphics = {} --- ---This effectively multiplies the existing coordinate transformation's matrix with the Transform object's internal matrix to produce the new coordinate transformation. --- ----@param transform Transform # The Transform object to apply to the current graphics coordinate transform. +---@param transform love.graphics.Transform # The Transform object to apply to the current graphics coordinate transform. function love.graphics.applyTransform(transform) end --- ---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. --- ----@param drawmode DrawMode # How to draw the arc. +---@param drawmode love.graphics.DrawMode # How to draw the arc. ---@param x number # The position of the center along x-axis. ---@param y number # The position of the center along y-axis. ---@param radius number # Radius of the arc. @@ -32,7 +32,7 @@ function love.graphics.captureScreenshot(filename) end --- ---Draws a circle. --- ----@param mode DrawMode # How to draw the circle. +---@param mode love.graphics.DrawMode # How to draw the circle. ---@param x number # The position of the center along x-axis. ---@param y number # The position of the center along y-axis. ---@param radius number # The radius of the circle. @@ -75,7 +75,7 @@ function love.graphics.discard(discardcolor, discardstencil) end --- ---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. --- ----@param drawable Drawable # A drawable object. +---@param drawable love.graphics.Drawable # A drawable object. ---@param x number # The position to draw the object (x-axis). ---@param y number # The position to draw the object (y-axis). ---@param r number # Orientation (radians). @@ -94,7 +94,7 @@ function love.graphics.draw(drawable, x, y, r, sx, sy, ox, oy, kx, ky) end --- ---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. --- ----@param mesh Mesh # The mesh to render. +---@param mesh love.graphics.Mesh # The mesh to render. ---@param instancecount number # The number of instances to render. ---@param x number # The position to draw the instances (x-axis). ---@param y number # The position to draw the instances (y-axis). @@ -110,7 +110,7 @@ function love.graphics.drawInstanced(mesh, instancecount, x, y, r, sx, sy, ox, o --- ---Draws a layer of an Array Texture. --- ----@param texture Texture # The Array Texture to draw. +---@param texture love.graphics.Texture # The Array Texture to draw. ---@param layerindex number # The index of the layer to use when drawing. ---@param x number # The position to draw the texture (x-axis). ---@param y number # The position to draw the texture (y-axis). @@ -126,7 +126,7 @@ function love.graphics.drawLayer(texture, layerindex, x, y, r, sx, sy, ox, oy, k --- ---Draws an ellipse. --- ----@param mode DrawMode # How to draw the ellipse. +---@param mode love.graphics.DrawMode # How to draw the ellipse. ---@param x number # The position of the center along x-axis. ---@param y number # The position of the center along y-axis. ---@param radiusx number # The radius of the ellipse along the x-axis (half the ellipse's width). @@ -158,14 +158,14 @@ function love.graphics.getBackgroundColor() end --- ---Gets the blending mode. --- ----@return BlendMode mode # The current blend mode. ----@return BlendAlphaMode alphamode # The current blend alpha mode – it determines how the alpha of drawn objects affects blending. +---@return love.graphics.BlendMode mode # The current blend mode. +---@return love.graphics.BlendAlphaMode alphamode # The current blend alpha mode – it determines how the alpha of drawn objects affects blending. function love.graphics.getBlendMode() end --- ---Gets the current target Canvas. --- ----@return Canvas canvas # The Canvas set by setCanvas. Returns nil if drawing to the real screen. +---@return love.graphics.Canvas canvas # The Canvas set by setCanvas. Returns nil if drawing to the real screen. function love.graphics.getCanvas() end --- @@ -211,8 +211,8 @@ function love.graphics.getDPIScale() end --- ---Returns the default scaling filters used with Images, Canvases, and Fonts. --- ----@return FilterMode min # Filter mode used when scaling the image down. ----@return FilterMode mag # Filter mode used when scaling the image up. +---@return love.graphics.FilterMode min # Filter mode used when scaling the image down. +---@return love.graphics.FilterMode mag # Filter mode used when scaling the image up. ---@return number anisotropy # Maximum amount of Anisotropic Filtering used. function love.graphics.getDefaultFilter() end @@ -221,7 +221,7 @@ function love.graphics.getDefaultFilter() end --- ---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. --- ----@return CompareMode comparemode # Depth comparison mode used for depth testing. +---@return love.graphics.CompareMode comparemode # Depth comparison mode used for depth testing. ---@return boolean write # Whether to write update / write values to the depth buffer when rendering. function love.graphics.getDepthMode() end @@ -235,7 +235,7 @@ function love.graphics.getDimensions() end --- ---Gets the current Font object. --- ----@return Font font # The current Font. Automatically creates and sets the default font, if none is set yet. +---@return love.graphics.Font font # The current Font. Automatically creates and sets the default font, if none is set yet. function love.graphics.getFont() end --- @@ -243,7 +243,7 @@ function love.graphics.getFont() end --- ---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. --- ----@return VertexWinding winding # The winding mode being used. The default winding is counterclockwise ('ccw'). +---@return love.graphics.VertexWinding winding # The winding mode being used. The default winding is counterclockwise ('ccw'). function love.graphics.getFrontFaceWinding() end --- @@ -261,13 +261,13 @@ function love.graphics.getImageFormats() end --- ---Gets the line join style. --- ----@return LineJoin join # The LineJoin style. +---@return love.graphics.LineJoin join # The LineJoin style. function love.graphics.getLineJoin() end --- ---Gets the line style. --- ----@return LineStyle style # The current line style. +---@return love.graphics.LineStyle style # The current line style. function love.graphics.getLineStyle() end --- @@ -281,7 +281,7 @@ function love.graphics.getLineWidth() end --- ---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. --- ----@return CullMode mode # The Mesh face culling mode in use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). +---@return love.graphics.CullMode mode # The Mesh face culling mode in use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). function love.graphics.getMeshCullMode() end --- @@ -336,7 +336,7 @@ function love.graphics.getScissor() end --- ---Gets the current Shader. Returns nil if none is set. --- ----@return Shader shader # The currently active Shader, or nil if none is set. +---@return love.graphics.Shader shader # The currently active Shader, or nil if none is set. function love.graphics.getShader() end --- @@ -358,7 +358,7 @@ function love.graphics.getStats() end --- ---Each Canvas has its own per-pixel stencil values. --- ----@return CompareMode comparemode # The type of comparison that is made for each pixel. Will be 'always' if stencil testing is disabled. +---@return love.graphics.CompareMode comparemode # The type of comparison that is made for each pixel. Will be 'always' if stencil testing is disabled. ---@return number comparevalue # The value used when comparing with the stencil value of each pixel. function love.graphics.getStencilTest() end @@ -454,13 +454,13 @@ function love.graphics.line(x1, y1, x2, y2, ...) end --- ---@param slices table # A table containing filepaths to images (or File, FileData, ImageData, or CompressedImageData objects), in an array. Each sub-image must have the same dimensions. A table of tables can also be given, where each sub-table contains all mipmap levels for the slice index of that sub-table. ---@param settings table # Optional table of settings to configure the array image, containing the following fields: ----@return Image image # An Array Image object. +---@return love.graphics.Image image # An Array Image object. function love.graphics.newArrayImage(slices, settings) end --- ---Creates a new Canvas object for offscreen rendering. --- ----@return Canvas canvas # A new Canvas with dimensions equal to the window's size in pixels. +---@return love.graphics.Canvas canvas # A new Canvas with dimensions equal to the window's size in pixels. function love.graphics.newCanvas() end --- @@ -510,7 +510,7 @@ function love.graphics.newCanvas() end --- ---@param filename string # The filepath to a cubemap image file (or a File, FileData, or ImageData). ---@param settings table # Optional table of settings to configure the cubemap image, containing the following fields: ----@return Image image # An cubemap Image object. +---@return love.graphics.Image image # An cubemap Image object. function love.graphics.newCubeImage(filename, settings) end --- @@ -519,14 +519,14 @@ function love.graphics.newCubeImage(filename, settings) end ---All variants which accept a filename can also accept a Data object instead. --- ---@param filename string # The filepath to the BMFont or TrueType font file. ----@return Font font # A Font object which can be used to draw text on screen. +---@return love.graphics.Font font # A Font object which can be used to draw text on screen. function love.graphics.newFont(filename) end --- ---Creates a new Image from a filepath, FileData, an ImageData, or a CompressedImageData, and optionally generates or specifies mipmaps for the image. --- ---@param filename string # The filepath to the image file. ----@return Image image # An Image object which can be drawn on screen. +---@return love.graphics.Image image # An Image object which can be drawn on screen. function love.graphics.newImage(filename) end --- @@ -536,7 +536,7 @@ function love.graphics.newImage(filename) end --- ---@param filename string # The filepath to the image file. ---@param glyphs string # A string of the characters in the image in order from left to right. ----@return Font font # A Font object which can be used to draw text on screen. +---@return love.graphics.Font font # A Font object which can be used to draw text on screen. function love.graphics.newImageFont(filename, glyphs) end --- @@ -547,17 +547,17 @@ function love.graphics.newImageFont(filename, glyphs) end ---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. --- ---@param vertices table # The table filled with vertex information tables for each vertex as follows: ----@param mode MeshDrawMode # How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons. ----@param usage SpriteBatchUsage # The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance. ----@return Mesh mesh # The new mesh. +---@param mode love.graphics.MeshDrawMode # How the vertices are used when drawing. The default mode 'fan' is sufficient for simple convex polygons. +---@param usage love.graphics.SpriteBatchUsage # The expected usage of the Mesh. The specified usage mode affects the Mesh's memory usage and performance. +---@return love.graphics.Mesh mesh # The new mesh. function love.graphics.newMesh(vertices, mode, usage) end --- ---Creates a new ParticleSystem. --- ----@param image Image # The image to use. +---@param image love.graphics.Image # The image to use. ---@param buffer number # The max number of particles at the same time. ----@return ParticleSystem system # A new ParticleSystem. +---@return love.graphics.ParticleSystem system # A new ParticleSystem. function love.graphics.newParticleSystem(image, buffer) end --- @@ -571,7 +571,7 @@ function love.graphics.newParticleSystem(image, buffer) end ---@param height number # The height of the Quad in the Image. (Must be greater than 0.) ---@param sw number # The reference width, the width of the Image. (Must be greater than 0.) ---@param sh number # The reference height, the height of the Image. (Must be greater than 0.) ----@return Quad quad # The new Quad. +---@return love.graphics.Quad quad # The new Quad. function love.graphics.newQuad(x, y, width, height, sw, sh) end --- @@ -580,30 +580,30 @@ function love.graphics.newQuad(x, y, width, height, sw, sh) end ---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 has 4 vertices - one at each corner. A Mesh might have many more.) Pixel shaders are run once for each pixel on the screen which the drawn object touches. Pixel shader code is executed after all the object's vertices have been processed by the vertex shader. --- ---@param code string # The pixel shader or vertex shader code, or a filename pointing to a file with the code. ----@return Shader shader # A Shader object for use in drawing operations. +---@return love.graphics.Shader shader # A Shader object for use in drawing operations. function love.graphics.newShader(code) end --- ---Creates a new SpriteBatch object. --- ----@param image Image # The Image to use for the sprites. +---@param image love.graphics.Image # The Image to use for the sprites. ---@param maxsprites number # The maximum number of sprites that the SpriteBatch can contain at any given time. Since version 11.0, additional sprites added past this number will automatically grow the spritebatch. ----@return SpriteBatch spriteBatch # The new SpriteBatch. +---@return love.graphics.SpriteBatch spriteBatch # The new SpriteBatch. function love.graphics.newSpriteBatch(image, maxsprites) end --- ---Creates a new drawable Text object. --- ----@param font Font # The font to use for the text. +---@param font love.graphics.Font # The font to use for the text. ---@param textstring string # The initial string of text that the new Text object will contain. May be nil. ----@return Text text # The new drawable Text object. +---@return love.graphics.Text text # The new drawable Text object. function love.graphics.newText(font, textstring) end --- ---Creates a new drawable Video. Currently only Ogg Theora video files are supported. --- ---@param filename string # The file path to the Ogg Theora video file. ----@return Video video # A new Video. +---@return love.graphics.Video video # A new Video. function love.graphics.newVideo(filename) end --- @@ -619,7 +619,7 @@ function love.graphics.newVideo(filename) end --- ---@param layers table # A table containing filepaths to images (or File, FileData, ImageData, or CompressedImageData objects), in an array. A table of tables can also be given, where each sub-table represents a single mipmap level and contains all layers for that mipmap. ---@param settings table # Optional table of settings to configure the volume image, containing the following fields: ----@return Image image # A volume Image object. +---@return love.graphics.Image image # A volume Image object. function love.graphics.newVolumeImage(layers, settings) end --- @@ -642,7 +642,7 @@ function love.graphics.points(x, y, ...) end --- ---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. --- ----@param mode DrawMode # How to draw the polygon. +---@param mode love.graphics.DrawMode # How to draw the polygon. ---@param ... number # The vertices of the polygon. function love.graphics.polygon(mode, ...) end @@ -696,7 +696,7 @@ function love.graphics.print(text, x, y, r, sx, sy, ox, oy, kx, ky) end ---@param x number # The position on the x-axis. ---@param y number # The position on the y-axis. ---@param limit number # Wrap the line after this many horizontal pixels. ----@param align AlignMode # The alignment. +---@param align love.graphics.AlignMode # The alignment. ---@param r number # Orientation (radians). ---@param sx number # Scale factor (x-axis). ---@param sy number # Scale factor (y-axis). @@ -716,7 +716,7 @@ function love.graphics.push() end --- ---Draws a rectangle. --- ----@param mode DrawMode # How to draw the rectangle. +---@param mode love.graphics.DrawMode # How to draw the rectangle. ---@param x number # The position of top-left corner along the x-axis. ---@param y number # The position of top-left corner along the y-axis. ---@param width number # Width of the rectangle. @@ -726,7 +726,7 @@ function love.graphics.rectangle(mode, x, y, width, height) end --- ---Replaces the current coordinate transformation with the given Transform object. --- ----@param transform Transform # The Transform object to replace the current graphics coordinate transform with. +---@param transform love.graphics.Transform # The Transform object to replace the current graphics coordinate transform with. function love.graphics.replaceTransform(transform) end --- @@ -771,13 +771,13 @@ function love.graphics.setBackgroundColor(red, green, blue, alpha) end --- ---Sets the blending mode. --- ----@param mode BlendMode # The blend mode to use. +---@param mode love.graphics.BlendMode # The blend mode to use. function love.graphics.setBlendMode(mode) end --- ---Captures drawing operations to a Canvas. --- ----@param canvas Canvas # The new target. +---@param canvas love.graphics.Canvas # The new target. ---@param mipmap number # The mipmap level to render to, for Canvases with mipmaps. function love.graphics.setCanvas(canvas, mipmap) end @@ -804,8 +804,8 @@ function love.graphics.setColorMask(red, green, blue, alpha) end --- ---Sets the default scaling filters used with Images, Canvases, and Fonts. --- ----@param min FilterMode # Filter mode used when scaling the image down. ----@param mag FilterMode # Filter mode used when scaling the image up. +---@param min love.graphics.FilterMode # Filter mode used when scaling the image down. +---@param mag love.graphics.FilterMode # Filter mode used when scaling the image up. ---@param anisotropy number # Maximum amount of Anisotropic Filtering used. function love.graphics.setDefaultFilter(min, mag, anisotropy) end @@ -814,7 +814,7 @@ function love.graphics.setDefaultFilter(min, mag, anisotropy) end --- ---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. --- ----@param comparemode CompareMode # Depth comparison mode used for depth testing. +---@param comparemode love.graphics.CompareMode # Depth comparison mode used for depth testing. ---@param write boolean # Whether to write update / write values to the depth buffer when rendering. function love.graphics.setDepthMode(comparemode, write) end @@ -823,7 +823,7 @@ function love.graphics.setDepthMode(comparemode, write) end --- ---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. --- ----@param font Font # The Font object to use. +---@param font love.graphics.Font # The Font object to use. function love.graphics.setFont(font) end --- @@ -831,19 +831,19 @@ function love.graphics.setFont(font) end --- ---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. --- ----@param winding VertexWinding # The winding mode to use. The default winding is counterclockwise ('ccw'). +---@param winding love.graphics.VertexWinding # The winding mode to use. The default winding is counterclockwise ('ccw'). function love.graphics.setFrontFaceWinding(winding) end --- ---Sets the line join style. See LineJoin for the possible options. --- ----@param join LineJoin # The LineJoin to use. +---@param join love.graphics.LineJoin # The LineJoin to use. function love.graphics.setLineJoin(join) end --- ---Sets the line style. --- ----@param style LineStyle # The LineStyle to use. Line styles include smooth and rough. +---@param style love.graphics.LineStyle # The LineStyle to use. Line styles include smooth and rough. function love.graphics.setLineStyle(style) end --- @@ -859,14 +859,14 @@ function love.graphics.setLineWidth(width) end --- ---By default, both front- and back-facing triangles in Meshes are rendered. --- ----@param mode CullMode # The Mesh face culling mode to use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). +---@param mode love.graphics.CullMode # The Mesh face culling mode to use (whether to render everything, cull back-facing triangles, or cull front-facing triangles). function love.graphics.setMeshCullMode(mode) end --- ---Creates and sets a new Font. --- ---@param size number # The size of the font. ----@return Font font # The new font. +---@return love.graphics.Font font # The new font. function love.graphics.setNewFont(size) end --- @@ -891,7 +891,7 @@ function love.graphics.setScissor(x, y, width, height) end --- ---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. --- ----@param shader Shader # The new shader. +---@param shader love.graphics.Shader # The new shader. function love.graphics.setShader(shader) end --- @@ -899,7 +899,7 @@ function love.graphics.setShader(shader) end --- ---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 stencil values of pixels are affected via love.graphics.stencil. --- ----@param comparemode CompareMode # The type of comparison to make for each pixel. +---@param comparemode love.graphics.CompareMode # The type of comparison to make for each pixel. ---@param comparevalue number # The value to use when comparing with the stencil value of each pixel. Must be between 0 and 255. function love.graphics.setStencilTest(comparemode, comparevalue) end @@ -924,7 +924,7 @@ function love.graphics.shear(kx, ky) end ---Stencil values are integers within the range of 255. --- ---@param stencilfunction function # Function which draws geometry. The stencil values of pixels, rather than the color of each pixel, will be affected by the geometry. ----@param action StencilAction # How to modify any stencil values of pixels that are touched by what's drawn in the stencil function. +---@param action love.graphics.StencilAction # How to modify any stencil values of pixels that are touched by what's drawn in the stencil function. ---@param value number # The new stencil value to use for pixels if the 'replace' stencil action is used. Has no effect with other stencil actions. Must be between 0 and 255. ---@param keepvalues boolean # True to preserve old stencil values of pixels, false to re-set every pixel's stencil value to 0 before executing the stencil function. love.graphics.clear will also re-set all stencil values. function love.graphics.stencil(stencilfunction, action, value, keepvalues) end @@ -963,3 +963,1372 @@ function love.graphics.translate(dx, dy) end ---@return boolean status # true if specified shader code doesn't contain any errors. false otherwise. ---@return string message # Reason why shader code validation failed (or nil if validation succeded). function love.graphics.validateShader(gles, code) end + +---@class love.graphics.Canvas: love.graphics.Texture, love.graphics.Drawable, love.graphics.Object +local Canvas = {} + +--- +---Generates mipmaps for the Canvas, based on the contents of the highest-resolution mipmap level. +--- +---The Canvas must be created with mipmaps set to a MipmapMode other than 'none' for this function to work. It should only be called while the Canvas is not the active render target. +--- +---If the mipmap mode is set to 'auto', this function is automatically called inside love.graphics.setCanvas when switching from this Canvas to another Canvas or to the main screen. +--- +function Canvas:generateMipmaps() end + +--- +---Gets the number of multisample antialiasing (MSAA) samples used when drawing to the Canvas. +--- +---This may be different than the number used as an argument to love.graphics.newCanvas if the system running LÖVE doesn't support that number. +--- +---@return number samples # The number of multisample antialiasing samples used by the canvas when drawing to it. +function Canvas:getMSAA() end + +--- +---Gets the MipmapMode this Canvas was created with. +--- +---@return love.graphics.MipmapMode mode # The mipmap mode this Canvas was created with. +function Canvas:getMipmapMode() end + +--- +---Generates ImageData from the contents of the Canvas. +--- +---@return love.graphics.ImageData data # The new ImageData made from the Canvas' contents. +function Canvas:newImageData() end + +--- +---Render to the Canvas using a function. +--- +---This is a shortcut to love.graphics.setCanvas: +--- +---canvas:renderTo( func ) +--- +---is the same as +--- +---love.graphics.setCanvas( canvas ) +--- +---func() +--- +---love.graphics.setCanvas() +--- +---@param func function # A function performing drawing operations. +function Canvas:renderTo(func) end + +---@class love.graphics.Drawable: love.graphics.Object +local Drawable = {} + +---@class love.graphics.Font: love.graphics.Object +local Font = {} + +--- +---Gets the ascent of the Font. +--- +---The ascent spans the distance between the baseline and the top of the glyph that reaches farthest from the baseline. +--- +---@return number ascent # The ascent of the Font in pixels. +function Font:getAscent() end + +--- +---Gets the baseline of the Font. +--- +---Most scripts share the notion of a baseline: an imaginary horizontal line on which characters rest. In some scripts, parts of glyphs lie below the baseline. +--- +---@return number baseline # The baseline of the Font in pixels. +function Font:getBaseline() end + +--- +---Gets the DPI scale factor of the Font. +--- +---The DPI scale factor represents relative pixel density. A DPI scale factor of 2 means the font's glyphs have twice the pixel density in each dimension (4 times as many pixels in the same area) compared to a font with a DPI scale factor of 1. +--- +---The font size of TrueType fonts is scaled internally by the font's specified DPI scale factor. By default, LÖVE uses the screen's DPI scale factor when creating TrueType fonts. +--- +---@return number dpiscale # The DPI scale factor of the Font. +function Font:getDPIScale() end + +--- +---Gets the descent of the Font. +--- +---The descent spans the distance between the baseline and the lowest descending glyph in a typeface. +--- +---@return number descent # The descent of the Font in pixels. +function Font:getDescent() end + +--- +---Gets the filter mode for a font. +--- +---@return love.graphics.FilterMode min # Filter mode used when minifying the font. +---@return love.graphics.FilterMode mag # Filter mode used when magnifying the font. +---@return number anisotropy # Maximum amount of anisotropic filtering used. +function Font:getFilter() end + +--- +---Gets the height of the Font. +--- +---The height of the font is the size including any spacing; the height which it will need. +--- +---@return number height # The height of the Font in pixels. +function Font:getHeight() end + +--- +---Gets the line height. +--- +---This will be the value previously set by Font:setLineHeight, or 1.0 by default. +--- +---@return number height # The current line height. +function Font:getLineHeight() end + +--- +---Determines the maximum width (accounting for newlines) taken by the given string. +--- +---@param text string # A string. +---@return number width # The width of the text. +function Font:getWidth(text) end + +--- +---Gets formatting information for text, given a wrap limit. +--- +---This function accounts for newlines correctly (i.e. '\n'). +--- +---@param text string # The text that will be wrapped. +---@param wraplimit number # The maximum width in pixels of each line that ''text'' is allowed before wrapping. +---@return number width # The maximum width of the wrapped text. +---@return table wrappedtext # A sequence containing each line of text that was wrapped. +function Font:getWrap(text, wraplimit) end + +--- +---Gets whether the Font can render a character or string. +--- +---@param text string # A UTF-8 encoded unicode string. +---@return boolean hasglyph # Whether the font can render all the UTF-8 characters in the string. +function Font:hasGlyphs(text) end + +--- +---Sets the fallback fonts. When the Font doesn't contain a glyph, it will substitute the glyph from the next subsequent fallback Fonts. This is akin to setting a 'font stack' in Cascading Style Sheets (CSS). +--- +---@param fallbackfont1 love.graphics.Font # The first fallback Font to use. +---@param ... love.graphics.Font # Additional fallback Fonts. +function Font:setFallbacks(fallbackfont1, ...) end + +--- +---Sets the filter mode for a font. +--- +---@param min love.graphics.FilterMode # How to scale a font down. +---@param mag love.graphics.FilterMode # How to scale a font up. +---@param anisotropy number # Maximum amount of anisotropic filtering used. +function Font:setFilter(min, mag, anisotropy) end + +--- +---Sets the line height. +--- +---When rendering the font in lines the actual height will be determined by the line height multiplied by the height of the font. The default is 1.0. +--- +---@param height number # The new line height. +function Font:setLineHeight(height) end + +---@class love.graphics.Image: love.graphics.Texture, love.graphics.Drawable, love.graphics.Object +local Image = {} + +--- +---Gets the flags used when the image was created. +--- +---@return table flags # A table with ImageFlag keys. +function Image:getFlags() end + +--- +---Gets whether the Image was created from CompressedData. +--- +---Compressed images take up less space in VRAM, and drawing a compressed image will generally be more efficient than drawing one created from raw pixel data. +--- +---@return boolean compressed # Whether the Image is stored as a compressed texture on the GPU. +function Image:isCompressed() end + +--- +---Replace the contents of an Image. +--- +---@param data love.graphics.ImageData # The new ImageData to replace the contents with. +---@param slice number # Which cubemap face, array index, or volume layer to replace, if applicable. +---@param mipmap number # The mimap level to replace, if the Image has mipmaps. +---@param x number # The x-offset in pixels from the top-left of the image to replace. The given ImageData's width plus this value must not be greater than the pixel width of the Image's specified mipmap level. +---@param y number # The y-offset in pixels from the top-left of the image to replace. The given ImageData's height plus this value must not be greater than the pixel height of the Image's specified mipmap level. +---@param reloadmipmaps boolean # Whether to generate new mipmaps after replacing the Image's pixels. True by default if the Image was created with automatically generated mipmaps, false by default otherwise. +function Image:replacePixels(data, slice, mipmap, x, y, reloadmipmaps) end + +---@class love.graphics.Mesh: love.graphics.Drawable, love.graphics.Object +local Mesh = {} + +--- +---Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes. +--- +---@param name string # The name of the vertex attribute to attach. +---@param mesh love.graphics.Mesh # The Mesh to get the vertex attribute from. +function Mesh:attachAttribute(name, mesh) end + +--- +---Attaches a vertex attribute from a different Mesh onto this Mesh, for use when drawing. This can be used to share vertex attribute data between several different Meshes. +--- +---@param name string # The name of the vertex attribute to attach. +---@param mesh love.graphics.Mesh # The Mesh to get the vertex attribute from. +function Mesh:attachAttribute(name, mesh) end + +--- +---Removes a previously attached vertex attribute from this Mesh. +--- +---@param name string # The name of the attached vertex attribute to detach. +---@return boolean success # Whether the attribute was successfully detached. +function Mesh:detachAttribute(name) end + +--- +---Gets the mode used when drawing the Mesh. +--- +---@return love.graphics.MeshDrawMode mode # The mode used when drawing the Mesh. +function Mesh:getDrawMode() end + +--- +---Gets the range of vertices used when drawing the Mesh. +--- +---@return number min # The index of the first vertex used when drawing, or the index of the first value in the vertex map used if one is set for this Mesh. +---@return number max # The index of the last vertex used when drawing, or the index of the last value in the vertex map used if one is set for this Mesh. +function Mesh:getDrawRange() end + +--- +---Gets the texture (Image or Canvas) used when drawing the Mesh. +--- +---@return love.graphics.Texture texture # The Image or Canvas to texture the Mesh with when drawing, or nil if none is set. +function Mesh:getTexture() end + +--- +---Gets the properties of a vertex in the Mesh. +--- +---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. +--- +---@param index number # The one-based index of the vertex you want to retrieve the information for. +---@return number attributecomponent # The first component of the first vertex attribute in the specified vertex. +---@return number ... # Additional components of all vertex attributes in the specified vertex. +function Mesh:getVertex(index) end + +--- +---Gets the properties of a specific attribute within a vertex in the Mesh. +--- +---Meshes without a custom vertex format specified in love.graphics.newMesh have position as their first attribute, texture coordinates as their second attribute, and color as their third attribute. +--- +---@param vertexindex number # The index of the the vertex you want to retrieve the attribute for (one-based). +---@param attributeindex number # The index of the attribute within the vertex to be retrieved (one-based). +---@return number value1 # The value of the first component of the attribute. +---@return number value2 # The value of the second component of the attribute. +---@return number ... # Any additional vertex attribute components. +function Mesh:getVertexAttribute(vertexindex, attributeindex) end + +--- +---Gets the total number of vertices in the Mesh. +--- +---@return number count # The total number of vertices in the mesh. +function Mesh:getVertexCount() end + +--- +---Gets the vertex format that the Mesh was created with. +--- +---@return table format # The vertex format of the Mesh, which is a table containing tables for each vertex attribute the Mesh was created with, in the form of {attribute, ...}. +function Mesh:getVertexFormat() end + +--- +---Gets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. +--- +---If no vertex map has been set previously via Mesh:setVertexMap, then this function will return nil in LÖVE 0.10.0+, or an empty table in 0.9.2 and older. +--- +---@return table map # A table containing the list of vertex indices used when drawing. +function Mesh:getVertexMap() end + +--- +---Gets whether a specific vertex attribute in the Mesh is enabled. Vertex data from disabled attributes is not used when drawing the Mesh. +--- +---@param name string # The name of the vertex attribute to be checked. +---@return boolean enabled # Whether the vertex attribute is used when drawing this Mesh. +function Mesh:isAttributeEnabled(name) end + +--- +---Enables or disables a specific vertex attribute in the Mesh. Vertex data from disabled attributes is not used when drawing the Mesh. +--- +---@param name string # The name of the vertex attribute to enable or disable. +---@param enable boolean # Whether the vertex attribute is used when drawing this Mesh. +function Mesh:setAttributeEnabled(name, enable) end + +--- +---Sets the mode used when drawing the Mesh. +--- +---@param mode love.graphics.MeshDrawMode # The mode to use when drawing the Mesh. +function Mesh:setDrawMode(mode) end + +--- +---Restricts the drawn vertices of the Mesh to a subset of the total. +--- +---@param start number # The index of the first vertex to use when drawing, or the index of the first value in the vertex map to use if one is set for this Mesh. +---@param count number # The number of vertices to use when drawing, or number of values in the vertex map to use if one is set for this Mesh. +function Mesh:setDrawRange(start, count) end + +--- +---Sets the texture (Image or Canvas) used when drawing the Mesh. +--- +---@param texture love.graphics.Texture # The Image or Canvas to texture the Mesh with when drawing. +function Mesh:setTexture(texture) end + +--- +---Sets the properties of a vertex in the Mesh. +--- +---In versions prior to 11.0, color and byte component values were within the range of 0 to 255 instead of 0 to 1. +--- +---@param index number # The index of the the vertex you want to modify (one-based). +---@param attributecomponent number # The first component of the first vertex attribute in the specified vertex. +---@param ... number # Additional components of all vertex attributes in the specified vertex. +function Mesh:setVertex(index, attributecomponent, ...) end + +--- +---Sets the properties of a specific attribute within a vertex in the Mesh. +--- +---Meshes without a custom vertex format specified in love.graphics.newMesh have position as their first attribute, texture coordinates as their second attribute, and color as their third attribute. +--- +---@param vertexindex number # The index of the the vertex to be modified (one-based). +---@param attributeindex number # The index of the attribute within the vertex to be modified (one-based). +---@param value1 number # The new value for the first component of the attribute. +---@param value2 number # The new value for the second component of the attribute. +---@param ... number # Any additional vertex attribute components. +function Mesh:setVertexAttribute(vertexindex, attributeindex, value1, value2, ...) end + +--- +---Sets the vertex map for the Mesh. The vertex map describes the order in which the vertices are used when the Mesh is drawn. The vertices, vertex map, and mesh draw mode work together to determine what exactly is displayed on the screen. +--- +---The vertex map allows you to re-order or reuse vertices when drawing without changing the actual vertex parameters or duplicating vertices. It is especially useful when combined with different Mesh Draw Modes. +--- +---@param map table # A table containing a list of vertex indices to use when drawing. Values must be in the range of Mesh:getVertexCount(). +function Mesh:setVertexMap(map) end + +--- +---Replaces a range of vertices in the Mesh with new ones. The total number of vertices in a Mesh cannot be changed after it has been created. This is often more efficient than calling Mesh:setVertex in a loop. +--- +---@param vertices table # The table filled with vertex information tables for each vertex, in the form of {vertex, ...} where each vertex is a table in the form of {attributecomponent, ...}. +---@param startvertex number # The index of the first vertex to replace. +function Mesh:setVertices(vertices, startvertex) end + +---@class love.graphics.ParticleSystem: love.graphics.Drawable, love.graphics.Object +local ParticleSystem = {} + +--- +---Creates an identical copy of the ParticleSystem in the stopped state. +--- +---@return love.graphics.ParticleSystem particlesystem # The new identical copy of this ParticleSystem. +function ParticleSystem:clone() end + +--- +---Emits a burst of particles from the particle emitter. +--- +---@param numparticles number # The amount of particles to emit. The number of emitted particles will be truncated if the particle system's max buffer size is reached. +function ParticleSystem:emit(numparticles) end + +--- +---Gets the maximum number of particles the ParticleSystem can have at once. +--- +---@return number size # The maximum number of particles. +function ParticleSystem:getBufferSize() end + +--- +---Gets the series of colors applied to the particle sprite. +--- +---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. +--- +---@return number r1 # First color, red component (0-1). +---@return number g1 # First color, green component (0-1). +---@return number b1 # First color, blue component (0-1). +---@return number a1 # First color, alpha component (0-1). +---@return number r2 # Second color, red component (0-1). +---@return number g2 # Second color, green component (0-1). +---@return number b2 # Second color, blue component (0-1). +---@return number a2 # Second color, alpha component (0-1). +---@return number r8 # Eighth color, red component (0-1). +---@return number g8 # Eighth color, green component (0-1). +---@return number b8 # Eighth color, blue component (0-1). +---@return number a8 # Eighth color, alpha component (0-1). +function ParticleSystem:getColors() end + +--- +---Gets the number of particles that are currently in the system. +--- +---@return number count # The current number of live particles. +function ParticleSystem:getCount() end + +--- +---Gets the direction of the particle emitter (in radians). +--- +---@return number direction # The direction of the emitter (radians). +function ParticleSystem:getDirection() end + +--- +---Gets the area-based spawn parameters for the particles. +--- +---@return love.graphics.AreaSpreadDistribution distribution # The type of distribution for new particles. +---@return number dx # The maximum spawn distance from the emitter along the x-axis for uniform distribution, or the standard deviation along the x-axis for normal distribution. +---@return number dy # The maximum spawn distance from the emitter along the y-axis for uniform distribution, or the standard deviation along the y-axis for normal distribution. +---@return number angle # The angle in radians of the emission area. +---@return boolean directionRelativeToCenter # True if newly spawned particles will be oriented relative to the center of the emission area, false otherwise. +function ParticleSystem:getEmissionArea() end + +--- +---Gets the amount of particles emitted per second. +--- +---@return number rate # The amount of particles per second. +function ParticleSystem:getEmissionRate() end + +--- +---Gets how long the particle system will emit particles (if -1 then it emits particles forever). +--- +---@return number life # The lifetime of the emitter (in seconds). +function ParticleSystem:getEmitterLifetime() end + +--- +---Gets the mode used when the ParticleSystem adds new particles. +--- +---@return love.graphics.ParticleInsertMode mode # The mode used when the ParticleSystem adds new particles. +function ParticleSystem:getInsertMode() end + +--- +---Gets the linear acceleration (acceleration along the x and y axes) for particles. +--- +---Every particle created will accelerate along the x and y axes between xmin,ymin and xmax,ymax. +--- +---@return number xmin # The minimum acceleration along the x axis. +---@return number ymin # The minimum acceleration along the y axis. +---@return number xmax # The maximum acceleration along the x axis. +---@return number ymax # The maximum acceleration along the y axis. +function ParticleSystem:getLinearAcceleration() end + +--- +---Gets the amount of linear damping (constant deceleration) for particles. +--- +---@return number min # The minimum amount of linear damping applied to particles. +---@return number max # The maximum amount of linear damping applied to particles. +function ParticleSystem:getLinearDamping() end + +--- +---Gets the particle image's draw offset. +--- +---@return number ox # The x coordinate of the particle image's draw offset. +---@return number oy # The y coordinate of the particle image's draw offset. +function ParticleSystem:getOffset() end + +--- +---Gets the lifetime of the particles. +--- +---@return number min # The minimum life of the particles (in seconds). +---@return number max # The maximum life of the particles (in seconds). +function ParticleSystem:getParticleLifetime() end + +--- +---Gets the position of the emitter. +--- +---@return number x # Position along x-axis. +---@return number y # Position along y-axis. +function ParticleSystem:getPosition() end + +--- +---Gets the series of Quads used for the particle sprites. +--- +---@return table quads # A table containing the Quads used. +function ParticleSystem:getQuads() end + +--- +---Gets the radial acceleration (away from the emitter). +--- +---@return number min # The minimum acceleration. +---@return number max # The maximum acceleration. +function ParticleSystem:getRadialAcceleration() end + +--- +---Gets the rotation of the image upon particle creation (in radians). +--- +---@return number min # The minimum initial angle (radians). +---@return number max # The maximum initial angle (radians). +function ParticleSystem:getRotation() end + +--- +---Gets the amount of size variation (0 meaning no variation and 1 meaning full variation between start and end). +--- +---@return number variation # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). +function ParticleSystem:getSizeVariation() end + +--- +---Gets the series of sizes by which the sprite is scaled. 1.0 is normal size. The particle system will interpolate between each size evenly over the particle's lifetime. +--- +---@return number size1 # The first size. +---@return number size2 # The second size. +---@return number size8 # The eighth size. +function ParticleSystem:getSizes() end + +--- +---Gets the speed of the particles. +--- +---@return number min # The minimum linear speed of the particles. +---@return number max # The maximum linear speed of the particles. +function ParticleSystem:getSpeed() end + +--- +---Gets the spin of the sprite. +--- +---@return number min # The minimum spin (radians per second). +---@return number max # The maximum spin (radians per second). +---@return number variation # The degree of variation (0 meaning no variation and 1 meaning full variation between start and end). +function ParticleSystem:getSpin() end + +--- +---Gets the amount of spin variation (0 meaning no variation and 1 meaning full variation between start and end). +--- +---@return number variation # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). +function ParticleSystem:getSpinVariation() end + +--- +---Gets the amount of directional spread of the particle emitter (in radians). +--- +---@return number spread # The spread of the emitter (radians). +function ParticleSystem:getSpread() end + +--- +---Gets the tangential acceleration (acceleration perpendicular to the particle's direction). +--- +---@return number min # The minimum acceleration. +---@return number max # The maximum acceleration. +function ParticleSystem:getTangentialAcceleration() end + +--- +---Gets the texture (Image or Canvas) used for the particles. +--- +---@return love.graphics.Texture texture # The Image or Canvas used for the particles. +function ParticleSystem:getTexture() end + +--- +---Gets whether particle angles and rotations are relative to their velocities. If enabled, particles are aligned to the angle of their velocities and rotate relative to that angle. +--- +---@return boolean enable # True if relative particle rotation is enabled, false if it's disabled. +function ParticleSystem:hasRelativeRotation() end + +--- +---Checks whether the particle system is actively emitting particles. +--- +---@return boolean active # True if system is active, false otherwise. +function ParticleSystem:isActive() end + +--- +---Checks whether the particle system is paused. +--- +---@return boolean paused # True if system is paused, false otherwise. +function ParticleSystem:isPaused() end + +--- +---Checks whether the particle system is stopped. +--- +---@return boolean stopped # True if system is stopped, false otherwise. +function ParticleSystem:isStopped() end + +--- +---Moves the position of the emitter. This results in smoother particle spawning behaviour than if ParticleSystem:setPosition is used every frame. +--- +---@param x number # Position along x-axis. +---@param y number # Position along y-axis. +function ParticleSystem:moveTo(x, y) end + +--- +---Pauses the particle emitter. +--- +function ParticleSystem:pause() end + +--- +---Resets the particle emitter, removing any existing particles and resetting the lifetime counter. +--- +function ParticleSystem:reset() end + +--- +---Sets the size of the buffer (the max allowed amount of particles in the system). +--- +---@param size number # The buffer size. +function ParticleSystem:setBufferSize(size) end + +--- +---Sets a series of colors to apply to the particle sprite. The particle system will interpolate between each color evenly over the particle's lifetime. +--- +---Arguments can be passed in groups of four, representing the components of the desired RGBA value, or as tables of RGBA component values, with a default alpha value of 1 if only three values are given. At least one color must be specified. A maximum of eight may be used. +--- +---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. +--- +---@param r1 number # First color, red component (0-1). +---@param g1 number # First color, green component (0-1). +---@param b1 number # First color, blue component (0-1). +---@param a1 number # First color, alpha component (0-1). +---@param r2 number # Second color, red component (0-1). +---@param g2 number # Second color, green component (0-1). +---@param b2 number # Second color, blue component (0-1). +---@param a2 number # Second color, alpha component (0-1). +---@param r8 number # Eighth color, red component (0-1). +---@param g8 number # Eighth color, green component (0-1). +---@param b8 number # Eighth color, blue component (0-1). +---@param a8 number # Eighth color, alpha component (0-1). +function ParticleSystem:setColors(r1, g1, b1, a1, r2, g2, b2, a2, r8, g8, b8, a8) end + +--- +---Sets the direction the particles will be emitted in. +--- +---@param direction number # The direction of the particles (in radians). +function ParticleSystem:setDirection(direction) end + +--- +---Sets area-based spawn parameters for the particles. Newly created particles will spawn in an area around the emitter based on the parameters to this function. +--- +---@param distribution love.graphics.AreaSpreadDistribution # The type of distribution for new particles. +---@param dx number # The maximum spawn distance from the emitter along the x-axis for uniform distribution, or the standard deviation along the x-axis for normal distribution. +---@param dy number # The maximum spawn distance from the emitter along the y-axis for uniform distribution, or the standard deviation along the y-axis for normal distribution. +---@param angle number # The angle in radians of the emission area. +---@param directionRelativeToCenter boolean # True if newly spawned particles will be oriented relative to the center of the emission area, false otherwise. +function ParticleSystem:setEmissionArea(distribution, dx, dy, angle, directionRelativeToCenter) end + +--- +---Sets the amount of particles emitted per second. +--- +---@param rate number # The amount of particles per second. +function ParticleSystem:setEmissionRate(rate) end + +--- +---Sets how long the particle system should emit particles (if -1 then it emits particles forever). +--- +---@param life number # The lifetime of the emitter (in seconds). +function ParticleSystem:setEmitterLifetime(life) end + +--- +---Sets the mode to use when the ParticleSystem adds new particles. +--- +---@param mode love.graphics.ParticleInsertMode # The mode to use when the ParticleSystem adds new particles. +function ParticleSystem:setInsertMode(mode) end + +--- +---Sets the linear acceleration (acceleration along the x and y axes) for particles. +--- +---Every particle created will accelerate along the x and y axes between xmin,ymin and xmax,ymax. +--- +---@param xmin number # The minimum acceleration along the x axis. +---@param ymin number # The minimum acceleration along the y axis. +---@param xmax number # The maximum acceleration along the x axis. +---@param ymax number # The maximum acceleration along the y axis. +function ParticleSystem:setLinearAcceleration(xmin, ymin, xmax, ymax) end + +--- +---Sets the amount of linear damping (constant deceleration) for particles. +--- +---@param min number # The minimum amount of linear damping applied to particles. +---@param max number # The maximum amount of linear damping applied to particles. +function ParticleSystem:setLinearDamping(min, max) end + +--- +---Set the offset position which the particle sprite is rotated around. +--- +---If this function is not used, the particles rotate around their center. +--- +---@param x number # The x coordinate of the rotation offset. +---@param y number # The y coordinate of the rotation offset. +function ParticleSystem:setOffset(x, y) end + +--- +---Sets the lifetime of the particles. +--- +---@param min number # The minimum life of the particles (in seconds). +---@param max number # The maximum life of the particles (in seconds). +function ParticleSystem:setParticleLifetime(min, max) end + +--- +---Sets the position of the emitter. +--- +---@param x number # Position along x-axis. +---@param y number # Position along y-axis. +function ParticleSystem:setPosition(x, y) end + +--- +---Sets a series of Quads to use for the particle sprites. Particles will choose a Quad from the list based on the particle's current lifetime, allowing for the use of animated sprite sheets with ParticleSystems. +--- +---@param quad1 love.graphics.Quad # The first Quad to use. +---@param quad2 love.graphics.Quad # The second Quad to use. +function ParticleSystem:setQuads(quad1, quad2) end + +--- +---Set the radial acceleration (away from the emitter). +--- +---@param min number # The minimum acceleration. +---@param max number # The maximum acceleration. +function ParticleSystem:setRadialAcceleration(min, max) end + +--- +---Sets whether particle angles and rotations are relative to their velocities. If enabled, particles are aligned to the angle of their velocities and rotate relative to that angle. +--- +---@param enable boolean # True to enable relative particle rotation, false to disable it. +function ParticleSystem:setRelativeRotation(enable) end + +--- +---Sets the rotation of the image upon particle creation (in radians). +--- +---@param min number # The minimum initial angle (radians). +---@param max number # The maximum initial angle (radians). +function ParticleSystem:setRotation(min, max) end + +--- +---Sets the amount of size variation (0 meaning no variation and 1 meaning full variation between start and end). +--- +---@param variation number # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). +function ParticleSystem:setSizeVariation(variation) end + +--- +---Sets a series of sizes by which to scale a particle sprite. 1.0 is normal size. The particle system will interpolate between each size evenly over the particle's lifetime. +--- +---At least one size must be specified. A maximum of eight may be used. +--- +---@param size1 number # The first size. +---@param size2 number # The second size. +---@param size8 number # The eighth size. +function ParticleSystem:setSizes(size1, size2, size8) end + +--- +---Sets the speed of the particles. +--- +---@param min number # The minimum linear speed of the particles. +---@param max number # The maximum linear speed of the particles. +function ParticleSystem:setSpeed(min, max) end + +--- +---Sets the spin of the sprite. +--- +---@param min number # The minimum spin (radians per second). +---@param max number # The maximum spin (radians per second). +function ParticleSystem:setSpin(min, max) end + +--- +---Sets the amount of spin variation (0 meaning no variation and 1 meaning full variation between start and end). +--- +---@param variation number # The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). +function ParticleSystem:setSpinVariation(variation) end + +--- +---Sets the amount of spread for the system. +--- +---@param spread number # The amount of spread (radians). +function ParticleSystem:setSpread(spread) end + +--- +---Sets the tangential acceleration (acceleration perpendicular to the particle's direction). +--- +---@param min number # The minimum acceleration. +---@param max number # The maximum acceleration. +function ParticleSystem:setTangentialAcceleration(min, max) end + +--- +---Sets the texture (Image or Canvas) to be used for the particles. +--- +---@param texture love.graphics.Texture # An Image or Canvas to use for the particles. +function ParticleSystem:setTexture(texture) end + +--- +---Starts the particle emitter. +--- +function ParticleSystem:start() end + +--- +---Stops the particle emitter, resetting the lifetime counter. +--- +function ParticleSystem:stop() end + +--- +---Updates the particle system; moving, creating and killing particles. +--- +---@param dt number # The time (seconds) since last frame. +function ParticleSystem:update(dt) end + +---@class love.graphics.Quad: love.graphics.Object +local Quad = {} + +--- +---Gets reference texture dimensions initially specified in love.graphics.newQuad. +--- +---@return number sw # The Texture width used by the Quad. +---@return number sh # The Texture height used by the Quad. +function Quad:getTextureDimensions() end + +--- +---Gets the current viewport of this Quad. +--- +---@return number x # The top-left corner along the x-axis. +---@return number y # The top-left corner along the y-axis. +---@return number w # The width of the viewport. +---@return number h # The height of the viewport. +function Quad:getViewport() end + +--- +---Sets the texture coordinates according to a viewport. +--- +---@param x number # The top-left corner along the x-axis. +---@param y number # The top-left corner along the y-axis. +---@param w number # The width of the viewport. +---@param h number # The height of the viewport. +---@param sw number # The reference width, the width of the Image. (Must be greater than 0.) +---@param sh number # The reference height, the height of the Image. (Must be greater than 0.) +function Quad:setViewport(x, y, w, h, sw, sh) end + +---@class love.graphics.Shader: love.graphics.Object +local Shader = {} + +--- +---Returns any warning and error messages from compiling the shader code. This can be used for debugging your shaders if there's anything the graphics hardware doesn't like. +--- +---@return string warnings # Warning and error messages (if any). +function Shader:getWarnings() end + +--- +---Gets whether a uniform / extern variable exists in the Shader. +--- +---If a graphics driver's shader compiler determines that a uniform / extern variable doesn't affect the final output of the shader, it may optimize the variable out. This function will return false in that case. +--- +---@param name string # The name of the uniform variable. +---@return boolean hasuniform # Whether the uniform exists in the shader and affects its final output. +function Shader:hasUniform(name) end + +--- +---Sends one or more values to a special (''uniform'') variable inside the shader. Uniform variables have to be marked using the ''uniform'' or ''extern'' keyword, e.g. +--- +---uniform float time; // 'float' is the typical number type used in GLSL shaders. +--- +---uniform float varsvec2 light_pos; +--- +---uniform vec4 colors[4; +--- +---The corresponding send calls would be +--- +---shader:send('time', t) +--- +---shader:send('vars',a,b) +--- +---shader:send('light_pos', {light_x, light_y}) +--- +---shader:send('colors', {r1, g1, b1, a1}, {r2, g2, b2, a2}, {r3, g3, b3, a3}, {r4, g4, b4, a4}) +--- +---Uniform / extern variables are read-only in the shader code and remain constant until modified by a Shader:send call. Uniform variables can be accessed in both the Vertex and Pixel components of a shader, as long as the variable is declared in each. +--- +---@param name string # Name of the number to send to the shader. +---@param number number # Number to send to store in the uniform variable. +---@param ... number # Additional numbers to send if the uniform variable is an array. +function Shader:send(name, number, ...) end + +--- +---Sends one or more colors to a special (''extern'' / ''uniform'') vec3 or vec4 variable inside the shader. The color components must be in the range of 1. The colors are gamma-corrected if global gamma-correction is enabled. +--- +---Extern variables must be marked using the ''extern'' keyword, e.g. +--- +---extern vec4 Color; +--- +---The corresponding sendColor call would be +--- +---shader:sendColor('Color', {r, g, b, a}) +--- +---Extern variables can be accessed in both the Vertex and Pixel stages of a shader, as long as the variable is declared in each. +--- +---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. +--- +---@param name string # The name of the color extern variable to send to in the shader. +---@param color table # A table with red, green, blue, and optional alpha color components in the range of 1 to send to the extern as a vector. +---@param ... table # Additional colors to send in case the extern is an array. All colors need to be of the same size (e.g. only vec3's). +function Shader:sendColor(name, color, ...) end + +---@class love.graphics.SpriteBatch: love.graphics.Drawable, love.graphics.Object +local SpriteBatch = {} + +--- +---Adds a sprite to the batch. Sprites are drawn in the order they are added. +--- +---@param x number # The position to draw the object (x-axis). +---@param y number # The position to draw the object (y-axis). +---@param r number # Orientation (radians). +---@param sx number # Scale factor (x-axis). +---@param sy number # Scale factor (y-axis). +---@param ox number # Origin offset (x-axis). +---@param oy number # Origin offset (y-axis). +---@param kx number # Shear factor (x-axis). +---@param ky number # Shear factor (y-axis). +---@return number id # An identifier for the added sprite. +function SpriteBatch:add(x, y, r, sx, sy, ox, oy, kx, ky) end + +--- +---Adds a sprite to a batch created with an Array Texture. +--- +---@param layerindex number # The index of the layer to use for this sprite. +---@param x number # The position to draw the sprite (x-axis). +---@param y number # The position to draw the sprite (y-axis). +---@param r number # Orientation (radians). +---@param sx number # Scale factor (x-axis). +---@param sy number # Scale factor (y-axis). +---@param ox number # Origin offset (x-axis). +---@param oy number # Origin offset (y-axis). +---@param kx number # Shearing factor (x-axis). +---@param ky number # Shearing factor (y-axis). +---@return number spriteindex # The index of the added sprite, for use with SpriteBatch:set or SpriteBatch:setLayer. +function SpriteBatch:addLayer(layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end + +--- +---Attaches a per-vertex attribute from a Mesh onto this SpriteBatch, for use when drawing. This can be combined with a Shader to augment a SpriteBatch with per-vertex or additional per-sprite information instead of just having per-sprite colors. +--- +---Each sprite in a SpriteBatch has 4 vertices in the following order: top-left, bottom-left, top-right, bottom-right. The index returned by SpriteBatch:add (and used by SpriteBatch:set) can used to determine the first vertex of a specific sprite with the formula 1 + 4 * ( id - 1 ). +--- +---@param name string # The name of the vertex attribute to attach. +---@param mesh love.graphics.Mesh # The Mesh to get the vertex attribute from. +function SpriteBatch:attachAttribute(name, mesh) end + +--- +---Removes all sprites from the buffer. +--- +function SpriteBatch:clear() end + +--- +---Immediately sends all new and modified sprite data in the batch to the graphics card. +--- +---Normally it isn't necessary to call this method as love.graphics.draw(spritebatch, ...) will do it automatically if needed, but explicitly using SpriteBatch:flush gives more control over when the work happens. +--- +---If this method is used, it generally shouldn't be called more than once (at most) between love.graphics.draw(spritebatch, ...) calls. +--- +function SpriteBatch:flush() end + +--- +---Gets the maximum number of sprites the SpriteBatch can hold. +--- +---@return number size # The maximum number of sprites the batch can hold. +function SpriteBatch:getBufferSize() end + +--- +---Gets the color that will be used for the next add and set operations. +--- +---If no color has been set with SpriteBatch:setColor or the current SpriteBatch color has been cleared, this method will return nil. +--- +---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. +--- +---@return number r # The red component (0-1). +---@return number g # The green component (0-1). +---@return number b # The blue component (0-1). +---@return number a # The alpha component (0-1). +function SpriteBatch:getColor() end + +--- +---Gets the number of sprites currently in the SpriteBatch. +--- +---@return number count # The number of sprites currently in the batch. +function SpriteBatch:getCount() end + +--- +---Gets the texture (Image or Canvas) used by the SpriteBatch. +--- +---@return love.graphics.Texture texture # The Image or Canvas used by the SpriteBatch. +function SpriteBatch:getTexture() end + +--- +---Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer. +--- +---@param spriteindex number # The index of the sprite that will be changed. +---@param x number # The position to draw the object (x-axis). +---@param y number # The position to draw the object (y-axis). +---@param r number # Orientation (radians). +---@param sx number # Scale factor (x-axis). +---@param sy number # Scale factor (y-axis). +---@param ox number # Origin offset (x-axis). +---@param oy number # Origin offset (y-axis). +---@param kx number # Shear factor (x-axis). +---@param ky number # Shear factor (y-axis). +function SpriteBatch:set(spriteindex, x, y, r, sx, sy, ox, oy, kx, ky) end + +--- +---Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch. +--- +---In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1. +--- +---In version 0.9.2 and older, the global color set with love.graphics.setColor will not work on the SpriteBatch if any of the sprites has its own color. +--- +---@param r number # The amount of red. +---@param g number # The amount of green. +---@param b number # The amount of blue. +---@param a number # The amount of alpha. +function SpriteBatch:setColor(r, g, b, a) end + +--- +---Restricts the drawn sprites in the SpriteBatch to a subset of the total. +--- +---@param start number # The index of the first sprite to draw. Index 1 corresponds to the first sprite added with SpriteBatch:add. +---@param count number # The number of sprites to draw. +function SpriteBatch:setDrawRange(start, count) end + +--- +---Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture. +--- +---@param spriteindex number # The index of the existing sprite to replace. +---@param layerindex number # The index of the layer in the Array Texture to use for this sprite. +---@param x number # The position to draw the sprite (x-axis). +---@param y number # The position to draw the sprite (y-axis). +---@param r number # Orientation (radians). +---@param sx number # Scale factor (x-axis). +---@param sy number # Scale factor (y-axis). +---@param ox number # Origin offset (x-axis). +---@param oy number # Origin offset (y-axis). +---@param kx number # Shearing factor (x-axis). +---@param ky number # Shearing factor (y-axis). +function SpriteBatch:setLayer(spriteindex, layerindex, x, y, r, sx, sy, ox, oy, kx, ky) end + +--- +---Sets the texture (Image or Canvas) used for the sprites in the batch, when drawing. +--- +---@param texture love.graphics.Texture # The new Image or Canvas to use for the sprites in the batch. +function SpriteBatch:setTexture(texture) end + +---@class love.graphics.Text: love.graphics.Drawable, love.graphics.Object +local Text = {} + +--- +---Adds additional colored text to the Text object at the specified position. +--- +---@param textstring string # The text to add to the object. +---@param x number # The position of the new text on the x-axis. +---@param y number # The position of the new text on the y-axis. +---@param angle number # The orientation of the new text in radians. +---@param sx number # Scale factor on the x-axis. +---@param sy number # Scale factor on the y-axis. +---@param ox number # Origin offset on the x-axis. +---@param oy number # Origin offset on the y-axis. +---@param kx number # Shearing / skew factor on the x-axis. +---@param ky number # Shearing / skew factor on the y-axis. +---@return number index # An index number that can be used with Text:getWidth or Text:getHeight. +function Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) end + +--- +---Adds additional formatted / colored text to the Text object at the specified position. +--- +---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 arguments change. +--- +---@param textstring string # The text to add to the object. +---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. +---@param align love.graphics.AlignMode # The alignment of the text. +---@param x number # The position of the new text (x-axis). +---@param y number # The position of the new text (y-axis). +---@param angle number # Orientation (radians). +---@param sx number # Scale factor (x-axis). +---@param sy number # Scale factor (y-axis). +---@param ox number # Origin offset (x-axis). +---@param oy number # Origin offset (y-axis). +---@param kx number # Shearing / skew factor (x-axis). +---@param ky number # Shearing / skew factor (y-axis). +---@return number index # An index number that can be used with Text:getWidth or Text:getHeight. +function Text:addf(textstring, wraplimit, align, x, y, angle, sx, sy, ox, oy, kx, ky) end + +--- +---Clears the contents of the Text object. +--- +function Text:clear() end + +--- +---Gets the width and height of the text in pixels. +--- +---@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned. +---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. +function Text:getDimensions() end + +--- +---Gets the Font used with the Text object. +--- +---@return love.graphics.Font font # The font used with this Text object. +function Text:getFont() end + +--- +---Gets the height of the text in pixels. +--- +---@return number height # The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned. +function Text:getHeight() end + +--- +---Gets the width of the text in pixels. +--- +---@return number width # The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned. +function Text:getWidth() end + +--- +---Replaces the contents of the Text object with a new unformatted string. +--- +---@param textstring string # The new string of text to use. +function Text:set(textstring) end + +--- +---Replaces the Font used with the text. +--- +---@param font love.graphics.Font # The new font to use with this Text object. +function Text:setFont(font) end + +--- +---Replaces the contents of the Text object with a new formatted string. +--- +---@param textstring string # The new string of text to use. +---@param wraplimit number # The maximum width in pixels of the text before it gets automatically wrapped to a new line. +---@param align love.graphics.AlignMode # The alignment of the text. +function Text:setf(textstring, wraplimit, align) end + +---@class love.graphics.Texture: love.graphics.Drawable, love.graphics.Object +local Texture = {} + +--- +---Gets the DPI scale factor of the Texture. +--- +---The DPI scale factor represents relative pixel density. A DPI scale factor of 2 means the texture has twice the pixel density in each dimension (4 times as many pixels in the same area) compared to a texture with a DPI scale factor of 1. +--- +---For example, a texture with pixel dimensions of 100x100 with a DPI scale factor of 2 will be drawn as if it was 50x50. This is useful with high-dpi / retina displays to easily allow swapping out higher or lower pixel density Images and Canvases without needing any extra manual scaling logic. +--- +---@return number dpiscale # The DPI scale factor of the Texture. +function Texture:getDPIScale() end + +--- +---Gets the depth of a Volume Texture. Returns 1 for 2D, Cubemap, and Array textures. +--- +---@return number depth # The depth of the volume Texture. +function Texture:getDepth() end + +--- +---Gets the comparison mode used when sampling from a depth texture in a shader. +--- +---Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D. +--- +---@return love.graphics.CompareMode compare # The comparison mode used when sampling from this texture in a shader, or nil if setDepthSampleMode has not been called on this Texture. +function Texture:getDepthSampleMode() end + +--- +---Gets the width and height of the Texture. +--- +---@return number width # The width of the Texture. +---@return number height # The height of the Texture. +function Texture:getDimensions() end + +--- +---Gets the filter mode of the Texture. +--- +---@return love.graphics.FilterMode min # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). +---@return love.graphics.FilterMode mag # Filter mode to use when magnifying the texture (rendering it at a smaller size on-screen than its size in pixels). +---@return number anisotropy # Maximum amount of anisotropic filtering used. +function Texture:getFilter() end + +--- +---Gets the pixel format of the Texture. +--- +---@return love.graphics.PixelFormat format # The pixel format the Texture was created with. +function Texture:getFormat() end + +--- +---Gets the height of the Texture. +--- +---@return number height # The height of the Texture. +function Texture:getHeight() end + +--- +---Gets the number of layers / slices in an Array Texture. Returns 1 for 2D, Cubemap, and Volume textures. +--- +---@return number layers # The number of layers in the Array Texture. +function Texture:getLayerCount() end + +--- +---Gets the number of mipmaps contained in the Texture. If the texture was not created with mipmaps, it will return 1. +--- +---@return number mipmaps # The number of mipmaps in the Texture. +function Texture:getMipmapCount() end + +--- +---Gets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images. +--- +---@return love.graphics.FilterMode mode # The filter mode used in between mipmap levels. nil if mipmap filtering is not enabled. +---@return number sharpness # Value used to determine whether the image should use more or less detailed mipmap levels than normal when drawing. +function Texture:getMipmapFilter() end + +--- +---Gets the width and height in pixels of the Texture. +--- +---Texture:getDimensions gets the dimensions of the texture in units scaled by the texture's DPI scale factor, rather than pixels. Use getDimensions for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelDimensions only when dealing specifically with pixels, for example when using Canvas:newImageData. +--- +---@return number pixelwidth # The width of the Texture, in pixels. +---@return number pixelheight # The height of the Texture, in pixels. +function Texture:getPixelDimensions() end + +--- +---Gets the height in pixels of the Texture. +--- +---DPI scale factor, rather than pixels. Use getHeight for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelHeight only when dealing specifically with pixels, for example when using Canvas:newImageData. +--- +---@return number pixelheight # The height of the Texture, in pixels. +function Texture:getPixelHeight() end + +--- +---Gets the width in pixels of the Texture. +--- +---DPI scale factor, rather than pixels. Use getWidth for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelWidth only when dealing specifically with pixels, for example when using Canvas:newImageData. +--- +---@return number pixelwidth # The width of the Texture, in pixels. +function Texture:getPixelWidth() end + +--- +---Gets the type of the Texture. +--- +---@return love.graphics.TextureType texturetype # The type of the Texture. +function Texture:getTextureType() end + +--- +---Gets the width of the Texture. +--- +---@return number width # The width of the Texture. +function Texture:getWidth() end + +--- +---Gets the wrapping properties of a Texture. +--- +---This function returns the currently set horizontal and vertical wrapping modes for the texture. +--- +---@return love.graphics.WrapMode horiz # Horizontal wrapping mode of the texture. +---@return love.graphics.WrapMode vert # Vertical wrapping mode of the texture. +---@return love.graphics.WrapMode depth # Wrapping mode for the z-axis of a Volume texture. +function Texture:getWrap() end + +--- +---Gets whether the Texture can be drawn and sent to a Shader. +--- +---Canvases created with stencil and/or depth PixelFormats are not readable by default, unless readable=true is specified in the settings table passed into love.graphics.newCanvas. +--- +---Non-readable Canvases can still be rendered to. +--- +---@return boolean readable # Whether the Texture is readable. +function Texture:isReadable() end + +--- +---Sets the comparison mode used when sampling from a depth texture in a shader. Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D. +--- +---When using a depth texture with a comparison mode set in a shader, it must be declared as a sampler2DShadow and used in a GLSL 3 Shader. The result of accessing the texture in the shader will return a float between 0 and 1, proportional to the number of samples (up to 4 samples will be used if bilinear filtering is enabled) that passed the test set by the comparison operation. +--- +---Depth texture comparison can only be used with readable depth-formatted Canvases. +--- +---@param compare love.graphics.CompareMode # The comparison mode used when sampling from this texture in a shader. +function Texture:setDepthSampleMode(compare) end + +--- +---Sets the filter mode of the Texture. +--- +---@param min love.graphics.FilterMode # Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels). +---@param mag love.graphics.FilterMode # Filter mode to use when magnifying the texture (rendering it at a larger size on-screen than its size in pixels). +---@param anisotropy number # Maximum amount of anisotropic filtering to use. +function Texture:setFilter(min, mag, anisotropy) end + +--- +---Sets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images. +--- +---Mipmapping is useful when drawing a texture at a reduced scale. It can improve performance and reduce aliasing issues. +--- +---In created with the mipmaps flag enabled for the mipmap filter to have any effect. In versions prior to 0.10.0 it's best to call this method directly after creating the image with love.graphics.newImage, to avoid bugs in certain graphics drivers. +--- +---Due to hardware restrictions and driver bugs, in versions prior to 0.10.0 images that weren't loaded from a CompressedData must have power-of-two dimensions (64x64, 512x256, etc.) to use mipmaps. +--- +---@param filtermode love.graphics.FilterMode # The filter mode to use in between mipmap levels. 'nearest' will often give better performance. +---@param sharpness number # A positive sharpness value makes the texture use a more detailed mipmap level when drawing, at the expense of performance. A negative value does the reverse. +function Texture:setMipmapFilter(filtermode, sharpness) end + +--- +---Sets the wrapping properties of a Texture. +--- +---This function sets the way a Texture is repeated when it is drawn with a Quad that is larger than the texture's extent, or when a custom Shader is used which uses texture coordinates outside of [0, 1]. A texture may be clamped or set to repeat in both horizontal and vertical directions. +--- +---Clamped textures appear only once (with the edges of the texture stretching to fill the extent of the Quad), whereas repeated ones repeat as many times as there is room in the Quad. +--- +---@param horiz love.graphics.WrapMode # Horizontal wrapping mode of the texture. +---@param vert love.graphics.WrapMode # Vertical wrapping mode of the texture. +---@param depth love.graphics.WrapMode # Wrapping mode for the z-axis of a Volume texture. +function Texture:setWrap(horiz, vert, depth) end + +---@class love.graphics.Video: love.graphics.Drawable, love.graphics.Object +local Video = {} + +--- +---Gets the width and height of the Video in pixels. +--- +---@return number width # The width of the Video. +---@return number height # The height of the Video. +function Video:getDimensions() end + +--- +---Gets the scaling filters used when drawing the Video. +--- +---@return love.graphics.FilterMode min # The filter mode used when scaling the Video down. +---@return love.graphics.FilterMode mag # The filter mode used when scaling the Video up. +---@return number anisotropy # Maximum amount of anisotropic filtering used. +function Video:getFilter() end + +--- +---Gets the height of the Video in pixels. +--- +---@return number height # The height of the Video. +function Video:getHeight() end + +--- +---Gets the audio Source used for playing back the video's audio. May return nil if the video has no audio, or if Video:setSource is called with a nil argument. +--- +---@return love.graphics.Source source # The audio Source used for audio playback, or nil if the video has no audio. +function Video:getSource() end + +--- +---Gets the VideoStream object used for decoding and controlling the video. +--- +---@return love.graphics.VideoStream stream # The VideoStream used for decoding and controlling the video. +function Video:getStream() end + +--- +---Gets the width of the Video in pixels. +--- +---@return number width # The width of the Video. +function Video:getWidth() end + +--- +---Gets whether the Video is currently playing. +--- +---@return boolean playing # Whether the video is playing. +function Video:isPlaying() end + +--- +---Pauses the Video. +--- +function Video:pause() end + +--- +---Starts playing the Video. In order for the video to appear onscreen it must be drawn with love.graphics.draw. +--- +function Video:play() end + +--- +---Rewinds the Video to the beginning. +--- +function Video:rewind() end + +--- +---Sets the current playback position of the Video. +--- +---@param offset number # The time in seconds since the beginning of the Video. +function Video:seek(offset) end + +--- +---Sets the scaling filters used when drawing the Video. +--- +---@param min love.graphics.FilterMode # The filter mode used when scaling the Video down. +---@param mag love.graphics.FilterMode # The filter mode used when scaling the Video up. +---@param anisotropy number # Maximum amount of anisotropic filtering used. +function Video:setFilter(min, mag, anisotropy) end + +--- +---Sets the audio Source used for playing back the video's audio. The audio Source also controls playback speed and synchronization. +--- +---@param source love.graphics.Source # The audio Source used for audio playback, or nil to disable audio synchronization. +function Video:setSource(source) end + +--- +---Gets the current playback position of the Video. +--- +---@return number seconds # The time in seconds since the beginning of the Video. +function Video:tell() end |