{{newin|[[0.8.0]]|080|type=function|text=It has been renamed from [[love.graphics.newFramebuffer]]}}
Creates a new [[Canvas]] object for offscreen rendering.
{{newobjectnotice (日本語)}}

== 関数 ==
=== 概要 ===
<source lang="lua">
canvas = love.graphics.newCanvas( )
</source>
=== 引数 ===
なし。
=== 返値 ===
{{param (日本語)|Canvas|canvas|A new Canvas with dimensions equal to the window's size in pixels.}}

== 関数 ==
=== 概要 ===
<source lang="lua">
canvas = love.graphics.newCanvas( width, height )
</source>
=== 引数 ===
{{param (日本語)|number|width|The desired width of the Canvas.}}
{{param (日本語)|number|height|The desired height of the Canvas.}}
=== 返値 ===
{{param (日本語)|Canvas|canvas|A new Canvas with specified width and height.}}

== 関数 ==
{{newin (日本語)|[[11.0 (日本語)|11.0]]|110|type=異形}}
Creates a 2D or [[TextureType|cubemap]] Canvas using the given settings.
=== 概要 ===
<source lang="lua">
canvas = love.graphics.newCanvas( width, height, settings )
</source>
=== 引数 ===
{{param (日本語)|number|width|The desired width of the Canvas.}}
{{param (日本語)|number|height|The desired height of the Canvas.}}
{{param (日本語)|table|settings|A table containing the given fields:}}
{{subparam|TextureType|type ("2d")|The type of Canvas to create.}}
{{subparam|PixelFormat|format ("normal")|The format of the Canvas.}}
{{subparam|boolean|readable|Whether the Canvas is [[Texture:isReadable|readable]] (drawable and accessible in a [[Shader]]). True by default for regular formats, false by default for depth/stencil formats.}}
{{subparam|number|msaa (0)|The desired number of multisample antialiasing (MSAA) samples used when drawing to the Canvas.}}
{{subparam|number|dpiscale ([[love.graphics.getDPIScale]]())|The [[Texture:getDPIScale|DPI scale factor]] of the Canvas, used when drawing to the Canvas as well as when drawing the Canvas to the screen.}}
{{subparam|CanvasMipmapMode|mipmaps ("none")|Whether the Canvas has mipmaps, and whether to automatically regenerate them if so.}}
=== 返値 ===
{{param (日本語)|Canvas|canvas|A new Canvas with specified width and height.}}
=== 注釈 ===
Some Canvas formats have higher system requirements than the default format. Use [[love.graphics.getCanvasFormats]] to check for support.

== 関数 ==
{{newin (日本語)|[[11.0 (日本語)|11.0]]|110|type=異形}}
Creates a [[TextureType|volume or array]] texture-type Canvas.
=== 概要 ===
<source lang="lua">
canvas = love.graphics.newCanvas( width, height, layers, settings )
</source>
=== 引数 ===
{{param (日本語)|number|width|The desired width of the Canvas.}}
{{param (日本語)|number|height|The desired height of the Canvas.}}
{{param (日本語)|number|layers|The number of array layers (if the Canvas is an Array Texture), or the volume depth (if the Canvas is a Volume Texture).}}
{{param (日本語)|table|settings|A table containing the given fields:}}
{{subparam|TextureType|type ("array")|The type of Canvas to create.}}
{{subparam|PixelFormat|format ("normal")|The format of the Canvas.}}
{{subparam|boolean|readable|Whether the Canvas is [[Texture:isReadable|readable]] (drawable and accessible in a [[Shader]]). True by default for regular formats, false by default for depth/stencil formats.}}
{{subparam|number|msaa (0)|The desired number of multisample antialiasing (MSAA) samples used when drawing to the Canvas.}}
{{subparam|number|dpiscale ([[love.graphics.getDPIScale]]())|The [[Texture:getDPIScale|DPI scale factor]] of the Canvas, used when drawing to the Canvas as well as when drawing the Canvas to the screen.}}
{{subparam|CanvasMipmapMode|mipmaps ("none")|Whether the Canvas has mipmaps, and whether to automatically regenerate them if so.}}
=== 返値 ===
{{param (日本語)|Canvas|canvas|A new Canvas with specified width and height.}}

== 関数 ==
{{newinoldin|[[0.9.0]]|090|[[11.0]]|110|type=variant}}
=== 概要 ===
<source lang="lua">
canvas = love.graphics.newCanvas( width, height, format )
</source>
=== 引数 ===
{{param (日本語)|number|width (window_width)|The desired width of the Canvas.}}
{{param (日本語)|number|height (window_height)|The desired height of the Canvas.}}
{{param (日本語)|CanvasFormat|format ("normal")|The desired texture format of the Canvas.}}
=== 返値 ===
{{param (日本語)|Canvas|canvas|A new Canvas with specified width and height.}}
=== 注釈 ===
Some Canvas formats have higher system requirements than the default format. Use [[love.graphics.getCanvasFormats]] to check for support.

== 関数 ==
{{newinoldin|[[0.9.1]]|091|[[11.0]]|110|type=variant}}
=== 概要 ===
<source lang="lua">
canvas = love.graphics.newCanvas( width, height, format, msaa )
</source>
=== 引数 ===
{{param (日本語)|number|width (window_width)|The desired width of the Canvas.}}
{{param (日本語)|number|height (window_height)|The desired height of the Canvas.}}
{{param (日本語)|CanvasFormat|format ("normal")|The desired texture format of the Canvas.}}
{{param (日本語)|number|msaa (0)|The desired number of multisample antialiasing (MSAA) samples used when drawing to the Canvas.}}
=== 返値 ===
{{param (日本語)|Canvas|canvas|A new Canvas with specified width and height.}}

== 注釈 ==
Some Canvas formats have higher system requirements than the default format. Use [[love.graphics.getCanvasFormats]] to check for support.

The supported maximum number of MSAA samples varies depending on the system. Use [[love.graphics.getSystemLimits]] to check.
If the number of MSAA samples specified is greater than the maximum supported by the system, the Canvas will still be created but only using the maximum supported amount (this includes 0.)

== 関連 ==
* [[parent::love.graphics (日本語)]]
* [[Constructs::Canvas (日本語)]]
* [[love.graphics.setCanvas (日本語)]]
[[Category:Functions (日本語)]]
[[Sub-Category::Object Creation (日本語)| ]]
{{#set:Description=Creates a new [[Canvas]].}}

== そのほかの言語 ==
{{i18n (日本語)|love.graphics.newCanvas}}