Extends
Methods
Add a style override, this can be any CSS property
it will override any built-in style. This is the
property and the value as a string (e.g., color: red
).
This will override any other internal style.
Name | Type | Description |
---|---|---|
value |
string |
CSS style(s) to add. |
Example
style.addOverride('background-color: red');
Remove any overrides that match the value.
Name | Type | Description |
---|---|---|
value |
string |
CSS style to remove. |
Example
style.removeOverride('background-color: red');
Inherited Properties
From class TextStyle
_fill ConvertedFillStyle inherited
_stroke ConvertedStrokeStyle inherited
See TextStyle.align
- Default Value:
- "left"
See TextStyle.breakWords
- Default Value:
- false
See TextStyle.dropShadow
- Default Value:
- undefined
See TextStyle.fill
- Default Value:
- "black"
See TextStyle.fontFamily
- Default Value:
- "Arial"
See TextStyle.fontSize
- Default Value:
- 26
See TextStyle.fontStyle
- Default Value:
- "normal"
See TextStyle.fontVariant
- Default Value:
- "normal"
See TextStyle.fontWeight
- Default Value:
- "normal"
See TextStyle.leading
- Default Value:
- 0
See TextStyle.letterSpacing
- Default Value:
- 0
See TextStyle.lineHeight
- Default Value:
- 0
See TextStyle.padding
- Default Value:
- 0
See TextStyle.stroke
- Default Value:
- undefined
See TextStyle.textBaseline
- Default Value:
- "alphabetic"
See TextStyle.trim
- Default Value:
- false
See TextStyle.whiteSpace
- Default Value:
- "pre"
See TextStyle.wordWrap
- Default Value:
- false
See TextStyle.wordWrapWidth
- Default Value:
- 100
Inherited Methods
From class TextStyle
Creates a new TextStyle object with the same values as this one.
Returns:
Type | Description |
---|---|
TextStyle | New cloned TextStyle object |
Destroys this text style.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
options |
TypeOrBool<TextureDestroyOptions> | false |
Options parameter. A boolean will act as if all options have been set to that value |
|
options.texture |
boolean |
<optional> |
false |
Should it destroy the texture of the this style |
options.textureSource |
boolean |
<optional> |
false |
Should it destroy the textureSource of the this style |