Difference between revisions of "love.graphics.newScreenshot"
m |
(Added new 0.9.0 variant) |
||
Line 1: | Line 1: | ||
Creates a screenshot and returns the image data. | Creates a screenshot and returns the image data. | ||
{{newobjectnotice}} | {{newobjectnotice}} | ||
+ | |||
== Function == | == Function == | ||
=== Synopsis === | === Synopsis === | ||
Line 9: | Line 10: | ||
None. | None. | ||
=== Returns === | === Returns === | ||
− | {{param|ImageData|screenshot|The image data of the screenshot}} | + | {{param|ImageData|screenshot|The image data of the screenshot.}} |
+ | |||
+ | == Function == | ||
+ | {{newin|[[0.9.0]]|090|type=variant}} | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | screenshot = love.graphics.newScreenshot( copyAlpha ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|boolean|copyAlpha (false)|Whether to include the screen's alpha channel in the ImageData. If false, the screenshot will be fully opaque.}} | ||
+ | === Returns === | ||
+ | {{param|ImageData|screenshot|The image data of the screenshot.}} | ||
+ | |||
== See Also == | == See Also == | ||
* [[parent::love.graphics]] | * [[parent::love.graphics]] | ||
+ | * [[ImageData:encode]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
{{#set:Description=Creates a screenshot and returns the [[ImageData]].}} | {{#set:Description=Creates a screenshot and returns the [[ImageData]].}} |
Revision as of 01:48, 25 August 2013
Creates a screenshot and returns the image data.
This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused! |
Contents
Function
Synopsis
screenshot = love.graphics.newScreenshot( )
Arguments
None.
Returns
ImageData screenshot
- The image data of the screenshot.
Function
Available since LÖVE 0.9.0 |
This variant is not supported in earlier versions. |
Synopsis
screenshot = love.graphics.newScreenshot( copyAlpha )
Arguments
boolean copyAlpha (false)
- Whether to include the screen's alpha channel in the ImageData. If false, the screenshot will be fully opaque.
Returns
ImageData screenshot
- The image data of the screenshot.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info