Difference between revisions of "Canvas:newImageData"
(Created page) |
|||
Line 1: | Line 1: | ||
{{newin|[[0.10.0]]|100|type=function|text=It has been renamed from [[Canvas:getImageData]]}} | {{newin|[[0.10.0]]|100|type=function|text=It has been renamed from [[Canvas:getImageData]]}} | ||
Generates [[ImageData]] from the contents of the Canvas. | Generates [[ImageData]] from the contents of the Canvas. | ||
+ | |||
+ | == Function == | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | data = Canvas:newImageData( ) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | None. | ||
+ | === Returns === | ||
+ | {{param|ImageData|data|The new ImageData made from the Canvas' contents.}} | ||
== Function == | == Function == | ||
Line 8: | Line 18: | ||
</source> | </source> | ||
=== Arguments === | === Arguments === | ||
− | {{param|number|x | + | {{param|number|x|The x-axis of the top-left corner of the area within the Canvas to capture.}} |
− | {{param|number|y | + | {{param|number|y|The y-axis of the top-left corner of the area within the Canvas to capture.}} |
− | {{param|number|width | + | {{param|number|width|The width of the area within the Canvas to capture.}} |
− | {{param|number|height | + | {{param|number|height|The height of the area within the Canvas to capture.}} |
=== Returns === | === Returns === | ||
{{param|ImageData|data|The new ImageData made from the Canvas' contents.}} | {{param|ImageData|data|The new ImageData made from the Canvas' contents.}} |
Revision as of 14:54, 30 May 2015
Available since LÖVE 0.10.0 |
It has been renamed from Canvas:getImageData. |
Generates ImageData from the contents of the Canvas.
Contents
Function
Synopsis
data = Canvas:newImageData( )
Arguments
None.
Returns
ImageData data
- The new ImageData made from the Canvas' contents.
Function
Synopsis
data = Canvas:newImageData( x, y, width, height )
Arguments
number x
- The x-axis of the top-left corner of the area within the Canvas to capture.
number y
- The y-axis of the top-left corner of the area within the Canvas to capture.
number width
- The width of the area within the Canvas to capture.
number height
- The height of the area within the Canvas to capture.
Returns
ImageData data
- The new ImageData made from the Canvas' contents.
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