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 align
- Default Value:
- "left"
See breakWords
- Default Value:
- false
See dropShadow
See fill
- Default Value:
- "black"
See fontFamily
- Default Value:
- "Arial"
See fontSize
- Default Value:
- 26
See fontStyle
- Default Value:
- "normal"
See fontVariant
- Default Value:
- "normal"
See fontWeight
- Default Value:
- "normal"
See leading
- Default Value:
- 0
See letterSpacing
- Default Value:
- 0
See lineHeight
- Default Value:
- 0
See padding
- Default Value:
- 0
See stroke
- Default Value:
- undefined
See textBaseline
- Default Value:
- "alphabetic"
See trim
- Default Value:
- false
See whiteSpace
- Default Value:
- "pre"
See wordWrap
- Default Value:
- false
See 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 |
destroy (options) inherited
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 |