import * as PIXI from 'pixi.js'; import { TextureOrName } from '../textures'; import { Color } from '../utils'; import { Container } from './Container'; import { Sprite } from './Sprite'; export interface TextOptions { background?: TextureOrName; color?: Color; style?: Partial; text?: string; whiteBackground?: boolean; } export declare type TextColor = Color | Color[]; export declare class Text extends Container { background: Sprite; textObject: PIXI.Text; constructor(); constructor(options: TextOptions); constructor(text?: string, options?: Omit); /** * Get the metrics of the text. * @see http://pixijs.download/dev-fix-utils-docs/docs/PIXI.TextMetrics.html * * @returns {PIXI.TextMetrics} */ get metrics(): PIXI.TextMetrics; /** * Get the color of the text, as a Color, an array of Color, or a CanvasGradiant/CanvasPattern. * @returns - The resulting color. */ get color(): TextColor | CanvasGradient | CanvasPattern; /** * Sets the color of the text, as a Color, an array of Color, or a CanvasGradiant/CanvasPattern. * @param color - The new color to set. */ set color(color: TextColor | CanvasGradient | CanvasPattern); get backgroundColor(): Color; set backgroundColor(color: Color); get text(): string; set text(text: string); }