41 lines
1.1 KiB
TypeScript
41 lines
1.1 KiB
TypeScript
export interface Shape {
|
|
id: number | string;
|
|
selectAble: boolean;
|
|
color: string;
|
|
}
|
|
export interface Rect extends Shape {
|
|
x: number;
|
|
y: number;
|
|
w: number;
|
|
h: number;
|
|
}
|
|
export interface Point extends Shape {
|
|
x: number;
|
|
y: number;
|
|
}
|
|
declare const _default: {
|
|
shapeList: never[];
|
|
hoverShapId: null;
|
|
selectShapId: null;
|
|
isEyeOpen: boolean;
|
|
movable: boolean;
|
|
zoomable: boolean;
|
|
disableAdd: boolean;
|
|
color: string;
|
|
changeEyeModel(isOpen: any): void;
|
|
addShape(shap: Shape | Array<Shape>, type?: number): void;
|
|
setSelectShapId(id: number): void;
|
|
getSelectShape(contain?: boolean): any[];
|
|
replaceShape(shape: Shape | Shape[] | ((shape: Shape) => Shape | Array<Shape>), type?: number): void;
|
|
clearShape(): void;
|
|
calcSelectShape(canvasPoint: any): null;
|
|
clearSelectShape(): void;
|
|
changeMoveAble(movable?: boolean): void;
|
|
changeZoonAble(zoomable?: boolean): void;
|
|
disabledAddShap(value?: boolean): void;
|
|
renderShape(ctx: any): void;
|
|
renderRect(ctx: any, shape: any, type: any): void;
|
|
renderPoint(ctx: any, shape: any): void;
|
|
};
|
|
export default _default;
|