Merge pull request #6653 from PresentCreativeLLC/TextColorGradient

Extended color and stroke definitions
This commit is contained in:
Richard Davey 2023-11-08 15:27:23 +00:00 committed by GitHub
commit 315e3b757f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 10 deletions

View file

@ -825,7 +825,7 @@ var Text = new Class({
* @method Phaser.GameObjects.Text#setFill
* @since 3.0.0
*
* @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.
* @param {(string|CanvasGradient|CanvasPattern)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.
*
* @return {this} This Text object.
*/
@ -840,7 +840,7 @@ var Text = new Class({
* @method Phaser.GameObjects.Text#setColor
* @since 3.0.0
*
* @param {string} color - The text fill color.
* @param {(string|CanvasGradient|CanvasPattern)} color - The text fill color.
*
* @return {this} This Text object.
*/
@ -855,7 +855,7 @@ var Text = new Class({
* @method Phaser.GameObjects.Text#setStroke
* @since 3.0.0
*
* @param {string} color - The stroke color.
* @param {(string|CanvasGradient|CanvasPattern)} color - The stroke color.
* @param {number} thickness - The stroke thickness.
*
* @return {this} This Text object.

View file

@ -113,7 +113,7 @@ var TextStyle = new Class({
* The text fill color.
*
* @name Phaser.GameObjects.TextStyle#color
* @type {string}
* @type {(string|CanvasGradient|CanvasPattern)}
* @default '#fff'
* @since 3.0.0
*/
@ -123,7 +123,7 @@ var TextStyle = new Class({
* The text stroke color.
*
* @name Phaser.GameObjects.TextStyle#stroke
* @type {string}
* @type {(string|CanvasGradient|CanvasPattern)}
* @default '#fff'
* @since 3.0.0
*/
@ -735,7 +735,7 @@ var TextStyle = new Class({
* @method Phaser.GameObjects.TextStyle#setFill
* @since 3.0.0
*
* @param {string} color - The text fill color.
* @param {(string|CanvasGradient|CanvasPattern)} color - The text fill color.
*
* @return {Phaser.GameObjects.Text} The parent Text object.
*/
@ -752,7 +752,7 @@ var TextStyle = new Class({
* @method Phaser.GameObjects.TextStyle#setColor
* @since 3.0.0
*
* @param {string} color - The text fill color.
* @param {(string|CanvasGradient|CanvasPattern)} color - The text fill color.
*
* @return {Phaser.GameObjects.Text} The parent Text object.
*/
@ -791,7 +791,7 @@ var TextStyle = new Class({
* @method Phaser.GameObjects.TextStyle#setStroke
* @since 3.0.0
*
* @param {string} color - The stroke color.
* @param {(string|CanvasGradient|CanvasPattern)} color - The stroke color.
* @param {number} thickness - The stroke thickness.
*
* @return {Phaser.GameObjects.Text} The parent Text object.

View file

@ -9,8 +9,8 @@
* @property {string} [fontStyle] - Any addition font styles, such as 'strong'.
* @property {string} [font] - The font family or font settings to set. Overrides the other font settings.
* @property {string} [backgroundColor] - A solid fill color that is rendered behind the Text object. Given as a CSS string color such as `#ff0`.
* @property {string} [color='#fff'] - The color the Text is drawn in. Given as a CSS string color such as `#fff` or `rgb()`.
* @property {string} [stroke='#fff'] - The color used to stroke the Text if the `strokeThickness` property is greater than zero.
* @property {(string|CanvasGradient|CanvasPattern)} [color='#fff'] - The color the Text is drawn in. Given as a CSS string color such as `#fff` or `rgb()`.
* @property {(string|CanvasGradient|CanvasPattern)} [stroke='#fff'] - The color used to stroke the Text if the `strokeThickness` property is greater than zero.
* @property {number} [strokeThickness=0] - The thickness of the stroke around the Text. Set to zero for no stroke.
* @property {Phaser.Types.GameObjects.Text.TextShadow} [shadow] - The Text shadow configuration object.
* @property {Phaser.Types.GameObjects.Text.TextPadding} [padding] - A Text Padding object.