1 | import { Container, ContainerConfig } from './Container.js';
|
---|
2 | import { Node } from './Node.js';
|
---|
3 | import { SceneCanvas, HitCanvas } from './Canvas.js';
|
---|
4 | import { Stage } from './Stage.js';
|
---|
5 | import { GetSet, Vector2d } from './types.js';
|
---|
6 | import { Group } from './Group.js';
|
---|
7 | import { Shape } from './Shape.js';
|
---|
8 | export interface LayerConfig extends ContainerConfig {
|
---|
9 | clearBeforeDraw?: boolean;
|
---|
10 | hitGraphEnabled?: boolean;
|
---|
11 | imageSmoothingEnabled?: boolean;
|
---|
12 | }
|
---|
13 | export declare class Layer extends Container<Group | Shape> {
|
---|
14 | canvas: SceneCanvas;
|
---|
15 | hitCanvas: HitCanvas;
|
---|
16 | _waitingForDraw: boolean;
|
---|
17 | constructor(config?: LayerConfig);
|
---|
18 | createPNGStream(): any;
|
---|
19 | getCanvas(): SceneCanvas;
|
---|
20 | getNativeCanvasElement(): HTMLCanvasElement;
|
---|
21 | getHitCanvas(): HitCanvas;
|
---|
22 | getContext(): import("./Context.js").Context;
|
---|
23 | clear(bounds?: any): this;
|
---|
24 | setZIndex(index: any): this;
|
---|
25 | moveToTop(): boolean;
|
---|
26 | moveUp(): boolean;
|
---|
27 | moveDown(): boolean;
|
---|
28 | moveToBottom(): boolean;
|
---|
29 | getLayer(): this;
|
---|
30 | remove(): this;
|
---|
31 | getStage(): Stage;
|
---|
32 | setSize({ width, height }: {
|
---|
33 | width: any;
|
---|
34 | height: any;
|
---|
35 | }): this;
|
---|
36 | _validateAdd(child: any): void;
|
---|
37 | _toKonvaCanvas(config: any): SceneCanvas;
|
---|
38 | _checkVisibility(): void;
|
---|
39 | _setSmoothEnabled(): void;
|
---|
40 | getWidth(): number | undefined;
|
---|
41 | setWidth(): void;
|
---|
42 | getHeight(): number | undefined;
|
---|
43 | setHeight(): void;
|
---|
44 | batchDraw(): this;
|
---|
45 | getIntersection(pos: Vector2d): Shape<import("./Shape.js").ShapeConfig> | null;
|
---|
46 | _getIntersection(pos: Vector2d): {
|
---|
47 | shape?: Shape;
|
---|
48 | antialiased?: boolean;
|
---|
49 | };
|
---|
50 | drawScene(can?: SceneCanvas, top?: Node): this;
|
---|
51 | drawHit(can?: HitCanvas, top?: Node): this;
|
---|
52 | enableHitGraph(): this;
|
---|
53 | disableHitGraph(): this;
|
---|
54 | setHitGraphEnabled(val: any): void;
|
---|
55 | getHitGraphEnabled(val: any): boolean;
|
---|
56 | toggleHitCanvas(): void;
|
---|
57 | destroy(): this;
|
---|
58 | hitGraphEnabled: GetSet<boolean, this>;
|
---|
59 | clearBeforeDraw: GetSet<boolean, this>;
|
---|
60 | imageSmoothingEnabled: GetSet<boolean, this>;
|
---|
61 | }
|
---|