@yorab/react-paint 0.15.1 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/canvas/constants/shapes.d.ts +2 -0
- package/dist/canvas/hooks/useReactPaint.d.ts +136 -72
- package/dist/canvas/hooks/useShapes.d.ts +102 -54
- package/dist/canvas/utils/file.d.ts +17 -9
- package/dist/canvas/utils/intersect.d.ts +1 -1
- package/dist/canvas/utils/selection/groupSelection.d.ts +3 -2
- package/dist/canvas/utils/selection/rectSelection.d.ts +3 -1
- package/dist/canvas/utils/shapes/brush.d.ts +6 -2
- package/dist/canvas/utils/shapes/circle.d.ts +5 -2
- package/dist/canvas/utils/shapes/curve.d.ts +0 -1
- package/dist/canvas/utils/shapes/ellipse.d.ts +5 -2
- package/dist/canvas/utils/shapes/group.d.ts +33 -0
- package/dist/canvas/utils/shapes/index.d.ts +6 -12
- package/dist/canvas/utils/shapes/line.d.ts +5 -2
- package/dist/canvas/utils/shapes/path.d.ts +2 -2
- package/dist/canvas/utils/shapes/picture.d.ts +5 -2
- package/dist/canvas/utils/shapes/polygon.d.ts +0 -1
- package/dist/canvas/utils/shapes/rectangle.d.ts +7 -44
- package/dist/canvas/utils/shapes/text.d.ts +5 -2
- package/dist/common/types/Shapes.d.ts +7 -9
- package/dist/common/utils/object.d.ts +1 -1
- package/dist/react-paint.js +1302 -1305
- package/dist/react-paint.umd.cjs +1 -1
- package/package.json +13 -13
|
@@ -11,6 +11,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
11
11
|
center: Point;
|
|
12
12
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
13
13
|
};
|
|
14
|
+
path?: Path2D | undefined;
|
|
14
15
|
} & {
|
|
15
16
|
rotation?: number;
|
|
16
17
|
toolId?: string;
|
|
@@ -21,7 +22,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
21
22
|
type: "line";
|
|
22
23
|
} & {
|
|
23
24
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
24
|
-
path?: Path2D | undefined;
|
|
25
25
|
arrows?: import("./../../common/types/Shapes").TriangleEntity[];
|
|
26
26
|
type: "line";
|
|
27
27
|
}) | ({
|
|
@@ -32,6 +32,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
32
32
|
center: Point;
|
|
33
33
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
34
34
|
};
|
|
35
|
+
path?: Path2D | undefined;
|
|
35
36
|
} & {
|
|
36
37
|
rotation?: number;
|
|
37
38
|
toolId?: string;
|
|
@@ -42,6 +43,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
42
43
|
src: string;
|
|
43
44
|
} & {
|
|
44
45
|
img: HTMLImageElement;
|
|
46
|
+
flipX?: boolean;
|
|
47
|
+
flipY?: boolean;
|
|
48
|
+
ratio?: number;
|
|
45
49
|
type: "picture";
|
|
46
50
|
} & {
|
|
47
51
|
img: HTMLImageElement;
|
|
@@ -55,6 +59,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
55
59
|
center: Point;
|
|
56
60
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
57
61
|
};
|
|
62
|
+
path?: Path2D | undefined;
|
|
58
63
|
} & {
|
|
59
64
|
rotation?: number;
|
|
60
65
|
toolId?: string;
|
|
@@ -65,6 +70,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
65
70
|
value: string[];
|
|
66
71
|
fontSize: number;
|
|
67
72
|
} & {
|
|
73
|
+
flipX?: boolean;
|
|
74
|
+
flipY?: boolean;
|
|
75
|
+
ratio?: number;
|
|
68
76
|
type: "text";
|
|
69
77
|
} & {
|
|
70
78
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
@@ -77,6 +85,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
77
85
|
center: Point;
|
|
78
86
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
79
87
|
};
|
|
88
|
+
path?: Path2D | undefined;
|
|
80
89
|
} & {
|
|
81
90
|
rotation?: number;
|
|
82
91
|
toolId?: string;
|
|
@@ -87,7 +96,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
87
96
|
type: "rect";
|
|
88
97
|
} & {
|
|
89
98
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
90
|
-
path?: Path2D | undefined;
|
|
91
99
|
type: "rect";
|
|
92
100
|
}) | ({
|
|
93
101
|
id: string;
|
|
@@ -97,6 +105,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
97
105
|
center: Point;
|
|
98
106
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
99
107
|
};
|
|
108
|
+
path?: Path2D | undefined;
|
|
100
109
|
} & {
|
|
101
110
|
rotation?: number;
|
|
102
111
|
toolId?: string;
|
|
@@ -107,7 +116,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
107
116
|
type: "square";
|
|
108
117
|
} & {
|
|
109
118
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
110
|
-
path?: Path2D | undefined;
|
|
111
119
|
type: "square";
|
|
112
120
|
}) | ({
|
|
113
121
|
id: string;
|
|
@@ -117,6 +125,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
117
125
|
center: Point;
|
|
118
126
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
119
127
|
};
|
|
128
|
+
path?: Path2D | undefined;
|
|
120
129
|
} & {
|
|
121
130
|
rotation?: number;
|
|
122
131
|
toolId?: string;
|
|
@@ -127,7 +136,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
127
136
|
type: "circle";
|
|
128
137
|
} & {
|
|
129
138
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
130
|
-
path?: Path2D | undefined;
|
|
131
139
|
type: "circle";
|
|
132
140
|
}) | ({
|
|
133
141
|
id: string;
|
|
@@ -137,6 +145,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
137
145
|
center: Point;
|
|
138
146
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
139
147
|
};
|
|
148
|
+
path?: Path2D | undefined;
|
|
140
149
|
} & {
|
|
141
150
|
rotation?: number;
|
|
142
151
|
toolId?: string;
|
|
@@ -147,7 +156,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
147
156
|
type: "ellipse";
|
|
148
157
|
} & {
|
|
149
158
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
150
|
-
path?: Path2D | undefined;
|
|
151
159
|
type: "ellipse";
|
|
152
160
|
}) | ({
|
|
153
161
|
id: string;
|
|
@@ -157,6 +165,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
157
165
|
center: Point;
|
|
158
166
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
159
167
|
};
|
|
168
|
+
path?: Path2D | undefined;
|
|
160
169
|
} & {
|
|
161
170
|
rotation?: number;
|
|
162
171
|
toolId?: string;
|
|
@@ -167,7 +176,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
167
176
|
type: "polygon";
|
|
168
177
|
} & {
|
|
169
178
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
170
|
-
path?: Path2D | undefined;
|
|
171
179
|
type: "polygon";
|
|
172
180
|
}) | ({
|
|
173
181
|
id: string;
|
|
@@ -177,6 +185,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
177
185
|
center: Point;
|
|
178
186
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
179
187
|
};
|
|
188
|
+
path?: Path2D | undefined;
|
|
180
189
|
} & {
|
|
181
190
|
rotation?: number;
|
|
182
191
|
toolId?: string;
|
|
@@ -187,7 +196,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
187
196
|
type: "curve";
|
|
188
197
|
} & {
|
|
189
198
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
190
|
-
path?: Path2D | undefined;
|
|
191
199
|
type: "curve";
|
|
192
200
|
}) | ({
|
|
193
201
|
id: string;
|
|
@@ -197,6 +205,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
197
205
|
center: Point;
|
|
198
206
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
199
207
|
};
|
|
208
|
+
path?: Path2D | undefined;
|
|
200
209
|
} & {
|
|
201
210
|
rotation?: number;
|
|
202
211
|
toolId?: string;
|
|
@@ -209,7 +218,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
209
218
|
scaleY?: number;
|
|
210
219
|
} & {
|
|
211
220
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
212
|
-
path?: Path2D | undefined;
|
|
213
221
|
type: "brush";
|
|
214
222
|
}) | ({
|
|
215
223
|
id: string;
|
|
@@ -219,6 +227,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
219
227
|
center: Point;
|
|
220
228
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
221
229
|
};
|
|
230
|
+
path?: Path2D | undefined;
|
|
222
231
|
} & {
|
|
223
232
|
rotation?: number;
|
|
224
233
|
toolId?: string;
|
|
@@ -230,7 +239,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
230
239
|
type: "group";
|
|
231
240
|
} & {
|
|
232
241
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
233
|
-
path?: Path2D | undefined;
|
|
234
242
|
type: "group";
|
|
235
243
|
}))[]>;
|
|
236
244
|
selectedShape: ({
|
|
@@ -241,6 +249,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
241
249
|
center: Point;
|
|
242
250
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
243
251
|
};
|
|
252
|
+
path?: Path2D | undefined;
|
|
244
253
|
} & {
|
|
245
254
|
rotation?: number;
|
|
246
255
|
toolId?: string;
|
|
@@ -251,7 +260,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
251
260
|
type: "line";
|
|
252
261
|
} & {
|
|
253
262
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
254
|
-
path?: Path2D | undefined;
|
|
255
263
|
arrows?: import("./../../common/types/Shapes").TriangleEntity[];
|
|
256
264
|
type: "line";
|
|
257
265
|
}) | ({
|
|
@@ -262,6 +270,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
262
270
|
center: Point;
|
|
263
271
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
264
272
|
};
|
|
273
|
+
path?: Path2D | undefined;
|
|
265
274
|
} & {
|
|
266
275
|
rotation?: number;
|
|
267
276
|
toolId?: string;
|
|
@@ -272,6 +281,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
272
281
|
src: string;
|
|
273
282
|
} & {
|
|
274
283
|
img: HTMLImageElement;
|
|
284
|
+
flipX?: boolean;
|
|
285
|
+
flipY?: boolean;
|
|
286
|
+
ratio?: number;
|
|
275
287
|
type: "picture";
|
|
276
288
|
} & {
|
|
277
289
|
img: HTMLImageElement;
|
|
@@ -285,6 +297,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
285
297
|
center: Point;
|
|
286
298
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
287
299
|
};
|
|
300
|
+
path?: Path2D | undefined;
|
|
288
301
|
} & {
|
|
289
302
|
rotation?: number;
|
|
290
303
|
toolId?: string;
|
|
@@ -295,6 +308,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
295
308
|
value: string[];
|
|
296
309
|
fontSize: number;
|
|
297
310
|
} & {
|
|
311
|
+
flipX?: boolean;
|
|
312
|
+
flipY?: boolean;
|
|
313
|
+
ratio?: number;
|
|
298
314
|
type: "text";
|
|
299
315
|
} & {
|
|
300
316
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
@@ -307,6 +323,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
307
323
|
center: Point;
|
|
308
324
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
309
325
|
};
|
|
326
|
+
path?: Path2D | undefined;
|
|
310
327
|
} & {
|
|
311
328
|
rotation?: number;
|
|
312
329
|
toolId?: string;
|
|
@@ -317,7 +334,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
317
334
|
type: "rect";
|
|
318
335
|
} & {
|
|
319
336
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
320
|
-
path?: Path2D | undefined;
|
|
321
337
|
type: "rect";
|
|
322
338
|
}) | ({
|
|
323
339
|
id: string;
|
|
@@ -327,6 +343,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
327
343
|
center: Point;
|
|
328
344
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
329
345
|
};
|
|
346
|
+
path?: Path2D | undefined;
|
|
330
347
|
} & {
|
|
331
348
|
rotation?: number;
|
|
332
349
|
toolId?: string;
|
|
@@ -337,7 +354,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
337
354
|
type: "square";
|
|
338
355
|
} & {
|
|
339
356
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
340
|
-
path?: Path2D | undefined;
|
|
341
357
|
type: "square";
|
|
342
358
|
}) | ({
|
|
343
359
|
id: string;
|
|
@@ -347,6 +363,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
347
363
|
center: Point;
|
|
348
364
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
349
365
|
};
|
|
366
|
+
path?: Path2D | undefined;
|
|
350
367
|
} & {
|
|
351
368
|
rotation?: number;
|
|
352
369
|
toolId?: string;
|
|
@@ -357,7 +374,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
357
374
|
type: "circle";
|
|
358
375
|
} & {
|
|
359
376
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
360
|
-
path?: Path2D | undefined;
|
|
361
377
|
type: "circle";
|
|
362
378
|
}) | ({
|
|
363
379
|
id: string;
|
|
@@ -367,6 +383,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
367
383
|
center: Point;
|
|
368
384
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
369
385
|
};
|
|
386
|
+
path?: Path2D | undefined;
|
|
370
387
|
} & {
|
|
371
388
|
rotation?: number;
|
|
372
389
|
toolId?: string;
|
|
@@ -377,7 +394,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
377
394
|
type: "ellipse";
|
|
378
395
|
} & {
|
|
379
396
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
380
|
-
path?: Path2D | undefined;
|
|
381
397
|
type: "ellipse";
|
|
382
398
|
}) | ({
|
|
383
399
|
id: string;
|
|
@@ -387,6 +403,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
387
403
|
center: Point;
|
|
388
404
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
389
405
|
};
|
|
406
|
+
path?: Path2D | undefined;
|
|
390
407
|
} & {
|
|
391
408
|
rotation?: number;
|
|
392
409
|
toolId?: string;
|
|
@@ -397,7 +414,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
397
414
|
type: "polygon";
|
|
398
415
|
} & {
|
|
399
416
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
400
|
-
path?: Path2D | undefined;
|
|
401
417
|
type: "polygon";
|
|
402
418
|
}) | ({
|
|
403
419
|
id: string;
|
|
@@ -407,6 +423,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
407
423
|
center: Point;
|
|
408
424
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
409
425
|
};
|
|
426
|
+
path?: Path2D | undefined;
|
|
410
427
|
} & {
|
|
411
428
|
rotation?: number;
|
|
412
429
|
toolId?: string;
|
|
@@ -417,7 +434,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
417
434
|
type: "curve";
|
|
418
435
|
} & {
|
|
419
436
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
420
|
-
path?: Path2D | undefined;
|
|
421
437
|
type: "curve";
|
|
422
438
|
}) | ({
|
|
423
439
|
id: string;
|
|
@@ -427,6 +443,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
427
443
|
center: Point;
|
|
428
444
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
429
445
|
};
|
|
446
|
+
path?: Path2D | undefined;
|
|
430
447
|
} & {
|
|
431
448
|
rotation?: number;
|
|
432
449
|
toolId?: string;
|
|
@@ -439,7 +456,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
439
456
|
scaleY?: number;
|
|
440
457
|
} & {
|
|
441
458
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
442
|
-
path?: Path2D | undefined;
|
|
443
459
|
type: "brush";
|
|
444
460
|
}) | ({
|
|
445
461
|
id: string;
|
|
@@ -449,6 +465,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
449
465
|
center: Point;
|
|
450
466
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
451
467
|
};
|
|
468
|
+
path?: Path2D | undefined;
|
|
452
469
|
} & {
|
|
453
470
|
rotation?: number;
|
|
454
471
|
toolId?: string;
|
|
@@ -460,7 +477,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
460
477
|
type: "group";
|
|
461
478
|
} & {
|
|
462
479
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
463
|
-
path?: Path2D | undefined;
|
|
464
480
|
type: "group";
|
|
465
481
|
}) | undefined;
|
|
466
482
|
hoveredShape: ({
|
|
@@ -471,6 +487,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
471
487
|
center: Point;
|
|
472
488
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
473
489
|
};
|
|
490
|
+
path?: Path2D | undefined;
|
|
474
491
|
} & {
|
|
475
492
|
rotation?: number;
|
|
476
493
|
toolId?: string;
|
|
@@ -481,7 +498,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
481
498
|
type: "line";
|
|
482
499
|
} & {
|
|
483
500
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
484
|
-
path?: Path2D | undefined;
|
|
485
501
|
arrows?: import("./../../common/types/Shapes").TriangleEntity[];
|
|
486
502
|
type: "line";
|
|
487
503
|
}) | ({
|
|
@@ -492,6 +508,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
492
508
|
center: Point;
|
|
493
509
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
494
510
|
};
|
|
511
|
+
path?: Path2D | undefined;
|
|
495
512
|
} & {
|
|
496
513
|
rotation?: number;
|
|
497
514
|
toolId?: string;
|
|
@@ -502,6 +519,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
502
519
|
src: string;
|
|
503
520
|
} & {
|
|
504
521
|
img: HTMLImageElement;
|
|
522
|
+
flipX?: boolean;
|
|
523
|
+
flipY?: boolean;
|
|
524
|
+
ratio?: number;
|
|
505
525
|
type: "picture";
|
|
506
526
|
} & {
|
|
507
527
|
img: HTMLImageElement;
|
|
@@ -515,6 +535,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
515
535
|
center: Point;
|
|
516
536
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
517
537
|
};
|
|
538
|
+
path?: Path2D | undefined;
|
|
518
539
|
} & {
|
|
519
540
|
rotation?: number;
|
|
520
541
|
toolId?: string;
|
|
@@ -525,6 +546,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
525
546
|
value: string[];
|
|
526
547
|
fontSize: number;
|
|
527
548
|
} & {
|
|
549
|
+
flipX?: boolean;
|
|
550
|
+
flipY?: boolean;
|
|
551
|
+
ratio?: number;
|
|
528
552
|
type: "text";
|
|
529
553
|
} & {
|
|
530
554
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
@@ -537,6 +561,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
537
561
|
center: Point;
|
|
538
562
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
539
563
|
};
|
|
564
|
+
path?: Path2D | undefined;
|
|
540
565
|
} & {
|
|
541
566
|
rotation?: number;
|
|
542
567
|
toolId?: string;
|
|
@@ -547,7 +572,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
547
572
|
type: "rect";
|
|
548
573
|
} & {
|
|
549
574
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
550
|
-
path?: Path2D | undefined;
|
|
551
575
|
type: "rect";
|
|
552
576
|
}) | ({
|
|
553
577
|
id: string;
|
|
@@ -557,6 +581,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
557
581
|
center: Point;
|
|
558
582
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
559
583
|
};
|
|
584
|
+
path?: Path2D | undefined;
|
|
560
585
|
} & {
|
|
561
586
|
rotation?: number;
|
|
562
587
|
toolId?: string;
|
|
@@ -567,7 +592,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
567
592
|
type: "square";
|
|
568
593
|
} & {
|
|
569
594
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
570
|
-
path?: Path2D | undefined;
|
|
571
595
|
type: "square";
|
|
572
596
|
}) | ({
|
|
573
597
|
id: string;
|
|
@@ -577,6 +601,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
577
601
|
center: Point;
|
|
578
602
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
579
603
|
};
|
|
604
|
+
path?: Path2D | undefined;
|
|
580
605
|
} & {
|
|
581
606
|
rotation?: number;
|
|
582
607
|
toolId?: string;
|
|
@@ -587,7 +612,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
587
612
|
type: "circle";
|
|
588
613
|
} & {
|
|
589
614
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
590
|
-
path?: Path2D | undefined;
|
|
591
615
|
type: "circle";
|
|
592
616
|
}) | ({
|
|
593
617
|
id: string;
|
|
@@ -597,6 +621,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
597
621
|
center: Point;
|
|
598
622
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
599
623
|
};
|
|
624
|
+
path?: Path2D | undefined;
|
|
600
625
|
} & {
|
|
601
626
|
rotation?: number;
|
|
602
627
|
toolId?: string;
|
|
@@ -607,7 +632,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
607
632
|
type: "ellipse";
|
|
608
633
|
} & {
|
|
609
634
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
610
|
-
path?: Path2D | undefined;
|
|
611
635
|
type: "ellipse";
|
|
612
636
|
}) | ({
|
|
613
637
|
id: string;
|
|
@@ -617,6 +641,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
617
641
|
center: Point;
|
|
618
642
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
619
643
|
};
|
|
644
|
+
path?: Path2D | undefined;
|
|
620
645
|
} & {
|
|
621
646
|
rotation?: number;
|
|
622
647
|
toolId?: string;
|
|
@@ -627,7 +652,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
627
652
|
type: "polygon";
|
|
628
653
|
} & {
|
|
629
654
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
630
|
-
path?: Path2D | undefined;
|
|
631
655
|
type: "polygon";
|
|
632
656
|
}) | ({
|
|
633
657
|
id: string;
|
|
@@ -637,6 +661,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
637
661
|
center: Point;
|
|
638
662
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
639
663
|
};
|
|
664
|
+
path?: Path2D | undefined;
|
|
640
665
|
} & {
|
|
641
666
|
rotation?: number;
|
|
642
667
|
toolId?: string;
|
|
@@ -647,7 +672,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
647
672
|
type: "curve";
|
|
648
673
|
} & {
|
|
649
674
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
650
|
-
path?: Path2D | undefined;
|
|
651
675
|
type: "curve";
|
|
652
676
|
}) | ({
|
|
653
677
|
id: string;
|
|
@@ -657,6 +681,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
657
681
|
center: Point;
|
|
658
682
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
659
683
|
};
|
|
684
|
+
path?: Path2D | undefined;
|
|
660
685
|
} & {
|
|
661
686
|
rotation?: number;
|
|
662
687
|
toolId?: string;
|
|
@@ -669,7 +694,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
669
694
|
scaleY?: number;
|
|
670
695
|
} & {
|
|
671
696
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
672
|
-
path?: Path2D | undefined;
|
|
673
697
|
type: "brush";
|
|
674
698
|
}) | ({
|
|
675
699
|
id: string;
|
|
@@ -679,6 +703,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
679
703
|
center: Point;
|
|
680
704
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
681
705
|
};
|
|
706
|
+
path?: Path2D | undefined;
|
|
682
707
|
} & {
|
|
683
708
|
rotation?: number;
|
|
684
709
|
toolId?: string;
|
|
@@ -690,7 +715,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
690
715
|
type: "group";
|
|
691
716
|
} & {
|
|
692
717
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
693
|
-
path?: Path2D | undefined;
|
|
694
718
|
type: "group";
|
|
695
719
|
}) | undefined;
|
|
696
720
|
selectionFrame: {
|
|
@@ -715,6 +739,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
715
739
|
center: Point;
|
|
716
740
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
717
741
|
};
|
|
742
|
+
path?: Path2D | undefined;
|
|
718
743
|
} & {
|
|
719
744
|
rotation?: number;
|
|
720
745
|
toolId?: string;
|
|
@@ -725,7 +750,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
725
750
|
type: "line";
|
|
726
751
|
} & {
|
|
727
752
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
728
|
-
path?: Path2D | undefined;
|
|
729
753
|
arrows?: import("./../../common/types/Shapes").TriangleEntity[];
|
|
730
754
|
type: "line";
|
|
731
755
|
}) | ({
|
|
@@ -736,6 +760,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
736
760
|
center: Point;
|
|
737
761
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
738
762
|
};
|
|
763
|
+
path?: Path2D | undefined;
|
|
739
764
|
} & {
|
|
740
765
|
rotation?: number;
|
|
741
766
|
toolId?: string;
|
|
@@ -746,6 +771,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
746
771
|
src: string;
|
|
747
772
|
} & {
|
|
748
773
|
img: HTMLImageElement;
|
|
774
|
+
flipX?: boolean;
|
|
775
|
+
flipY?: boolean;
|
|
776
|
+
ratio?: number;
|
|
749
777
|
type: "picture";
|
|
750
778
|
} & {
|
|
751
779
|
img: HTMLImageElement;
|
|
@@ -759,6 +787,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
759
787
|
center: Point;
|
|
760
788
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
761
789
|
};
|
|
790
|
+
path?: Path2D | undefined;
|
|
762
791
|
} & {
|
|
763
792
|
rotation?: number;
|
|
764
793
|
toolId?: string;
|
|
@@ -769,6 +798,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
769
798
|
value: string[];
|
|
770
799
|
fontSize: number;
|
|
771
800
|
} & {
|
|
801
|
+
flipX?: boolean;
|
|
802
|
+
flipY?: boolean;
|
|
803
|
+
ratio?: number;
|
|
772
804
|
type: "text";
|
|
773
805
|
} & {
|
|
774
806
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
@@ -781,6 +813,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
781
813
|
center: Point;
|
|
782
814
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
783
815
|
};
|
|
816
|
+
path?: Path2D | undefined;
|
|
784
817
|
} & {
|
|
785
818
|
rotation?: number;
|
|
786
819
|
toolId?: string;
|
|
@@ -791,7 +824,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
791
824
|
type: "rect";
|
|
792
825
|
} & {
|
|
793
826
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
794
|
-
path?: Path2D | undefined;
|
|
795
827
|
type: "rect";
|
|
796
828
|
}) | ({
|
|
797
829
|
id: string;
|
|
@@ -801,6 +833,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
801
833
|
center: Point;
|
|
802
834
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
803
835
|
};
|
|
836
|
+
path?: Path2D | undefined;
|
|
804
837
|
} & {
|
|
805
838
|
rotation?: number;
|
|
806
839
|
toolId?: string;
|
|
@@ -811,7 +844,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
811
844
|
type: "square";
|
|
812
845
|
} & {
|
|
813
846
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
814
|
-
path?: Path2D | undefined;
|
|
815
847
|
type: "square";
|
|
816
848
|
}) | ({
|
|
817
849
|
id: string;
|
|
@@ -821,6 +853,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
821
853
|
center: Point;
|
|
822
854
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
823
855
|
};
|
|
856
|
+
path?: Path2D | undefined;
|
|
824
857
|
} & {
|
|
825
858
|
rotation?: number;
|
|
826
859
|
toolId?: string;
|
|
@@ -831,7 +864,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
831
864
|
type: "circle";
|
|
832
865
|
} & {
|
|
833
866
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
834
|
-
path?: Path2D | undefined;
|
|
835
867
|
type: "circle";
|
|
836
868
|
}) | ({
|
|
837
869
|
id: string;
|
|
@@ -841,6 +873,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
841
873
|
center: Point;
|
|
842
874
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
843
875
|
};
|
|
876
|
+
path?: Path2D | undefined;
|
|
844
877
|
} & {
|
|
845
878
|
rotation?: number;
|
|
846
879
|
toolId?: string;
|
|
@@ -851,7 +884,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
851
884
|
type: "ellipse";
|
|
852
885
|
} & {
|
|
853
886
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
854
|
-
path?: Path2D | undefined;
|
|
855
887
|
type: "ellipse";
|
|
856
888
|
}) | ({
|
|
857
889
|
id: string;
|
|
@@ -861,6 +893,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
861
893
|
center: Point;
|
|
862
894
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
863
895
|
};
|
|
896
|
+
path?: Path2D | undefined;
|
|
864
897
|
} & {
|
|
865
898
|
rotation?: number;
|
|
866
899
|
toolId?: string;
|
|
@@ -871,7 +904,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
871
904
|
type: "polygon";
|
|
872
905
|
} & {
|
|
873
906
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
874
|
-
path?: Path2D | undefined;
|
|
875
907
|
type: "polygon";
|
|
876
908
|
}) | ({
|
|
877
909
|
id: string;
|
|
@@ -881,6 +913,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
881
913
|
center: Point;
|
|
882
914
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
883
915
|
};
|
|
916
|
+
path?: Path2D | undefined;
|
|
884
917
|
} & {
|
|
885
918
|
rotation?: number;
|
|
886
919
|
toolId?: string;
|
|
@@ -891,7 +924,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
891
924
|
type: "curve";
|
|
892
925
|
} & {
|
|
893
926
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
894
|
-
path?: Path2D | undefined;
|
|
895
927
|
type: "curve";
|
|
896
928
|
}) | ({
|
|
897
929
|
id: string;
|
|
@@ -901,6 +933,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
901
933
|
center: Point;
|
|
902
934
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
903
935
|
};
|
|
936
|
+
path?: Path2D | undefined;
|
|
904
937
|
} & {
|
|
905
938
|
rotation?: number;
|
|
906
939
|
toolId?: string;
|
|
@@ -913,7 +946,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
913
946
|
scaleY?: number;
|
|
914
947
|
} & {
|
|
915
948
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
916
|
-
path?: Path2D | undefined;
|
|
917
949
|
type: "brush";
|
|
918
950
|
}) | ({
|
|
919
951
|
id: string;
|
|
@@ -923,6 +955,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
923
955
|
center: Point;
|
|
924
956
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
925
957
|
};
|
|
958
|
+
path?: Path2D | undefined;
|
|
926
959
|
} & {
|
|
927
960
|
rotation?: number;
|
|
928
961
|
toolId?: string;
|
|
@@ -934,7 +967,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
934
967
|
type: "group";
|
|
935
968
|
} & {
|
|
936
969
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
937
|
-
path?: Path2D | undefined;
|
|
938
970
|
type: "group";
|
|
939
971
|
}) | ((prevState: ({
|
|
940
972
|
id: string;
|
|
@@ -944,6 +976,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
944
976
|
center: Point;
|
|
945
977
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
946
978
|
};
|
|
979
|
+
path?: Path2D | undefined;
|
|
947
980
|
} & {
|
|
948
981
|
rotation?: number;
|
|
949
982
|
toolId?: string;
|
|
@@ -954,7 +987,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
954
987
|
type: "line";
|
|
955
988
|
} & {
|
|
956
989
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
957
|
-
path?: Path2D | undefined;
|
|
958
990
|
arrows?: import("./../../common/types/Shapes").TriangleEntity[];
|
|
959
991
|
type: "line";
|
|
960
992
|
}) | ({
|
|
@@ -965,6 +997,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
965
997
|
center: Point;
|
|
966
998
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
967
999
|
};
|
|
1000
|
+
path?: Path2D | undefined;
|
|
968
1001
|
} & {
|
|
969
1002
|
rotation?: number;
|
|
970
1003
|
toolId?: string;
|
|
@@ -975,6 +1008,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
975
1008
|
src: string;
|
|
976
1009
|
} & {
|
|
977
1010
|
img: HTMLImageElement;
|
|
1011
|
+
flipX?: boolean;
|
|
1012
|
+
flipY?: boolean;
|
|
1013
|
+
ratio?: number;
|
|
978
1014
|
type: "picture";
|
|
979
1015
|
} & {
|
|
980
1016
|
img: HTMLImageElement;
|
|
@@ -988,6 +1024,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
988
1024
|
center: Point;
|
|
989
1025
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
990
1026
|
};
|
|
1027
|
+
path?: Path2D | undefined;
|
|
991
1028
|
} & {
|
|
992
1029
|
rotation?: number;
|
|
993
1030
|
toolId?: string;
|
|
@@ -998,6 +1035,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
998
1035
|
value: string[];
|
|
999
1036
|
fontSize: number;
|
|
1000
1037
|
} & {
|
|
1038
|
+
flipX?: boolean;
|
|
1039
|
+
flipY?: boolean;
|
|
1040
|
+
ratio?: number;
|
|
1001
1041
|
type: "text";
|
|
1002
1042
|
} & {
|
|
1003
1043
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
@@ -1010,6 +1050,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1010
1050
|
center: Point;
|
|
1011
1051
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1012
1052
|
};
|
|
1053
|
+
path?: Path2D | undefined;
|
|
1013
1054
|
} & {
|
|
1014
1055
|
rotation?: number;
|
|
1015
1056
|
toolId?: string;
|
|
@@ -1020,7 +1061,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1020
1061
|
type: "rect";
|
|
1021
1062
|
} & {
|
|
1022
1063
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1023
|
-
path?: Path2D | undefined;
|
|
1024
1064
|
type: "rect";
|
|
1025
1065
|
}) | ({
|
|
1026
1066
|
id: string;
|
|
@@ -1030,6 +1070,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1030
1070
|
center: Point;
|
|
1031
1071
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1032
1072
|
};
|
|
1073
|
+
path?: Path2D | undefined;
|
|
1033
1074
|
} & {
|
|
1034
1075
|
rotation?: number;
|
|
1035
1076
|
toolId?: string;
|
|
@@ -1040,7 +1081,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1040
1081
|
type: "square";
|
|
1041
1082
|
} & {
|
|
1042
1083
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1043
|
-
path?: Path2D | undefined;
|
|
1044
1084
|
type: "square";
|
|
1045
1085
|
}) | ({
|
|
1046
1086
|
id: string;
|
|
@@ -1050,6 +1090,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1050
1090
|
center: Point;
|
|
1051
1091
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1052
1092
|
};
|
|
1093
|
+
path?: Path2D | undefined;
|
|
1053
1094
|
} & {
|
|
1054
1095
|
rotation?: number;
|
|
1055
1096
|
toolId?: string;
|
|
@@ -1060,7 +1101,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1060
1101
|
type: "circle";
|
|
1061
1102
|
} & {
|
|
1062
1103
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1063
|
-
path?: Path2D | undefined;
|
|
1064
1104
|
type: "circle";
|
|
1065
1105
|
}) | ({
|
|
1066
1106
|
id: string;
|
|
@@ -1070,6 +1110,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1070
1110
|
center: Point;
|
|
1071
1111
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1072
1112
|
};
|
|
1113
|
+
path?: Path2D | undefined;
|
|
1073
1114
|
} & {
|
|
1074
1115
|
rotation?: number;
|
|
1075
1116
|
toolId?: string;
|
|
@@ -1080,7 +1121,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1080
1121
|
type: "ellipse";
|
|
1081
1122
|
} & {
|
|
1082
1123
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1083
|
-
path?: Path2D | undefined;
|
|
1084
1124
|
type: "ellipse";
|
|
1085
1125
|
}) | ({
|
|
1086
1126
|
id: string;
|
|
@@ -1090,6 +1130,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1090
1130
|
center: Point;
|
|
1091
1131
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1092
1132
|
};
|
|
1133
|
+
path?: Path2D | undefined;
|
|
1093
1134
|
} & {
|
|
1094
1135
|
rotation?: number;
|
|
1095
1136
|
toolId?: string;
|
|
@@ -1100,7 +1141,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1100
1141
|
type: "polygon";
|
|
1101
1142
|
} & {
|
|
1102
1143
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
1103
|
-
path?: Path2D | undefined;
|
|
1104
1144
|
type: "polygon";
|
|
1105
1145
|
}) | ({
|
|
1106
1146
|
id: string;
|
|
@@ -1110,6 +1150,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1110
1150
|
center: Point;
|
|
1111
1151
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1112
1152
|
};
|
|
1153
|
+
path?: Path2D | undefined;
|
|
1113
1154
|
} & {
|
|
1114
1155
|
rotation?: number;
|
|
1115
1156
|
toolId?: string;
|
|
@@ -1120,7 +1161,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1120
1161
|
type: "curve";
|
|
1121
1162
|
} & {
|
|
1122
1163
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
1123
|
-
path?: Path2D | undefined;
|
|
1124
1164
|
type: "curve";
|
|
1125
1165
|
}) | ({
|
|
1126
1166
|
id: string;
|
|
@@ -1130,6 +1170,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1130
1170
|
center: Point;
|
|
1131
1171
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1132
1172
|
};
|
|
1173
|
+
path?: Path2D | undefined;
|
|
1133
1174
|
} & {
|
|
1134
1175
|
rotation?: number;
|
|
1135
1176
|
toolId?: string;
|
|
@@ -1142,7 +1183,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1142
1183
|
scaleY?: number;
|
|
1143
1184
|
} & {
|
|
1144
1185
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1145
|
-
path?: Path2D | undefined;
|
|
1146
1186
|
type: "brush";
|
|
1147
1187
|
}) | ({
|
|
1148
1188
|
id: string;
|
|
@@ -1152,6 +1192,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1152
1192
|
center: Point;
|
|
1153
1193
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1154
1194
|
};
|
|
1195
|
+
path?: Path2D | undefined;
|
|
1155
1196
|
} & {
|
|
1156
1197
|
rotation?: number;
|
|
1157
1198
|
toolId?: string;
|
|
@@ -1163,7 +1204,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1163
1204
|
type: "group";
|
|
1164
1205
|
} & {
|
|
1165
1206
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1166
|
-
path?: Path2D | undefined;
|
|
1167
1207
|
type: "group";
|
|
1168
1208
|
}) | undefined) => ({
|
|
1169
1209
|
id: string;
|
|
@@ -1173,6 +1213,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1173
1213
|
center: Point;
|
|
1174
1214
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1175
1215
|
};
|
|
1216
|
+
path?: Path2D | undefined;
|
|
1176
1217
|
} & {
|
|
1177
1218
|
rotation?: number;
|
|
1178
1219
|
toolId?: string;
|
|
@@ -1183,7 +1224,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1183
1224
|
type: "line";
|
|
1184
1225
|
} & {
|
|
1185
1226
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
1186
|
-
path?: Path2D | undefined;
|
|
1187
1227
|
arrows?: import("./../../common/types/Shapes").TriangleEntity[];
|
|
1188
1228
|
type: "line";
|
|
1189
1229
|
}) | ({
|
|
@@ -1194,6 +1234,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1194
1234
|
center: Point;
|
|
1195
1235
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1196
1236
|
};
|
|
1237
|
+
path?: Path2D | undefined;
|
|
1197
1238
|
} & {
|
|
1198
1239
|
rotation?: number;
|
|
1199
1240
|
toolId?: string;
|
|
@@ -1204,6 +1245,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1204
1245
|
src: string;
|
|
1205
1246
|
} & {
|
|
1206
1247
|
img: HTMLImageElement;
|
|
1248
|
+
flipX?: boolean;
|
|
1249
|
+
flipY?: boolean;
|
|
1250
|
+
ratio?: number;
|
|
1207
1251
|
type: "picture";
|
|
1208
1252
|
} & {
|
|
1209
1253
|
img: HTMLImageElement;
|
|
@@ -1217,6 +1261,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1217
1261
|
center: Point;
|
|
1218
1262
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1219
1263
|
};
|
|
1264
|
+
path?: Path2D | undefined;
|
|
1220
1265
|
} & {
|
|
1221
1266
|
rotation?: number;
|
|
1222
1267
|
toolId?: string;
|
|
@@ -1227,6 +1272,9 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1227
1272
|
value: string[];
|
|
1228
1273
|
fontSize: number;
|
|
1229
1274
|
} & {
|
|
1275
|
+
flipX?: boolean;
|
|
1276
|
+
flipY?: boolean;
|
|
1277
|
+
ratio?: number;
|
|
1230
1278
|
type: "text";
|
|
1231
1279
|
} & {
|
|
1232
1280
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
@@ -1239,6 +1287,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1239
1287
|
center: Point;
|
|
1240
1288
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1241
1289
|
};
|
|
1290
|
+
path?: Path2D | undefined;
|
|
1242
1291
|
} & {
|
|
1243
1292
|
rotation?: number;
|
|
1244
1293
|
toolId?: string;
|
|
@@ -1249,7 +1298,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1249
1298
|
type: "rect";
|
|
1250
1299
|
} & {
|
|
1251
1300
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1252
|
-
path?: Path2D | undefined;
|
|
1253
1301
|
type: "rect";
|
|
1254
1302
|
}) | ({
|
|
1255
1303
|
id: string;
|
|
@@ -1259,6 +1307,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1259
1307
|
center: Point;
|
|
1260
1308
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1261
1309
|
};
|
|
1310
|
+
path?: Path2D | undefined;
|
|
1262
1311
|
} & {
|
|
1263
1312
|
rotation?: number;
|
|
1264
1313
|
toolId?: string;
|
|
@@ -1269,7 +1318,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1269
1318
|
type: "square";
|
|
1270
1319
|
} & {
|
|
1271
1320
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1272
|
-
path?: Path2D | undefined;
|
|
1273
1321
|
type: "square";
|
|
1274
1322
|
}) | ({
|
|
1275
1323
|
id: string;
|
|
@@ -1279,6 +1327,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1279
1327
|
center: Point;
|
|
1280
1328
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1281
1329
|
};
|
|
1330
|
+
path?: Path2D | undefined;
|
|
1282
1331
|
} & {
|
|
1283
1332
|
rotation?: number;
|
|
1284
1333
|
toolId?: string;
|
|
@@ -1289,7 +1338,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1289
1338
|
type: "circle";
|
|
1290
1339
|
} & {
|
|
1291
1340
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1292
|
-
path?: Path2D | undefined;
|
|
1293
1341
|
type: "circle";
|
|
1294
1342
|
}) | ({
|
|
1295
1343
|
id: string;
|
|
@@ -1299,6 +1347,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1299
1347
|
center: Point;
|
|
1300
1348
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1301
1349
|
};
|
|
1350
|
+
path?: Path2D | undefined;
|
|
1302
1351
|
} & {
|
|
1303
1352
|
rotation?: number;
|
|
1304
1353
|
toolId?: string;
|
|
@@ -1309,7 +1358,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1309
1358
|
type: "ellipse";
|
|
1310
1359
|
} & {
|
|
1311
1360
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1312
|
-
path?: Path2D | undefined;
|
|
1313
1361
|
type: "ellipse";
|
|
1314
1362
|
}) | ({
|
|
1315
1363
|
id: string;
|
|
@@ -1319,6 +1367,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1319
1367
|
center: Point;
|
|
1320
1368
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1321
1369
|
};
|
|
1370
|
+
path?: Path2D | undefined;
|
|
1322
1371
|
} & {
|
|
1323
1372
|
rotation?: number;
|
|
1324
1373
|
toolId?: string;
|
|
@@ -1329,7 +1378,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1329
1378
|
type: "polygon";
|
|
1330
1379
|
} & {
|
|
1331
1380
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
1332
|
-
path?: Path2D | undefined;
|
|
1333
1381
|
type: "polygon";
|
|
1334
1382
|
}) | ({
|
|
1335
1383
|
id: string;
|
|
@@ -1339,6 +1387,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1339
1387
|
center: Point;
|
|
1340
1388
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1341
1389
|
};
|
|
1390
|
+
path?: Path2D | undefined;
|
|
1342
1391
|
} & {
|
|
1343
1392
|
rotation?: number;
|
|
1344
1393
|
toolId?: string;
|
|
@@ -1349,7 +1398,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1349
1398
|
type: "curve";
|
|
1350
1399
|
} & {
|
|
1351
1400
|
selection?: import("./../../common/types/Shapes").SelectionLinesType | undefined;
|
|
1352
|
-
path?: Path2D | undefined;
|
|
1353
1401
|
type: "curve";
|
|
1354
1402
|
}) | ({
|
|
1355
1403
|
id: string;
|
|
@@ -1359,6 +1407,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1359
1407
|
center: Point;
|
|
1360
1408
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1361
1409
|
};
|
|
1410
|
+
path?: Path2D | undefined;
|
|
1362
1411
|
} & {
|
|
1363
1412
|
rotation?: number;
|
|
1364
1413
|
toolId?: string;
|
|
@@ -1371,7 +1420,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1371
1420
|
scaleY?: number;
|
|
1372
1421
|
} & {
|
|
1373
1422
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1374
|
-
path?: Path2D | undefined;
|
|
1375
1423
|
type: "brush";
|
|
1376
1424
|
}) | ({
|
|
1377
1425
|
id: string;
|
|
@@ -1381,6 +1429,7 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1381
1429
|
center: Point;
|
|
1382
1430
|
boundingBox: import("./../../common/types/Shapes").Rect;
|
|
1383
1431
|
};
|
|
1432
|
+
path?: Path2D | undefined;
|
|
1384
1433
|
} & {
|
|
1385
1434
|
rotation?: number;
|
|
1386
1435
|
toolId?: string;
|
|
@@ -1392,7 +1441,6 @@ declare const useShapes: (settings: UtilsSettings, width: number, height: number
|
|
|
1392
1441
|
type: "group";
|
|
1393
1442
|
} & {
|
|
1394
1443
|
selection?: import("./../../common/types/Shapes").SelectionDefaultType | undefined;
|
|
1395
|
-
path?: Path2D | undefined;
|
|
1396
1444
|
type: "group";
|
|
1397
1445
|
}) | undefined) | undefined>;
|
|
1398
1446
|
refreshHoveredShape: (e: MouseEvent | TouchEvent, ctx: CanvasRenderingContext2D, cursorPosition: Point, isInsideMask: boolean) => void;
|