/** * Copyright (c) 2019-present Houfeng * @author Houfeng */ import { IPoint, IRectInit, Rect } from "vector-helper"; import { SceneModel } from "../Scene"; import { ShapeModel } from "../Shape"; /** * 选区信息类 * 每个 Scene 都具有一个 Selection 实例 */ export declare class Selection { protected __scene: SceneModel; get scene(): SceneModel; /** * 通过 Scene 实例构建一个 Selection 实例 * @param scene Scene 实例 */ constructor(scene: SceneModel); /** * 选区的开始位置 */ start: IPoint; /** * 选区的结结束位置 */ end: IPoint; /** * 清理选区信息 * 同时返回选中区域对应的 rect 实例 */ clear(): Rect; protected __shpaes: ShapeModel[]; protected __shapesTimer: any; /** * 当前所有选中的 shapes */ get shapes(): ShapeModel[]; get multiple(): boolean; /** * 选中区域的区域信息 */ get range(): IRectInit; /** * 选中区域对应的 Rect 对象 */ get rect(): Rect; }