Difference between revisions of "RenderTarget:getPixel"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(6 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 single pixels color and alpha channel. | |
− | < | + | <syntaxhighlight lang="lua"> |
(number), (number) = RenderTarget:getPixel(x,y) | (number), (number) = RenderTarget:getPixel(x,y) | ||
− | </ | + | </syntaxhighlight> |
+ | |||
=== Parameters === | === Parameters === | ||
− | '''x''': (number) | + | '''x''': (number) x coordinate of pixel<br/> |
− | '''y''': (number) | + | '''y''': (number) y coordinate of pixel<br/> |
+ | |||
=== Return values === | === Return values === | ||
− | '''Returns''' (number) | + | '''Returns''' (number) color in hex<br/> |
− | '''Returns''' (number) | + | '''Returns''' (number) alpha value from 0 to 1<br/> |
+ | |||
+ | {{RenderTarget}} |
Latest revision as of 14:32, 13 July 2023
Available since: Gideros 2016.06
Class: RenderTarget
Description
Returns single pixels color and alpha channel.
(number), (number) = RenderTarget:getPixel(x,y)
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