Difference between revisions of "RenderTarget:getPixels"

From GiderosMobile
(remove language stuff)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Returns buffer containing color and alpha data from provided rectangle.
 
Returns buffer containing color and alpha data from provided rectangle.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(buffer) = RenderTarget:getPixels(x,y,w,h)
 
(buffer) = RenderTarget:getPixels(x,y,w,h)
 
</source>
 
</source>

Revision as of 15:30, 13 July 2023

Available since: Gideros 2016.06
Class: RenderTarget

Description

Returns buffer containing color and alpha data from provided rectangle. <syntaxhighlight lang="lua"> (buffer) = RenderTarget:getPixels(x,y,w,h) </source>

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