Sets a tint on a matching word within this Bitmap Text.
word parameter can be either a string or a number.
If a string, it will run a string comparison against the text contents, and if matching, it will tint the whole word.
If a number, if till that word, based on its offset within the text contents.
count parameter controls how many words are replaced. Pass in -1 to replace them all.
This parameter is ignored if you pass a number as the
word to be searched for.
This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.
The tint works by taking the pixel color values from the Bitmap Text texture, and then multiplying it by the color value of the tint. You can provide either one color value, in which case the whole character will be tinted in that color. Or you can provide a color per corner. The colors are blended together across the extent of the character range.
To swap this from being an additive tint to a fill based tint, set the
tintFill parameter to
To modify the tint color once set, call this method again with new color values.
setCharacterTint can override tints set by this function, and vice versa.
|word||string | number||
The word to search for. Either a string, or an index of the word in the words array.
The number of matching words to tint. Pass -1 to tint all matching words.
Use a fill-based tint (true), or an additive tint (false)
The tint being applied to the top-left of the word. If not other values are given this value is applied evenly, tinting the whole word.
The tint being applied to the top-right of the word.
The tint being applied to the bottom-left of the word.
The tint being applied to the bottom-right of the word.
This BitmapText Object.