Fill settings used by several text related classes. Used in Text's textFill property, DropshadowSettings' fill property, and OutlineSettings' fill property.

// @input Component.Text textComponent

script.textComponent.textFill.mode = TextFillMode.Solid;

script.textComponent.textFill.color = new vec4(1, 0, 0, 1);
interface TextFill {
    color: vec4;
    mode: TextFillMode;
    texture: Texture;
    textureStretch: StretchMode;
    tileCount: number;
    tileZone: TileZone;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

color: vec4

If mode is set to TextFillMode.Solid, this will be used as the solid color used in drawing.

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).

texture: Texture

If mode is set to TextFillMode.Texture, this will be used as the texture asset used in drawing.

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.

tileCount: number

If mode is set to TextFillMode.Texture, this defines how many times the texture will tile across its drawing zone.

tileZone: TileZone

If mode is set to TextFillMode.Texture, this defines what area should be used for tiling the texture.

Methods

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean