UNPKG

@diffusionstudio/core-v4

Version:

2D motion graphics and video rendering engine

47 lines (46 loc) 995 B
import { TextStyle } from './types'; export interface TokenOptions { /** * Defines the characters to render */ chars: string; /** * Defines the X offset of the token to the left of the line */ offset: number; /** * Defines the metrics of the token */ metrics: TextMetrics; /** * Defines the style of the token */ style?: Partial<TextStyle>; } export declare class Token implements TokenOptions { offset: number; chars: string; metrics: TextMetrics; style: Partial<TextStyle>; padding: { x: number; y: number; }; line: { offsetX: number; offsetY: number; baseline: number; height: number; }; constructor(options: TokenOptions); get width(): number; get height(): number; get x(): number; get y(): number; get bounds(): { top: number; right: number; bottom: number; left: number; }; }