TextFill
ClassFill settings used by several text related classes.
- Available on all platforms
Used in Text's textFill property,
DropshadowSettings' fill property, and
OutlineSettings' fill property.
Index
Example
// @input Component.Text textComponent
script.textComponent.textFill.mode = TextFillMode.Solid;
script.textComponent.textFill.color = new vec4(1, 0, 0, 1);
Extends
Properties
color
color:
vec4
If mode is set to TextFillMode.Solid, this will be used as the solid color used in drawing.
Default Value
(1, 1, 1, 1)
colorTint
colorTint:
vec4
If mode is set to TextFillMode.Texture, this will be used as the color tint over the texture.
Since
Lens Scripting Version 325
Default Value
(1, 1, 1, 1)
mode
mode:
TextFillMode
Controls which drawing method is used. Can switch between Texture mode (for drawing using a tiled texture) or Solid mode (for drawing a solid color).
Default Value
TextFillMode.Solid
texture
texture:
Texture
If mode is set to TextFillMode.Texture, this will be used as the texture asset used in drawing.
Default Value
null
textureStretch
textureStretch:
StretchMode
If mode is set to TextFillMode.Texture, this defines what type of stretching is used when the
Texture's aspect ratio doesn't match the drawing area's aspect ratio.
Default Value
StretchMode.FitWidth
tileCount
tileCount:
number
If mode is set to TextFillMode.Texture, this defines how many times the texture will tile across its drawing zone.
Default Value
5
tileZone
tileZone:
TileZone
If mode is set to TextFillMode.Texture, this defines what area should be used for tiling the texture.
Default Value
TileZone.Rect
Methods
getTypeName()
staticgetTypeName():TypeName<TextFill>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<TextFill>
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean