Difference between revisions of "Sprite:setColorTransform"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
+
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
+
'''Class:''' [[Sprite]]<br/>
=== <translate>Description</translate> ===
+
 
<translate><br />
+
=== 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.<br />
+
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.
This adjustment also applies to the children of this sprite instance.<br />
+
<syntaxhighlight lang="lua">
<br /></translate>
+
Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier)
<source lang="lua">
+
</syntaxhighlight>
Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier)
+
 
</source>
+
This adjustment also applies to the children of this sprite instance.
=== <translate>Parameters</translate> ===
+
 
'''redMultiplier''': (number, default = 1) <translate>The red multiplier of this sprite (values between 0 and 1)</translate> <br/>
+
=== Parameters ===
'''greenMultiplier''': (number, default = 1) <translate>The green multiplier of this sprite(values between 0 and 1)</translate> <br/>
+
'''redMultiplier''': (number, default = 1) the red multiplier of this sprite (values between 0 and 1)<br/>
'''blueMultiplier''': (number, default = 1) <translate>The blue multiplier of this sprite(values between 0 and 1)</translate> <br/>
+
'''greenMultiplier''': (number, default = 1) the green multiplier of this sprite(values between 0 and 1)<br/>
'''alphaMultiplier''': (number, default = 1) <translate>The alpha multiplier of this sprite(values between 0 and 1)</translate> <br/>
+
'''blueMultiplier''': (number, default = 1) the blue multiplier of this sprite(values between 0 and 1)<br/>
 +
'''alphaMultiplier''': (number, default = 1) the alpha multiplier of this sprite(values between 0 and 1)<br/>
 +
 
 +
{{Sprite}}

Latest revision as of 14:33, 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.

Sprite:setColorTransform(redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier)

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)