import { IPoint, NodeInfo, NodeType } from "../../idl";
import { PropType } from "../props/PropType";
import { AbsProps } from "../props/AbsProps";
import { AffineMatrix } from "../../math";
import { BaseProps } from "../props/BaseProps";
import { IRect, IRectNode, Point, RectNode } from "../../common";
import { TextCursorPosition } from "../../renderText";
import { IRectPoint } from "@/idl/common/IRectPoint";
/**
 * 图形绘制节点基本数据类型
 */
export declare abstract class GraphicNode {
    /**
     * 图形节点类型
     */
    type: NodeType;
    /**
     * 节点id
     */
    id: string;
    /**
     * 父级节点
     */
    parent: GraphicNode | null;
    /**
     * 孩子
     */
    children: Set<GraphicNode>;
    /**
     * 节点z-index,表示层级
     */
    zIndex: number;
    /**
     * 图形绘制
     */
    graphicContext: CanvasRenderingContext2D;
    /**
     * 图形属性
     */
    props: Map<PropType, AbsProps>;
    transform: AffineMatrix;
    get baseProps(): BaseProps;
    get globalBaseProps(): BaseProps;
    get pos(): IPoint;
    get globalPos(): IPoint;
    constructor(id: string, graphicContext: CanvasRenderingContext2D);
    setParent(parent: GraphicNode): void;
    updateProps(props: Partial<AbsProps>[]): void;
    getProp<Prop extends AbsProps>(type: PropType): Prop | null;
    updateTransformMatrix(): void;
    contains(point: Point, scale?: number): boolean;
    canQuickCreate(): boolean;
    canBeConnected(): boolean;
    loseFocus(): void;
    getConnectAnchor(): IPoint[];
    borderContains(globalPoint: IPoint, buffer: number): IPoint | null;
    /**
     * 节点绘制方法，默认空实现
     */
    draw(): void;
    /**
     * 节点绘制方法，默认空实现，绘制在_ctx上
     */
    abstract drawOnGLCtx(ctx: CanvasRenderingContext2D): void;
    globalTransform(): AffineMatrix;
    /**
     * 返回节点外接矩形
     */
    getRectNode(): RectNode;
    getBounds(): RectNode;
    /**
     * 返回四个点，带旋转角度的
     */
    toRectPoint(): IRectPoint;
    getStretchMinSize(): IPoint;
    overlapRect(rect: IRectNode): boolean;
    /**
     * 返回文字区域相对节点的矩形位置
     */
    abstract getTextContentRect(): IRect;
    /**
     * 返回需要裁切选区高亮的矩形区域（本地坐标）。
     * 仅对存在文字内容区域限制的节点返回非 null 值（如带形状的节点），
     * 纯文本节点及线条返回 null。
     * TextSelection 每帧实时调用，避免快照过期问题。
     */
    textClipRect(): IRect | null;
    isEmptyText(): boolean;
    toLocal(globalPoint: IPoint): IPoint;
    toGlobal(localPoint: IPoint): IPoint;
    modifyPosInEditing(cursor: TextCursorPosition): boolean;
    resetFromEditing(): void;
    serializeTo(): NodeInfo;
}
//# sourceMappingURL=GraphicNode.d.ts.map