import { TextCharacter } from "./TextCharacter";
import { IPoint } from "../idl";
import { TextProps } from "../graphics";
import { Point } from "../common";
import { TextBlock } from "./TextBlock";
export declare class TextLine {
    /**
     * 文字块，一行可能由多个文字块组成
     */
    textBlocks: TextBlock[];
    /**
     * 行定位
     */
    index: number;
    /**
     * 相对段落的位置
     */
    x: number;
    y: number;
    width: number;
    height: number;
    boxAscent: number;
    constructor();
    contains(point: IPoint): boolean;
    getCharLength(): number;
    /**
     * 探测位于第几个char位置,
     * 返回charIndex
     * @param point
     */
    detect(point: IPoint): number;
    addTextBlock(textBlock: TextBlock): void;
    getBlockIndex(charIndex: number): {
        textBlock: TextBlock;
        charIndex: number;
        blockIndex: number;
    } | null;
    /**
     * 字符位置，
     * 返回参数为相对该行的坐标
     * @param charIndex
     */
    getCharacter(charIndex: number): {
        character: TextCharacter;
        textBlock: TextBlock;
        charIndex: number;
        blockIndex: number;
    } | null;
    draw(glCtx: CanvasRenderingContext2D, pos: Point): void;
    toString(): string;
    toRichTextXML(textProps: TextProps): string;
    prevToRichTextXML(blockIndex: number, textProps: TextProps): string;
    nextToRichTextXML(blockIndex: number, textProps: TextProps): string;
}
//# sourceMappingURL=TextLine.d.ts.map