graphic-pixi/lib/core/GraphicRelation.d.ts

83 lines
2.2 KiB
TypeScript
Raw Normal View History

2023-12-12 17:31:07 +08:00
import { JlGraphic } from './JlGraphic';
/**
*
*/
export declare class GraphicRelationParam {
g: JlGraphic;
param: any;
constructor(g: JlGraphic, param?: any);
isTheGraphic(g: JlGraphic): boolean;
getGraphic<G extends JlGraphic>(): G;
getParam<P>(): P;
equals(other: GraphicRelationParam): boolean;
}
/**
*
*/
export declare class GraphicRelation {
rp1: GraphicRelationParam;
rp2: GraphicRelationParam;
constructor(rp1: GraphicRelationParam, rp2: GraphicRelationParam);
contains(g: JlGraphic): boolean;
/**
*
* @param g
* @returns
*/
getRelationParam(g: JlGraphic): GraphicRelationParam;
/**
*
* @param g
* @returns
*/
getOtherRelationParam(g: JlGraphic): GraphicRelationParam;
/**
*
* @param g
* @returns graphic
*/
getOtherGraphic<G extends JlGraphic>(g: JlGraphic): G;
equals(orp1: GraphicRelationParam, orp2: GraphicRelationParam): boolean;
isEqualOther(other: GraphicRelation): boolean;
}
/**
*
*/
export declare class RelationManage {
relations: GraphicRelation[];
isContainsRelation(rp1: GraphicRelationParam, rp2: GraphicRelationParam): boolean;
addRelation(rp1: GraphicRelationParam | JlGraphic, rp2: GraphicRelationParam | JlGraphic): void;
/**
*
* @param g
* @returns
*/
getRelationsOfGraphic(g: JlGraphic): GraphicRelation[];
/**
*
* @param g
* @param type
* @returns
*/
getRelationsOfGraphicAndOtherType(g: JlGraphic, type: string): GraphicRelation[];
/**
*
* @param relation
*/
private deleteRelation;
/**
*
* @param g
*/
deleteRelationOfGraphic(g: JlGraphic): void;
/**
*
* @param g
*/
deleteRelationOfGraphicAndOtherType(g: JlGraphic, type: string): void;
/**
*
*/
clear(): void;
}