source: imaps-frontend/node_modules/konva/lib/Util.d.ts

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 3.9 KB
Line 
1import { Context } from './Context.js';
2import { IRect, RGB, Vector2d } from './types.js';
3export declare class Transform {
4 m: Array<number>;
5 dirty: boolean;
6 constructor(m?: number[]);
7 reset(): void;
8 copy(): Transform;
9 copyInto(tr: Transform): void;
10 point(point: Vector2d): {
11 x: number;
12 y: number;
13 };
14 translate(x: number, y: number): this;
15 scale(sx: number, sy: number): this;
16 rotate(rad: number): this;
17 getTranslation(): {
18 x: number;
19 y: number;
20 };
21 skew(sx: number, sy: number): this;
22 multiply(matrix: Transform): this;
23 invert(): this;
24 getMatrix(): number[];
25 decompose(): {
26 x: number;
27 y: number;
28 rotation: number;
29 scaleX: number;
30 scaleY: number;
31 skewX: number;
32 skewY: number;
33 };
34}
35export declare const Util: {
36 _isElement(obj: any): obj is Element;
37 _isFunction(obj: any): boolean;
38 _isPlainObject(obj: any): boolean;
39 _isArray(obj: any): obj is any[];
40 _isNumber(obj: any): obj is number;
41 _isString(obj: any): obj is string;
42 _isBoolean(obj: any): obj is boolean;
43 isObject(val: any): val is Object;
44 isValidSelector(selector: any): boolean;
45 _sign(number: number): 1 | -1;
46 requestAnimFrame(callback: Function): void;
47 createCanvasElement(): HTMLCanvasElement;
48 createImageElement(): HTMLImageElement;
49 _isInDocument(el: any): boolean;
50 _urlToImage(url: string, callback: Function): void;
51 _rgbToHex(r: number, g: number, b: number): string;
52 _hexToRgb(hex: string): RGB;
53 getRandomColor(): string;
54 getRGB(color: string): RGB;
55 colorToRGBA(str: string): {
56 r: number;
57 g: number;
58 b: number;
59 a: number;
60 } | undefined;
61 _namedColorToRBA(str: string): {
62 r: number;
63 g: number;
64 b: number;
65 a: number;
66 } | null;
67 _rgbColorToRGBA(str: string): {
68 r: number;
69 g: number;
70 b: number;
71 a: number;
72 } | undefined;
73 _rgbaColorToRGBA(str: string): {
74 r: number;
75 g: number;
76 b: number;
77 a: number;
78 } | undefined;
79 _hex8ColorToRGBA(str: string): {
80 r: number;
81 g: number;
82 b: number;
83 a: number;
84 } | undefined;
85 _hex6ColorToRGBA(str: string): {
86 r: number;
87 g: number;
88 b: number;
89 a: number;
90 } | undefined;
91 _hex4ColorToRGBA(str: string): {
92 r: number;
93 g: number;
94 b: number;
95 a: number;
96 } | undefined;
97 _hex3ColorToRGBA(str: string): {
98 r: number;
99 g: number;
100 b: number;
101 a: number;
102 } | undefined;
103 _hslColorToRGBA(str: string): {
104 r: number;
105 g: number;
106 b: number;
107 a: number;
108 } | undefined;
109 haveIntersection(r1: IRect, r2: IRect): boolean;
110 cloneObject<Any>(obj: Any): Any;
111 cloneArray(arr: Array<any>): any[];
112 degToRad(deg: number): number;
113 radToDeg(rad: number): number;
114 _degToRad(deg: number): number;
115 _radToDeg(rad: number): number;
116 _getRotation(radians: number): number;
117 _capitalize(str: string): string;
118 throw(str: string): never;
119 error(str: string): void;
120 warn(str: string): void;
121 each(obj: Object, func: Function): void;
122 _inRange(val: number, left: number, right: number): boolean;
123 _getProjectionToSegment(x1: any, y1: any, x2: any, y2: any, x3: any, y3: any): any[];
124 _getProjectionToLine(pt: Vector2d, line: Array<Vector2d>, isClosed: boolean): Vector2d;
125 _prepareArrayForTween(startArray: any, endArray: any, isClosed: any): number[];
126 _prepareToStringify<T>(obj: any): T | null;
127 _assign<T_1, U>(target: T_1, source: U): T_1 & U;
128 _getFirstPointerId(evt: any): any;
129 releaseCanvas(...canvases: HTMLCanvasElement[]): void;
130 drawRoundedRectPath(context: Context, width: number, height: number, cornerRadius: number | number[]): void;
131};
Note: See TracBrowser for help on using the repository browser.