Difference between revisions of "RenderTarget:getPixels"

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),...")
 
Line 4: Line 4:
 
Returns buffer containing color and alpha data from provided rectangle
 
Returns buffer containing color and alpha data from provided rectangle
 
<source lang="lua">
 
<source lang="lua">
(buffer), = RenderTarget:getPixels(xywh,)
+
(buffer) = RenderTarget:getPixels(x,y,w,h)
 
</source>
 
</source>
'''x:''' (number) x coordinate of pixel ''''''<br/>
+
'''x''': (number) x coordinate of pixel ''''''<br/>
'''y:''' (number) y coordinate of pixel ''''''<br/>
+
'''y''': (number) y coordinate of pixel ''''''<br/>
'''w:''' (number) width of rectangle to include in buffer ''''''<br/>
+
'''w''': (number) width of rectangle to include in buffer ''''''<br/>
'''h:''' (number) height of rectangle to include in buffer ''''''<br/>
+
'''h''': (number) height of rectangle to include in buffer ''''''<br/>
 
'''Returns''' (buffer) buffer with color and alpha data<br/>
 
'''Returns''' (buffer) buffer with color and alpha data<br/>

Revision as of 11:20, 23 August 2018

Available since: Gideros 2016.06

Description

Returns buffer containing color and alpha data from provided rectangle

(buffer) = RenderTarget:getPixels(x,y,w,h)

'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 '
Returns (buffer) buffer with color and alpha data