import * as spec from '@galacean/effects-specification'; import type { TextStyle } from './text-style'; import type { BaseLayout } from './base-layout'; export declare class TextLayout implements BaseLayout { textVerticalAlign: spec.TextVerticalAlign; textAlign: spec.TextAlignment; letterSpace: number; overflow: spec.TextOverflow; width: number; height: number; /** * 自适应宽高开关 */ autoWidth: boolean; maxTextWidth: number; /** * 行高 */ lineHeight: number; constructor(options: spec.TextContentOptions); update(options: spec.TextContentOptions): void; /** * 获取初始的行高偏移值 * @param style - 字体基础数据 * @param lineCount - 渲染行数 * @param lineHeight - 渲染时的字体行高 * @param fontSize - 渲染时的字体大小 * @param totalLineHeight - 可选的实际总行高,用于替代默认计算 * @returns - 行高偏移值 */ getOffsetY(style: TextStyle, lineCount: number, lineHeight: number, fontSize: number, totalLineHeight?: number): number; /** * 获取初始的水平偏移值 * @param style - 字体基础数据 * @param maxWidth - 最大行宽 * @returns - 水平偏移值 */ getOffsetX(style: TextStyle, maxWidth: number): number; /** * 设置文本框的宽度和高度 * @param width - 文本框宽度 * @param height - 文本框高度 */ setSize(width: number, height: number): void; }