Skip to content

Commit d41a01a

Browse files
committed
Updated docs
1 parent 61f74a2 commit d41a01a

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/gameobjects/text/static/Text.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -721,18 +721,23 @@ var Text = new Class({
721721
},
722722

723723
/**
724-
* Set the text fill color.
724+
* Set the fill style to be used by the Text object.
725+
*
726+
* This can be any valid CanvasRenderingContext2D fillStyle value, such as
727+
* a color (in hex, rgb, rgba, hsl or named values), a gradient or a pattern.
728+
*
729+
* See the [MDN fillStyle docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more details.
725730
*
726731
* @method Phaser.GameObjects.Text#setFill
727732
* @since 3.0.0
728733
*
729-
* @param {string} color - The text fill color.
734+
* @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.
730735
*
731736
* @return {Phaser.GameObjects.Text} This Text object.
732737
*/
733-
setFill: function (color)
738+
setFill: function (fillStyle)
734739
{
735-
return this.style.setFill(color);
740+
return this.style.setFill(fillStyle);
736741
},
737742

738743
/**

0 commit comments

Comments
 (0)