Difference between revisions of "X Media:getPixel"
From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight") |
|||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Returns r, g, b, a values of pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1). | Returns r, g, b, a values of pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1). | ||
− | < | + | <syntaxhighlight lang="lua"> |
(number), (number), (number), (number) = Media:getPixel(x, y) | (number), (number), (number), (number) = Media:getPixel(x, y) | ||
</source> | </source> |
Latest revision as of 14:32, 13 July 2023
Available since: Gideros 2016.1
Class: Media
Description
Returns r, g, b, a values of pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1). <syntaxhighlight lang="lua"> (number), (number), (number), (number) = Media:getPixel(x, y) </source>
Parameters
x: (number) x pixel coordinate
y: (number) y pixel coordinate
Return values
Returns (number) red value (between 0 and 255)
Returns (number) green value (between 0 and 255)
Returns (number) blue value (between 0 and 255)
Returns (number) alpha value (between 0 and 1)
- X Media:copy
- X Media:crop
- X Media:drawFill
- X Media:drawImage
- X Media:drawLine
- X Media:drawText
- X Media:flipHorizontal
- X Media:flipVertical
- X Media:floodFill
- X Media:getHeight
- X Media:getPath
- X Media:getPixel
- X Media:getRotation
- X Media:getWidth
- X Media:resize
- X Media:resizeHeight
- X Media:resizeWidth
- X Media:save
- X Media:setPixel
- X Media:setRotation
- X Media:trim