rt-graphic-component/components/Signal/bjRtss/SignalDrawAssistant.d.ts
2024-01-02 14:36:14 +08:00

30 lines
1.2 KiB
TypeScript

import { FederatedPointerEvent, IHitArea, Point } from 'pixi.js';
import { GraphicDrawAssistant, GraphicInteractionPlugin, GraphicTransformEvent, IDrawApp, JlGraphic } from 'jl-graphic';
import { ISignalData, Signal, SignalTemplate } from './Signal';
export interface ISignalDrawOptions {
newData: () => ISignalData;
}
export declare class SignalDraw extends GraphicDrawAssistant<SignalTemplate, ISignalData> {
_signal: Signal | null;
constructor(app: IDrawApp, template: SignalTemplate);
get signal(): Signal;
onLeftUp(e: FederatedPointerEvent): void;
redraw(p: Point): void;
prepareData(data: ISignalData): boolean;
}
export declare class SignalGraphicHitArea implements IHitArea {
signal: Signal;
constructor(signal: Signal);
contains(x: number, y: number): boolean;
}
export declare class SignalInteraction extends GraphicInteractionPlugin<Signal> {
static Name: string;
constructor(app: IDrawApp);
static init(app: IDrawApp): SignalInteraction;
filter(...grahpics: JlGraphic[]): Signal[] | undefined;
bind(g: Signal): void;
unbind(g: Signal): void;
transformstart(e: GraphicTransformEvent): void;
codetransformstart(e: GraphicTransformEvent): void;
}