import { TextCharacter } from "./TextCharacter";
import { ITextBlock } from "./richText/ITextBlock";
import { Point } from "../common";
import { TextProps } from "../graphics";
/**
 * 文字块，用于混排文字情况
 */
export declare class TextBlock implements ITextBlock {
    private static readonly richTextHelper;
    text: string;
    characters: TextCharacter[];
    fontSize: number;
    fontFamily: string;
    fontColor: string;
    fontBgColor: string;
    noFill: boolean;
    bgNoFill: boolean;
    bold: boolean;
    italic: boolean;
    underline: boolean;
    strikethrough: boolean;
    /**
     * 相对段落的位置
     */
    x: number;
    y: number;
    width: number;
    height: number;
    constructor();
    /**
     * 根据ITextBlock生成 TextBlock
     * @param block
     */
    static create(block: ITextBlock): TextBlock;
    /**
     * 根据ITextBlock生成，但是只保留样式数据
     * @param block
     * @param characters
     */
    static createByStyleAndCharacter(block: ITextBlock, characters?: TextCharacter[]): TextBlock;
    addCharacter(character: TextCharacter): void;
    draw(glCtx: CanvasRenderingContext2D, pos: Point, lineHeight: number): void;
    /**
     * 根据换行点划分换行情况，共有以下几种情况：
     * 1. 整行不换行；这种情况应该只有行尾是换行点，合并到第三种情况一起判断
     * 2. 整行行中有换行点；
     * 3. 行尾是换行点；行尾是换行点需要特殊判断，要结合后一个block的text，一起再split一次
     * 来判断情况
     */
    computeLineBreakPoint(nextTextBlock: ITextBlock | null): number[];
    toString(): string;
    toRichTextXML(textProps: TextProps): string;
    computeStyle(textProps: TextProps): string;
    getPrevText(charIndex: number): string;
    getNextText(charIndex: number): string;
    insertTextToRichTextXML(data: string, charIndex: number, textProps: TextProps): string;
}
//# sourceMappingURL=TextBlock.d.ts.map