RenderTarget:getPixels: Difference between revisions
From GiderosMobile
Created page with "__NOTOC__ '''Available since:''' Gideros 2016.06<br/> === Description === Returns buffer containing color and alpha data from provided rectangle <source lang="lua"> (buffer),..." |
m Text replacement - "</source>" to "</syntaxhighlight>" |
||
| (9 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2016.06<br/> | '''Available since:''' Gideros 2016.06<br/> | ||
'''Class:''' [[RenderTarget]]<br/> | |||
=== Description === | === Description === | ||
Returns buffer containing color and alpha data from provided rectangle | Returns buffer containing color and alpha data from provided rectangle. | ||
< | <syntaxhighlight lang="lua"> | ||
(buffer) | (buffer) = RenderTarget:getPixels(x,y,w,h) | ||
</ | </syntaxhighlight> | ||
'''x | |||
'''y | === Parameters === | ||
'''w | '''x''': (number) x coordinate of pixel<br/> | ||
'''h | '''y''': (number) y coordinate of pixel<br/> | ||
'''w''': (number) width of rectangle to include in buffer<br/> | |||
'''h''': (number) height of rectangle to include in buffer<br/> | |||
=== Return values === | |||
'''Returns''' (buffer) buffer with color and alpha data<br/> | '''Returns''' (buffer) buffer with color and alpha data<br/> | ||
{{RenderTarget}} | |||
Latest revision as of 13:32, 13 July 2023
Available since: Gideros 2016.06
Class: RenderTarget
Description
Returns buffer containing color and alpha data from provided rectangle.
(buffer) = RenderTarget:getPixels(x,y,w,h)
Parameters
x: (number) x coordinate of pixel
y: (number) y coordinate of pixel
w: (number) width of rectangle to include in buffer
h: (number) height of rectangle to include in buffer
Return values
Returns (buffer) buffer with color and alpha data