Difference between revisions of "Sprite:setColorTransform"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Sets the red, green, blue and alpha channel multipliers (values between 0 and 1). This function lets you adjust the color multipliers of a display object.
 
Sets the red, green, blue and alpha channel multipliers (values between 0 and 1). This function lets you adjust the color multipliers of a display object.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier)
 
Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier)
 
</source>
 
</source>

Revision as of 14:31, 13 July 2023

Available since: Gideros 2011.6
Class: Sprite

Description

Sets the red, green, blue and alpha channel multipliers (values between 0 and 1). This function lets you adjust the color multipliers of a display object. <syntaxhighlight lang="lua"> Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier) </source>

This adjustment also applies to the children of this sprite instance.

Parameters

redMultiplier: (number, default = 1) the red multiplier of this sprite (values between 0 and 1)
greenMultiplier: (number, default = 1) the green multiplier of this sprite(values between 0 and 1)
blueMultiplier: (number, default = 1) the blue multiplier of this sprite(values between 0 and 1)
alphaMultiplier: (number, default = 1) the alpha multiplier of this sprite(values between 0 and 1)