Difference between revisions of "RenderTarget:getPixel"

From GiderosMobile
(remove language stuff)
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Returns single pixels color and alpha channel.
 
Returns single pixels color and alpha channel.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number), (number) = RenderTarget:getPixel(x,y)
 
(number), (number) = RenderTarget:getPixel(x,y)
 
</source>
 
</source>

Revision as of 14:30, 13 July 2023

Available since: Gideros 2016.06
Class: RenderTarget

Description

Returns single pixels color and alpha channel. <syntaxhighlight lang="lua"> (number), (number) = RenderTarget:getPixel(x,y) </source>

Parameters

x: (number) x coordinate of pixel
y: (number) y coordinate of pixel

Return values

Returns (number) color in hex
Returns (number) alpha value from 0 to 1