Difference between revisions of "X Media:setPixel"

From GiderosMobile
(Created page with "__NOTOC__ '''<translate>Available since</translate>:''' Gideros 2016.1<br/> '''<translate>Class</translate>:''' Media<br/> === Description === S...")
 
Line 17: Line 17:
 
'''b''': (number) blue value between 1 and 255<br/>
 
'''b''': (number) blue value between 1 and 255<br/>
 
'''a''': (number) alpha value between 0 and 1<br/>
 
'''a''': (number) alpha value between 0 and 1<br/>
 +
 +
=== Description ===
 +
Sets hexadecimal color and alpha values to pixel at x,y coordinate (alpha is in range of 0 to 1).
 +
<source lang="lua">
 +
Media:setPixel(x, y, hex, alpha, blendAlpha)
 +
</source>
 +
 +
=== Parameters ===
 +
'''x''': (number) x pixel coordinate<br/>
 +
'''y''': (number) y pixel coordinate<br/>
 +
'''hex''': (hexadecimal) hexadecimal color<br/>
 +
'''alpha''': (number) alpha value between 0 and 1<br/>
 +
'''blendAlpha''': (number) blend alpha value between 0 and 1<br/>
  
 
<!-- {{Media}} -->
 
<!-- {{Media}} -->

Revision as of 17:46, 10 February 2020


Available since: Gideros 2016.1
Class: Media

Description

Sets r, g, b, a values to pixel at x,y coordinate (RGB are in range of 0 to 255, alpha is in range of 0 to 1).

Media:setPixel(x, y, r, g, b, a)

Parameters

x: (number) x pixel coordinate
y: (number) y pixel coordinate
r: (number) red value between 1 and 255
g: (number) green value between 1 and 255
b: (number) blue value between 1 and 255
a: (number) alpha value between 0 and 1

Description

Sets hexadecimal color and alpha values to pixel at x,y coordinate (alpha is in range of 0 to 1).

Media:setPixel(x, y, hex, alpha, blendAlpha)

Parameters

x: (number) x pixel coordinate
y: (number) y pixel coordinate
hex: (hexadecimal) hexadecimal color
alpha: (number) alpha value between 0 and 1
blendAlpha: (number) blend alpha value between 0 and 1