graphic-pixi/lib/plugins/CopyPlugin.d.ts
2024-01-16 17:17:47 +08:00

36 lines
1013 B
TypeScript

import { Container, FederatedPointerEvent, Point } from 'pixi.js';
import { IGraphicScene } from '../app';
import { JlGraphic } from '../core';
import { KeyListener } from './KeyboardPlugin';
interface GraphicControler {
controlerList: KeyListener[];
check: () => boolean;
moveLimitOption?: {
moveLimitName: string;
moveLimit: (e: FederatedPointerEvent) => void;
};
}
/**
* 图形复制插件
*/
export declare class GraphicCopyPlugin {
container: Container;
scene: IGraphicScene;
keyListeners: KeyListener[];
graphicControlers: GraphicControler[];
copys: JlGraphic[];
start?: Point;
running: boolean;
moveLimit?: string;
constructor(scene: IGraphicScene);
updateMoveLimit(limit?: string): void;
init(): void;
addGraphicControlers(graphicControlers: GraphicControler[]): void;
clear(): void;
onPointerMove(e: FederatedPointerEvent): void;
onFinish(): void;
saveCopyGraphic(): void;
cancle(): void;
}
export {};