UNPKG

@leafer/helper

Version:
55 lines (49 loc) 3.27 kB
import { ILeaf, IPointData, ITransition, IMatrixData, IAxis, IAlign, IBoundsData, IRenderOptions, ILeafList, ILeafLevelList, IFunction } from '@leafer/interface'; declare const LeafHelper: { updateAllMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void; updateMatrix(leaf: ILeaf, checkAutoLayout?: boolean, waitAutoLayout?: boolean): void; updateBounds(leaf: ILeaf): void; updateAllWorldOpacity(leaf: ILeaf): void; updateChange(leaf: ILeaf): void; updateAllChange(leaf: ILeaf): void; worldHittable(t: ILeaf): boolean; moveWorld(t: ILeaf, x: number | IPointData, y?: number, isInnerPoint?: boolean, transition?: ITransition): void; moveLocal(t: ILeaf, x: number | IPointData, y?: number, transition?: ITransition): void; zoomOfWorld(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void; zoomOfLocal(t: ILeaf, origin: IPointData, scaleX: number, scaleY?: number | ITransition, resize?: boolean, transition?: ITransition): void; rotateOfWorld(t: ILeaf, origin: IPointData, angle: number, transition?: ITransition): void; rotateOfLocal(t: ILeaf, origin: IPointData, angle: number, transition?: ITransition): void; skewOfWorld(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void; skewOfLocal(t: ILeaf, origin: IPointData, skewX: number, skewY?: number, resize?: boolean, transition?: ITransition): void; transformWorld(t: ILeaf, transform: IMatrixData, resize?: boolean, transition?: ITransition): void; transform(t: ILeaf, transform: IMatrixData, resize?: boolean, transition?: ITransition): void; setTransform(t: ILeaf, transform: IMatrixData, resize?: boolean, transition?: ITransition): void; getFlipTransform(t: ILeaf, axis: IAxis): IMatrixData; getLocalOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData; getInnerOrigin(t: ILeaf, origin: IPointData | IAlign): IPointData; getRelativeWorld(t: ILeaf, relative: ILeaf, temp?: boolean): IMatrixData; drop(t: ILeaf, parent: ILeaf, index?: number, resize?: boolean): void; hasParent(p: ILeaf, parent: ILeaf): boolean | void; }; declare const LeafBoundsHelper: { worldBounds(target: ILeaf): IBoundsData; localBoxBounds(target: ILeaf): IBoundsData; localStrokeBounds(target: ILeaf): IBoundsData; localRenderBounds(target: ILeaf): IBoundsData; maskLocalBoxBounds(target: ILeaf): IBoundsData; maskLocalStrokeBounds(target: ILeaf): IBoundsData; maskLocalRenderBounds(target: ILeaf): IBoundsData; excludeRenderBounds(child: ILeaf, options: IRenderOptions): boolean; }; declare const BranchHelper: { sort(a: ILeaf, b: ILeaf): number; pushAllChildBranch(branch: ILeaf, leafList: ILeafList | ILeafLevelList): void; pushAllParent(leaf: ILeaf, leafList: ILeafList | ILeafLevelList): void; pushAllBranchStack(branch: ILeaf, pushList: ILeaf[]): void; updateBounds(branch: ILeaf, exclude?: ILeaf): void; updateBoundsByBranchStack(branchStack: ILeaf[], exclude?: ILeaf): void; }; declare const WaitHelper: { run(wait: IFunction[]): void; }; export { BranchHelper, LeafBoundsHelper, LeafHelper, WaitHelper };