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 height of the Canvas.
canvas Canvas A new Canvas with specified width and height.
canvas = love.graphics.newCanvas( width, height, settings )
width number The desired width of the Canvas.
height number The desired height of the Canvas.
settings table A table containing the given fields:
settings.type ('2d') TextureType The type of Canvas to create.
settings.format ('normal') PixelFormat The format of the Canvas.
settings.readable boolean Whether the Canvas is readable (drawable and accessible in a Shader). True by default for regular formats, false by default for depth/stencil formats.
settings.msaa (0) number The desired number of multisample antialiasing (MSAA) samples used when drawing to the Canvas.
settings.dpiscale (love.graphics.getDPIScale()) number The DPI scale factor of the Canvas, used when drawing to the Canvas as well as when drawing the Canvas to the screen.
settings.mipmaps ('none') MipmapMode Whether the Canvas has mipmaps, and whether to automatically regenerate them if so.
canvas Canvas A new Canvas with specified width and height.
canvas = love.graphics.newCanvas( width, height, layers, settings )
width number The desired width of the Canvas.
height number The desired height of the Canvas.
layers number The number of array layers (if the Canvas is an Array Texture), or the volume depth (if the Canvas is a Volume Texture).
settings table A table containing the given fields:
settings.type ('array') TextureType The type of Canvas to create.
settings.format ('normal') PixelFormat The format of the Canvas.
settings.readable boolean Whether the Canvas is readable (drawable and accessible in a Shader). True by default for regular formats, false by default for depth/stencil formats.
settings.msaa (0) number The desired number of multisample antialiasing (MSAA) samples used when drawing to the Canvas.
settings.dpiscale (love.graphics.getDPIScale()) number The DPI scale factor of the Canvas, used when drawing to the Canvas as well as when drawing the Canvas to the screen.
settings.mipmaps ('none') MipmapMode Whether the Canvas has mipmaps, and whether to automatically regenerate them if so.
canvas Canvas A new Canvas with specified width and height.