@syncfusion/ej2-image-editor 20.4.51 → 21.1.36

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.
Files changed (112) hide show
  1. package/.eslintrc.json +1 -0
  2. package/CHANGELOG.md +55 -5
  3. package/dist/ej2-image-editor.umd.min.js +2 -2
  4. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  5. package/dist/es6/ej2-image-editor.es2015.js +20032 -11350
  6. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  7. package/dist/es6/ej2-image-editor.es5.js +20027 -11313
  8. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  9. package/dist/global/ej2-image-editor.min.js +2 -2
  10. package/dist/global/ej2-image-editor.min.js.map +1 -1
  11. package/dist/global/index.d.ts +1 -1
  12. package/package.json +12 -12
  13. package/src/image-editor/action/crop.d.ts +36 -0
  14. package/src/image-editor/action/crop.js +829 -0
  15. package/src/image-editor/action/draw.d.ts +125 -0
  16. package/src/image-editor/action/draw.js +3263 -0
  17. package/src/image-editor/action/export.d.ts +23 -0
  18. package/src/image-editor/action/export.js +364 -0
  19. package/src/image-editor/action/filter.d.ts +35 -0
  20. package/src/image-editor/action/filter.js +699 -0
  21. package/src/image-editor/action/freehand-draw.d.ts +61 -0
  22. package/src/image-editor/action/freehand-draw.js +1015 -0
  23. package/src/image-editor/action/index.d.ts +9 -0
  24. package/src/image-editor/action/index.js +9 -0
  25. package/src/image-editor/action/selection.d.ts +139 -0
  26. package/src/image-editor/action/selection.js +4518 -0
  27. package/src/image-editor/action/shape.d.ts +94 -0
  28. package/src/image-editor/action/shape.js +2745 -0
  29. package/src/image-editor/action/transform.d.ts +67 -0
  30. package/src/image-editor/action/transform.js +1859 -0
  31. package/src/image-editor/action/undo-redo.d.ts +43 -0
  32. package/src/image-editor/action/undo-redo.js +800 -0
  33. package/src/image-editor/base/enum.d.ts +189 -0
  34. package/src/image-editor/base/enum.js +198 -0
  35. package/src/image-editor/base/image-editor-model.d.ts +626 -0
  36. package/src/image-editor/base/image-editor.d.ts +1300 -0
  37. package/src/image-editor/base/image-editor.js +2270 -0
  38. package/src/image-editor/base/index.d.ts +4 -0
  39. package/src/image-editor/base/index.js +2 -0
  40. package/src/image-editor/base/interface.d.ts +1128 -0
  41. package/src/image-editor/base/interface.js +1 -0
  42. package/src/image-editor/index.d.ts +3 -5
  43. package/src/image-editor/index.js +3 -4
  44. package/src/image-editor/renderer/index.d.ts +1 -0
  45. package/src/image-editor/renderer/index.js +1 -0
  46. package/src/image-editor/renderer/toolbar.d.ts +105 -0
  47. package/src/image-editor/renderer/toolbar.js +3018 -0
  48. package/styles/bootstrap-dark.css +79 -8
  49. package/styles/bootstrap.css +79 -8
  50. package/styles/bootstrap4.css +79 -8
  51. package/styles/bootstrap5-dark.css +81 -11
  52. package/styles/bootstrap5.css +81 -11
  53. package/styles/fabric-dark.css +79 -8
  54. package/styles/fabric.css +79 -8
  55. package/styles/fluent-dark.css +79 -8
  56. package/styles/fluent.css +79 -8
  57. package/styles/highcontrast-light.css +81 -10
  58. package/styles/highcontrast.css +82 -10
  59. package/styles/image-editor/_highcontrast-definition.scss +1 -1
  60. package/styles/image-editor/_highcontrast-light-definition.scss +1 -1
  61. package/styles/image-editor/_layout.scss +28 -18
  62. package/styles/image-editor/_material3-dark-definition.scss +1 -0
  63. package/styles/image-editor/_material3-definition.scss +10 -10
  64. package/styles/image-editor/_theme.scss +11 -6
  65. package/styles/image-editor/bootstrap-dark.css +79 -8
  66. package/styles/image-editor/bootstrap.css +79 -8
  67. package/styles/image-editor/bootstrap4.css +79 -8
  68. package/styles/image-editor/bootstrap5-dark.css +81 -11
  69. package/styles/image-editor/bootstrap5.css +81 -11
  70. package/styles/image-editor/fabric-dark.css +79 -8
  71. package/styles/image-editor/fabric.css +79 -8
  72. package/styles/image-editor/fluent-dark.css +79 -8
  73. package/styles/image-editor/fluent.css +79 -8
  74. package/styles/image-editor/highcontrast-light.css +81 -10
  75. package/styles/image-editor/highcontrast.css +82 -10
  76. package/styles/image-editor/icons/_bootstrap-dark.scss +132 -0
  77. package/styles/image-editor/icons/_bootstrap.scss +132 -0
  78. package/styles/image-editor/icons/_bootstrap4.scss +132 -0
  79. package/styles/image-editor/icons/_bootstrap5.scss +132 -0
  80. package/styles/image-editor/icons/_fabric-dark.scss +132 -0
  81. package/styles/image-editor/icons/_fabric.scss +132 -0
  82. package/styles/image-editor/icons/_fluent.scss +132 -0
  83. package/styles/image-editor/icons/_fusionnew.scss +132 -0
  84. package/styles/image-editor/icons/_highcontrast-light.scss +132 -0
  85. package/styles/image-editor/icons/_highcontrast.scss +132 -0
  86. package/styles/image-editor/icons/_material-dark.scss +132 -0
  87. package/styles/image-editor/icons/_material.scss +132 -0
  88. package/styles/image-editor/icons/_material3-dark.scss +1 -0
  89. package/styles/image-editor/icons/_material3.scss +133 -1
  90. package/styles/image-editor/icons/_tailwind.scss +132 -0
  91. package/styles/image-editor/material-dark.css +79 -16
  92. package/styles/image-editor/material.css +79 -11
  93. package/styles/image-editor/material3-dark.css +453 -0
  94. package/styles/image-editor/material3-dark.scss +14 -0
  95. package/styles/image-editor/material3.css +509 -0
  96. package/styles/image-editor/material3.scss +14 -0
  97. package/styles/image-editor/tailwind-dark.css +79 -8
  98. package/styles/image-editor/tailwind.css +79 -8
  99. package/styles/material-dark.css +79 -16
  100. package/styles/material.css +79 -11
  101. package/styles/material3-dark.css +453 -0
  102. package/styles/material3-dark.scss +3 -0
  103. package/styles/material3.css +509 -0
  104. package/styles/material3.scss +3 -0
  105. package/styles/tailwind-dark.css +79 -8
  106. package/styles/tailwind.css +79 -8
  107. package/GitLeaksReport.json +0 -1
  108. package/gitleaks-ci/gitleaks +0 -0
  109. package/gitleaks-ci.tar.gz +0 -0
  110. package/src/image-editor/image-editor-model.d.ts +0 -331
  111. package/src/image-editor/image-editor.d.ts +0 -1428
  112. package/src/image-editor/image-editor.js +0 -12849
@@ -0,0 +1,1128 @@
1
+ import { FileType, ShapeType, ImageFinetuneOption, ImageFilterOption } from '../index';
2
+ import { ItemModel } from '@syncfusion/ej2-navigations';
3
+ /**
4
+ * This interface is used to specify settings for image finetuning operations, including minimum and maximum values, as well as default values.
5
+ */
6
+ export interface ImageFinetuneValue {
7
+ /**
8
+ * Specifies the minimum value of finetune option.
9
+ *
10
+ * @default null
11
+ */
12
+ min: number;
13
+ /**
14
+ * Specifies the maximum value of finetune option.
15
+ *
16
+ * @default null
17
+ */
18
+ max: number;
19
+ /**
20
+ * Specifies the default value of finetune option.
21
+ *
22
+ * @default null
23
+ */
24
+ defaultValue: number;
25
+ }
26
+ /**
27
+ * The Interface which contains the properties for zoom transition occur in the Image Editor.
28
+ */
29
+ export interface ZoomEventArgs {
30
+ /**
31
+ * Returns the point in which the zooming action was performed.
32
+ *
33
+ * @remarks
34
+ * The given value is a point object which has x and y coordinates.
35
+ *
36
+ */
37
+ zoomPoint: Point;
38
+ /**
39
+ * Returns the previous zoom factor that already had before this current zooming action.
40
+ *
41
+ * @remarks
42
+ * The previous and current zoom factor is used for finding whether the performed zooming is a zoom in or zoom out.
43
+ *
44
+ */
45
+ previousZoomFactor: number;
46
+ /**
47
+ * Returns the current zoomed level, in which the loaded image is enlarged in the image editor.
48
+ *
49
+ * @remarks
50
+ * The previous and current zoom factor is used for finding whether the performed zooming is a zoom in or zoom out.
51
+ *
52
+ */
53
+ currentZoomFactor: number;
54
+ /**
55
+ * Specifies a value that indicates whether the zooming action can be canceled in image editor.
56
+ */
57
+ cancel: boolean;
58
+ /**
59
+ * Returns the type of zooming performed in the image editor.
60
+ *
61
+ * @remarks
62
+ * This property is used to get the type of zooming performed in the editor.
63
+ * The possible values of this property are 'MouseWheel', 'Pinch', 'Commands', and 'Toolbar'.
64
+ * The value of this property will be updated each time a zoom operation is performed.
65
+ * MouseWheel - It indicates the zooming performed using mouse wheel.
66
+ * Pinch - It indicates that zooming is performed using pinch gestures on touch-enabled devices.
67
+ * Commands - It indicates that zooming is performed by clicking the CTRL key and either the plus (+) or minus (-) buttons on the keyboard.
68
+ * Toolbar - It indicates that zooming is performed using toolbar buttons.
69
+ * By default, this property is set to 'Toolbar'.
70
+ *
71
+ *
72
+ */
73
+ zoomTrigger: string;
74
+ }
75
+ /**
76
+ * The Interface which contains the properties for pan transition occur in the Image Editor.
77
+ */
78
+ export interface PanEventArgs {
79
+ /**
80
+ * Returns the (x, y) point of panning started
81
+ */
82
+ startPoint: Point;
83
+ /**
84
+ * Returns the (x, y) point to be panning ended.
85
+ */
86
+ endPoint: Point;
87
+ /**
88
+ * Defines whether to cancel the panning action of image editor.
89
+ */
90
+ cancel: boolean;
91
+ }
92
+ /**
93
+ * The Interface which contains the properties for crop transition occurs in the Image Editor.
94
+ */
95
+ export interface CropEventArgs {
96
+ /**
97
+ * Returns the start point of the crop region.
98
+ *
99
+ * @remarks
100
+ * The start and end point is used get the cropping region in an image editor.
101
+ *
102
+ */
103
+ startPoint: Point;
104
+ /**
105
+ * Returns the end point of the crop region.
106
+ *
107
+ * @remarks
108
+ * The start and end point is used get the cropping region in an image editor.
109
+ *
110
+ */
111
+ endPoint: Point;
112
+ /**
113
+ * Specifies whether to prevent scale-based cropping in the image editor.
114
+ */
115
+ preventScaling: boolean;
116
+ /**
117
+ * Defines whether to cancel the cropping action of image editor.
118
+ */
119
+ cancel: boolean;
120
+ }
121
+ /**
122
+ * The Interface which contains the properties for rotate transition in the Image Editor.
123
+ */
124
+ export interface RotateEventArgs {
125
+ /**
126
+ * Returns the current degree to be rotated.
127
+ */
128
+ currentDegree: number;
129
+ /**
130
+ * Returns the previous degree of rotated image.
131
+ */
132
+ previousDegree: number;
133
+ /**
134
+ * Defines whether to cancel the rotating action of image editor.
135
+ */
136
+ cancel: boolean;
137
+ }
138
+ /**
139
+ * The Interface which contains the properties for flip transition in the Image Editor.
140
+ */
141
+ export interface FlipEventArgs {
142
+ /**
143
+ * Returns the direction(Horizontal and vertical) to be flipped.
144
+ */
145
+ direction: string;
146
+ /**
147
+ * Defines the cancel option to cancel the flip action.
148
+ */
149
+ cancel: boolean;
150
+ /**
151
+ * Returns the previous flipped direction of image.
152
+ */
153
+ previousDirection: string;
154
+ }
155
+ /**
156
+ * The Interface which contains the properties for shape change in Image Editor.
157
+ */
158
+ export interface ShapeChangeEventArgs {
159
+ /**
160
+ * Returns the name of the action.
161
+ */
162
+ action?: string;
163
+ /**
164
+ * Returns the object of shape before moved, resized, or customized the UI.
165
+ */
166
+ previousShapeSettings?: ShapeSettings;
167
+ /**
168
+ * Returns `the object of shape which is inserted or moved or deleted or resized or customized the UI.
169
+ */
170
+ currentShapeSettings?: ShapeSettings;
171
+ }
172
+ /**
173
+ * The Interface which contains the properties for selection change in Image Editor.
174
+ */
175
+ export interface SelectionChangeEventArgs {
176
+ /**
177
+ * Returns the name of the action.
178
+ */
179
+ action?: string;
180
+ /**
181
+ * Returns the object of selection before resized, or customized the UI.
182
+ */
183
+ previousSelectionSettings?: CropSelectionSettings;
184
+ /**
185
+ * Returns the object of selection which is inserted or deleted or resized or customized the UI.
186
+ */
187
+ currentSelectionSettings?: CropSelectionSettings;
188
+ }
189
+ /**
190
+ * The Interface which contains the properties for Toolbar events.
191
+ */
192
+ export interface ToolbarEventArgs {
193
+ /**
194
+ * Defines whether the to cancel the toolbar updating/refreshing action in the image editor.
195
+ */
196
+ cancel?: boolean;
197
+ /**
198
+ * Returns the current toolbar type.
199
+ */
200
+ toolbarType?: string;
201
+ /**
202
+ * Returns the current toolbar item.
203
+ */
204
+ item?: ItemModel;
205
+ /**
206
+ * Specifies the toolbar item collection to be rendered as contextual toolbar.
207
+ *
208
+ * @remarks
209
+ * This property collection contains string and ItemModel values.
210
+ * The string values representing the names of the built-in toolbar items to be displayed.
211
+ * The ItemModel values representing the object of custom toolbar items to be displayed.
212
+ *
213
+ */
214
+ toolbarItems?: (string | ItemModel)[];
215
+ }
216
+ /**
217
+ * The Interface which contains the properties for opening the image.
218
+ */
219
+ export interface OpenEventArgs {
220
+ /**
221
+ * Returns the file name of an image.
222
+ */
223
+ fileName: string;
224
+ /**
225
+ * Returns the file type of an image.
226
+ */
227
+ fileType: FileType;
228
+ /**
229
+ * Returns whether the loaded file is valid in the image editor.
230
+ */
231
+ isValidImage: boolean;
232
+ }
233
+ /**
234
+ * The Interface which contains the properties for saving the canvas as image.
235
+ */
236
+ export interface SaveEventArgs {
237
+ /**
238
+ * Returns the file name of an image.
239
+ */
240
+ fileName: string;
241
+ /**
242
+ * Returns the file type of an image.
243
+ */
244
+ fileType: FileType;
245
+ }
246
+ /**
247
+ * The Interface which contains the properties for before saving the canvas as image.
248
+ */
249
+ export interface BeforeSaveEventArgs {
250
+ /**
251
+ * Defines whether the to cancel the saving action in the image editor.
252
+ */
253
+ cancel: boolean;
254
+ /**
255
+ * Specifies the file name for an image.
256
+ */
257
+ fileName: string;
258
+ /**
259
+ * Returns the file type for an image.
260
+ */
261
+ fileType: FileType;
262
+ }
263
+ /**
264
+ * The Interface which contains the properties for Point Object in the image editor.
265
+ *
266
+ */
267
+ export interface Point {
268
+ /**
269
+ * Returns the x position in the canvas.
270
+ */
271
+ x: number;
272
+ /**
273
+ * Returns y position in the canvas.
274
+ */
275
+ y: number;
276
+ /**
277
+ * Returns the x ratio from in the image.
278
+ *
279
+ * @private
280
+ */
281
+ ratioX?: number;
282
+ /**
283
+ * Returns y ratio from the image.
284
+ *
285
+ * @private
286
+ */
287
+ ratioY?: number;
288
+ /**
289
+ * Specifies the time.
290
+ *
291
+ * @private
292
+ */
293
+ time?: number;
294
+ }
295
+ /**
296
+ * Interface for CropSelectionSettings in the Image Editor.
297
+ */
298
+ export interface CropSelectionSettings {
299
+ /**
300
+ * Returns the type of the selection.
301
+ */
302
+ type: string;
303
+ /**
304
+ * Returns the start x position of the selection.
305
+ */
306
+ startX: number;
307
+ /**
308
+ * Returns the start y position of the selection.
309
+ */
310
+ startY: number;
311
+ /**
312
+ * Returns the width of the selection.
313
+ */
314
+ width?: number;
315
+ /**
316
+ * Returns the height of the selection.
317
+ */
318
+ height?: number;
319
+ }
320
+ /**
321
+ * Interface for ShapeSettings in the Image Editor.
322
+ */
323
+ export interface ShapeSettings {
324
+ /**
325
+ * Returns the id of the shape.
326
+ */
327
+ id: string;
328
+ /**
329
+ * Returns the type of the shape.
330
+ */
331
+ type: ShapeType;
332
+ /**
333
+ * Returns the start x position of the shape.
334
+ */
335
+ startX: number;
336
+ /**
337
+ * Returns the start y position of the shape.
338
+ */
339
+ startY: number;
340
+ /**
341
+ * Returns the width of the shape.
342
+ */
343
+ width?: number;
344
+ /**
345
+ * Returns the height of the shape.
346
+ */
347
+ height?: number;
348
+ /**
349
+ * Returns the stroke color of the shape.
350
+ */
351
+ strokeColor?: string;
352
+ /**
353
+ * Returns the fill color of the shape.
354
+ */
355
+ fillColor?: string;
356
+ /**
357
+ * Returns the stroke width of the shape.
358
+ */
359
+ strokeWidth?: number;
360
+ /**
361
+ * Returns the radius of the ellipse shape.
362
+ */
363
+ radius?: number;
364
+ /**
365
+ * Returns the length of the line or arrow shape.
366
+ */
367
+ length?: number;
368
+ /**
369
+ * Returns the text content of the text.
370
+ */
371
+ text?: string;
372
+ /**
373
+ * Returns the font size of the text.
374
+ */
375
+ fontSize?: number;
376
+ /**
377
+ * Returns the font style of the text.
378
+ */
379
+ fontStyle?: string[];
380
+ /**
381
+ * Returns the font color of the text.
382
+ */
383
+ color?: string;
384
+ /**
385
+ * Returns the points collection of freehand drawing.
386
+ */
387
+ points?: Point[];
388
+ }
389
+ /**
390
+ * Interface for filter option for the image.
391
+ */
392
+ export interface ImageFilterEventArgs {
393
+ /**
394
+ * Specifies the when applying filter to an image.
395
+ */
396
+ filter: ImageFilterOption;
397
+ /**
398
+ * Defines the cancel option to cancel the filter action.
399
+ */
400
+ cancel: boolean;
401
+ }
402
+ /**
403
+ * Interface for fine tunes option for the image.
404
+ */
405
+ export interface FinetuneEventArgs {
406
+ /**
407
+ * Specifies the type of fine tunes.
408
+ */
409
+ finetune: ImageFinetuneOption;
410
+ /**
411
+ * Specifies the value of the fine tunes.
412
+ */
413
+ value: number;
414
+ /**
415
+ * Defines the cancel option to cancel the fine tunes action.
416
+ */
417
+ cancel: boolean;
418
+ }
419
+ /**
420
+ * Interface for Dimension calculation in the imageEditor.
421
+ *
422
+ */
423
+ export interface Dimension {
424
+ /**
425
+ * Gets x position from the canvas.
426
+ */
427
+ x?: number;
428
+ /**
429
+ * Gets y position from the canvas.
430
+ */
431
+ y?: number;
432
+ /**
433
+ * Gets width of the image.
434
+ */
435
+ width: number;
436
+ /**
437
+ * Gets height of the image.
438
+ */
439
+ height: number;
440
+ }
441
+ /**
442
+ * Interface that provides information to the click event in the Image Editor.
443
+ */
444
+ export interface ImageEditorClickEventArgs {
445
+ /**
446
+ * Returns the x and y coordinates of the mouse or touch action which performed in the Image Editor.
447
+ */
448
+ point: Point;
449
+ }
450
+ /**
451
+ * Interface for quick access toolbar for the image.
452
+ *
453
+ * @private
454
+ */
455
+ export interface QuickAccessToolbarEventArgs {
456
+ /**
457
+ * Specifies whether to cancel the quick access toolbar the opening action.
458
+ *
459
+ * @remarks
460
+ * Set this property to `true` to cancel the quick access toolbar opening action.
461
+ * By default, this property is set to `false`.
462
+ *
463
+ */
464
+ cancel: boolean;
465
+ /**
466
+ * Specifies the collection of toolbar items to be rendered in a quick access toolbar.
467
+ *
468
+ * @remarks
469
+ * This property collection contains string and ItemModel values.
470
+ * The string values representing the names of the built-in toolbar items to display.
471
+ * The ItemModel values representing the object of custom toolbar items to display.
472
+ * The ItemModel will be used to enable/disable the toolbar items.
473
+ *
474
+ */
475
+ toolbarItems: (string | ItemModel)[];
476
+ /**
477
+ * Returns the type of shape to be selected such as Rectangle, Text, Line, Ellipse, Arrow, Path, or Freehand draw.
478
+ */
479
+ shape?: string;
480
+ }
481
+ /**
482
+ * Interface for active object in the imageEditor.
483
+ *
484
+ * @private
485
+ */
486
+ export interface ActivePoint {
487
+ /**
488
+ * Gets mouse down x-point.
489
+ */
490
+ startX: number;
491
+ /**
492
+ * Gets mouse down y-point.
493
+ */
494
+ startY: number;
495
+ /**
496
+ * Gets mouse move x-point.
497
+ */
498
+ endX?: number;
499
+ /**
500
+ * Gets mouse move y-point.
501
+ */
502
+ endY?: number;
503
+ /**
504
+ * Gets width of the selection.
505
+ */
506
+ width?: number;
507
+ /**
508
+ * Gets height of the selection.
509
+ */
510
+ height?: number;
511
+ /**
512
+ * Gets radius of the circle dot.
513
+ */
514
+ radius?: number;
515
+ }
516
+ /**
517
+ * Defines the cropped value of all Objects for Image Editor.
518
+ *
519
+ * @private
520
+ */
521
+ export interface CurrentObject {
522
+ /**
523
+ * Specifies the stroke color for the object in Image Editor.
524
+ */
525
+ cropZoom: number;
526
+ /**
527
+ * Specifies the stroke color for the object in Image Editor.
528
+ */
529
+ defaultZoom: number;
530
+ /**
531
+ * Specifies the stroke color for the object in Image Editor.
532
+ */
533
+ zoomFactor: number;
534
+ /**
535
+ * Specifies the stroke color for the object in Image Editor.
536
+ */
537
+ previousZoomValue: number;
538
+ /**
539
+ * Specifies the stroke color for the object in Image Editor.
540
+ */
541
+ totalPannedPoint: Point;
542
+ /**
543
+ * Specifies the stroke color for the object in Image Editor.
544
+ */
545
+ totalPannedClientPoint: Point;
546
+ /**
547
+ * Specifies the stroke color for the object in Image Editor.
548
+ */
549
+ totalPannedInternalPoint: Point;
550
+ /**
551
+ * Specifies the stroke color for the object in Image Editor.
552
+ */
553
+ tempFlipPanPoint: Point;
554
+ /**
555
+ * Specifies the stroke color for the object in Image Editor.
556
+ */
557
+ activeObj: SelectionPoint;
558
+ /**
559
+ * Specifies the stroke color for the object in Image Editor.
560
+ */
561
+ rotateFlipColl: string[] | number[];
562
+ /**
563
+ * Specifies the stroke color for the object in Image Editor.
564
+ */
565
+ degree: number;
566
+ /**
567
+ * Specifies the stroke color for the object in Image Editor.
568
+ */
569
+ currFlipState: string;
570
+ /**
571
+ * Specifies the stroke color for the object in Image Editor.
572
+ */
573
+ destPoints: ActivePoint;
574
+ /**
575
+ * Specifies the stroke color for the object in Image Editor.
576
+ */
577
+ srcPoints: ActivePoint;
578
+ /**
579
+ * Specifies the filter for the image in Image Editor.
580
+ */
581
+ filter: string;
582
+ /**
583
+ * Specifies the object collection in Image Editor.
584
+ */
585
+ objColl?: SelectionPoint[];
586
+ /**
587
+ * Specifies the point collections for freehand drawing in Image Editor.
588
+ */
589
+ pointColl?: Point[];
590
+ /**
591
+ * Specifies the selection point collections for freehand drawing in Image Editor.
592
+ */
593
+ selPointColl?: Point[];
594
+ /**
595
+ * Specifies the action collections performed after cropping in Image Editor.
596
+ */
597
+ afterCropActions?: string[];
598
+ /**
599
+ * Specifies the action collections performed after cropping in Image Editor.
600
+ */
601
+ currSelectionPoint?: SelectionPoint;
602
+ }
603
+ /**
604
+ * Defines the stroke color, fillColor and strokeWidth properties for Image Editor.
605
+ *
606
+ * @private
607
+ */
608
+ export interface StrokeSettings {
609
+ /**
610
+ * Specifies the stroke color for the object in Image Editor.
611
+ */
612
+ strokeColor: string;
613
+ /**
614
+ * Specifies the background color for the object in Image Editor.
615
+ */
616
+ fillColor: string;
617
+ /**
618
+ * Specifies the stroke width for the object in Image Editor.
619
+ */
620
+ strokeWidth: number;
621
+ /**
622
+ * Specifies the flip state for the object in Image Editor.
623
+ */
624
+ flipState?: string;
625
+ }
626
+ /**
627
+ * Defines the destination and source points of image to draw in canvas.
628
+ *
629
+ * @private
630
+ */
631
+ export interface ImageDimension {
632
+ /**
633
+ * Specifies the x coordinate where to place the image on the canvas.
634
+ */
635
+ destLeft: number;
636
+ /**
637
+ * Specifies the y coordinate where to place the image on the canvas.
638
+ */
639
+ destTop: number;
640
+ /**
641
+ * Specifies the width of the image to draw on the canvas.
642
+ */
643
+ destWidth: number;
644
+ /**
645
+ * Specifies the height of the image to draw on the canvas.
646
+ */
647
+ destHeight: number;
648
+ /**
649
+ * Specifies the x coordinate where to start clipping from the image.
650
+ */
651
+ srcLeft: number;
652
+ /**
653
+ * Specifies the y coordinate where to start clipping from the image.
654
+ */
655
+ srcTop: number;
656
+ /**
657
+ * Specifies the width of the clipped image.
658
+ */
659
+ srcWidth: number;
660
+ /**
661
+ * Specifies the height of the clipped image.
662
+ */
663
+ srcHeight: number;
664
+ }
665
+ /**
666
+ * Defines the transformed values of image in canvas.
667
+ *
668
+ * @private
669
+ */
670
+ export interface TransformValue {
671
+ /**
672
+ * Specifies the rotated degree of image on the canvas.
673
+ */
674
+ degree: number;
675
+ /**
676
+ * Specifies the flipped state of image on the canvas.
677
+ */
678
+ currFlipState: string;
679
+ /**
680
+ * Specifies the total zoomed value of image on the canvas.
681
+ */
682
+ zoomFactor: number;
683
+ /**
684
+ * Specifies the zoomed value of image in selection state on the canvas.
685
+ */
686
+ cropZoomFactor: number;
687
+ /**
688
+ * Specifies the zoomed value of image in non-selection state on the canvas.
689
+ */
690
+ defaultZoomFactor: number;
691
+ }
692
+ /**
693
+ * Defines the panned values of image in canvas.
694
+ *
695
+ * @private
696
+ */
697
+ export interface PanPoint {
698
+ /**
699
+ * Specifies the temporary difference of old panned point and new panned point.
700
+ */
701
+ currentPannedPoint: Point;
702
+ /**
703
+ * Specifies the total panned point in non-rotated state from center of the image.
704
+ */
705
+ totalPannedPoint: Point;
706
+ /**
707
+ * Specifies the total temporary panned point in rotated state from center of the image.
708
+ */
709
+ totalPannedInternalPoint: Point;
710
+ /**
711
+ * Specifies the total panned point in rotated state from center of the image.
712
+ */
713
+ totalPannedClientPoint: Point;
714
+ }
715
+ /**
716
+ * Defines the text, fontFamily, fontSize, bold, italic and underline properties for Image Editor.
717
+ *
718
+ * @private
719
+ */
720
+ export interface TextSettings {
721
+ /**
722
+ * Specifies pre-defined text on canvas.
723
+ */
724
+ text: string;
725
+ /**
726
+ * Specifies the fontFamily for the text content.
727
+ */
728
+ fontFamily: string;
729
+ /**
730
+ * Specifies the fontSize for the text content.
731
+ */
732
+ fontSize: number;
733
+ /**
734
+ * Specifies the fontSize for the text content.
735
+ */
736
+ fontRatio: number;
737
+ /**
738
+ * Specifies the bold styles for the text content.
739
+ */
740
+ bold: boolean;
741
+ /**
742
+ * Specifies the italic styles for the text content.
743
+ */
744
+ italic: boolean;
745
+ /**
746
+ * Specifies the underline styles for the text content.
747
+ */
748
+ underline: boolean;
749
+ }
750
+ /**
751
+ * Interface for Transition occur in the Image Editor.
752
+ *
753
+ * @private
754
+ */
755
+ export interface Transition {
756
+ /**
757
+ * Specifies the operation name for undo / redo in Image Editor.
758
+ */
759
+ operation: string;
760
+ /**
761
+ * Specifies all previous object in Image Editor.
762
+ */
763
+ previousObj: CurrentObject;
764
+ /**
765
+ * Specifies all current object in Image Editor.
766
+ */
767
+ currentObj: CurrentObject;
768
+ /**
769
+ * Specifies the previous object collection in Image Editor.
770
+ */
771
+ previousObjColl: SelectionPoint[];
772
+ /**
773
+ * Specifies the current object collection in Image Editor.
774
+ */
775
+ currentObjColl: SelectionPoint[];
776
+ /**
777
+ * Specifies the previous point collection in Image Editor.
778
+ */
779
+ previousPointColl: Point[];
780
+ /**
781
+ * Specifies the current point collection in Image Editor.
782
+ */
783
+ currentPointColl: Point[];
784
+ /**
785
+ * Specifies the previous selection point collection in Image Editor.
786
+ */
787
+ previousSelPointColl: Point[];
788
+ /**
789
+ * Specifies the current selection point collection in Image Editor.
790
+ */
791
+ currentSelPointColl: Point[];
792
+ /**
793
+ * Specifies the previous crop object in Image Editor.
794
+ */
795
+ previousCropObj: CurrentObject;
796
+ /**
797
+ * Specifies the current crop object in Image Editor.
798
+ */
799
+ currentCropObj: CurrentObject;
800
+ /**
801
+ * Specifies the previous text from the text area in Image Editor.
802
+ */
803
+ previousText?: string;
804
+ /**
805
+ * Specifies the current text from the text area in Image Editor.
806
+ */
807
+ currentText?: string;
808
+ /**
809
+ * Specifies the current filter in Image Editor.
810
+ */
811
+ filter?: string;
812
+ /**
813
+ * Specifies the circle crop value in Image Editor.
814
+ */
815
+ isCircleCrop?: boolean;
816
+ }
817
+ /**
818
+ * Interface for freehand drawing in the Image Editor.
819
+ *
820
+ * @private
821
+ */
822
+ export interface FreehandDraw {
823
+ /**
824
+ * Specifies the last width of freehand draw points in Image Editor.
825
+ */
826
+ lastWidth: number;
827
+ /**
828
+ * Specifies the last velocity of freehand draw points in Image Editor.
829
+ */
830
+ lastVelocity: number;
831
+ /**
832
+ * Specifies the time of freehand draw points in Image Editor.
833
+ */
834
+ time: number;
835
+ /**
836
+ * Specifies the x point of freehand draw points in Image Editor.
837
+ */
838
+ pointX: number;
839
+ /**
840
+ * Specifies the y point of freehand draw points in Image Editor.
841
+ */
842
+ pointY: number;
843
+ }
844
+ /**
845
+ * Interface for Transition occur in the Image Editor.
846
+ *
847
+ * @private
848
+ */
849
+ export interface Adjustment {
850
+ /**
851
+ * Gets brightness level of image.
852
+ */
853
+ brightness: number;
854
+ /**
855
+ * Gets contrast level of image.
856
+ */
857
+ contrast: number;
858
+ /**
859
+ * Gets hue level of image.
860
+ */
861
+ hue: number;
862
+ /**
863
+ * Gets saturation level of image.
864
+ */
865
+ saturation: number;
866
+ /**
867
+ * Gets exposure level of image.
868
+ */
869
+ exposure: number;
870
+ /**
871
+ * Gets opacity level of image.
872
+ */
873
+ opacity: number;
874
+ /**
875
+ * Gets blur level of image.
876
+ */
877
+ blur: number;
878
+ /**
879
+ * Gets sharpness level of image.
880
+ */
881
+ sharpen: boolean;
882
+ /**
883
+ * Gets black and white level of image.
884
+ */
885
+ bw: boolean;
886
+ }
887
+ /**
888
+ * Interface for interaction occur in the Image Editor.
889
+ *
890
+ * @private
891
+ */
892
+ export interface Interaction {
893
+ /**
894
+ * Gets function name called from the canvas.
895
+ */
896
+ shape: string;
897
+ /**
898
+ * Gets function name called from the canvas.
899
+ */
900
+ isDragging: boolean;
901
+ /**
902
+ * Gets function name called from the canvas.
903
+ */
904
+ isActiveObj: boolean;
905
+ /**
906
+ * Gets function name called from the canvas.
907
+ */
908
+ isText: boolean;
909
+ /**
910
+ * Gets function name called from the canvas.
911
+ */
912
+ isInitialText: boolean;
913
+ /**
914
+ * Gets function name called from the canvas.
915
+ */
916
+ isLine: boolean;
917
+ /**
918
+ * Gets function name called from the canvas.
919
+ */
920
+ isInitialLine: boolean;
921
+ /**
922
+ * Gets function name called from the canvas.
923
+ */
924
+ isCustomCrop: boolean;
925
+ /**
926
+ * Gets function name called from the canvas.
927
+ */
928
+ isZoomed: boolean;
929
+ /**
930
+ * Gets function name called from the canvas.
931
+ */
932
+ isUndoZoom: boolean;
933
+ /**
934
+ * Gets function name called from the canvas.
935
+ */
936
+ isUndoAction: boolean;
937
+ /**
938
+ * Gets function name called from the canvas.
939
+ */
940
+ isFiltered: boolean;
941
+ /**
942
+ * Gets function name called from the canvas.
943
+ */
944
+ isSave: boolean;
945
+ /**
946
+ * Gets function name called from the canvas.
947
+ */
948
+ isResize: boolean;
949
+ }
950
+ /**
951
+ * Interface for Selection Object in the Image Editor.
952
+ *
953
+ * @private
954
+ */
955
+ export interface SelectionPoint {
956
+ /**
957
+ * Gets start and end x, y Point.
958
+ */
959
+ horTopLine: ActivePoint;
960
+ /**
961
+ * Gets start and end x, y Point.
962
+ */
963
+ horTopInnerLine: ActivePoint;
964
+ /**
965
+ * Gets start and end x, y Point.
966
+ */
967
+ horBottomInnerLine: ActivePoint;
968
+ /**
969
+ * Gets start and end x, y Point.
970
+ */
971
+ horBottomLine: ActivePoint;
972
+ /**
973
+ * Gets start and end x, y Point.
974
+ */
975
+ verLeftLine: ActivePoint;
976
+ /**
977
+ * Gets start and end x, y Point.
978
+ */
979
+ verLeftInnerLine: ActivePoint;
980
+ /**
981
+ * Gets start and end x, y Point.
982
+ */
983
+ verRightInnerLine: ActivePoint;
984
+ /**
985
+ * Gets start and end x, y Point.
986
+ */
987
+ verRightLine: ActivePoint;
988
+ /**
989
+ * Gets start and end x, y Point with radius.
990
+ */
991
+ topLeftCircle: ActivePoint;
992
+ /**
993
+ * Gets start and end x, y Point with radius.
994
+ */
995
+ topCenterCircle: ActivePoint;
996
+ /**
997
+ * Gets start and end x, y Point with radius.
998
+ */
999
+ topRightCircle: ActivePoint;
1000
+ /**
1001
+ * Gets start and end x, y Point with radius.
1002
+ */
1003
+ centerLeftCircle: ActivePoint;
1004
+ /**
1005
+ * Gets start and end x, y Point with radius.
1006
+ */
1007
+ centerRightCircle: ActivePoint;
1008
+ /**
1009
+ * Gets start and end x, y Point with radius.
1010
+ */
1011
+ bottomLeftCircle: ActivePoint;
1012
+ /**
1013
+ * Gets start and end x, y Point with radius.
1014
+ */
1015
+ bottomCenterCircle: ActivePoint;
1016
+ /**
1017
+ * Gets start and end x, y Point with radius.
1018
+ */
1019
+ bottomRightCircle: ActivePoint;
1020
+ /**
1021
+ * Gets start and end x, y Point with radius.
1022
+ */
1023
+ activePoint: ActivePoint;
1024
+ /**
1025
+ * Gets angle of rotated shape.
1026
+ */
1027
+ rotatedAngle: number;
1028
+ /**
1029
+ * Gets start and end x, y Point with radius.
1030
+ */
1031
+ imageRatio?: ActivePoint;
1032
+ /**
1033
+ * Gets the shape to be drawn.
1034
+ */
1035
+ shape?: string;
1036
+ /**
1037
+ * Gets the line direction to be drawn.
1038
+ */
1039
+ lineDraw?: string;
1040
+ /**
1041
+ * Gets the text to be drawn.
1042
+ */
1043
+ keyHistory?: string;
1044
+ /**
1045
+ * Gets the direction to be dragged.
1046
+ */
1047
+ dragDirection?: string;
1048
+ /**
1049
+ * Gets the degree of the inserted shape / text.
1050
+ */
1051
+ shapeDegree?: number;
1052
+ /**
1053
+ * Gets the flipped state of shape / text.
1054
+ */
1055
+ textFlip?: string;
1056
+ /**
1057
+ * Gets the flipped state of shape / text.
1058
+ */
1059
+ shapeFlip?: string;
1060
+ /**
1061
+ * Gets the properties to customize the text.
1062
+ */
1063
+ textSettings?: TextSettings;
1064
+ /**
1065
+ * Gets the properties to customize the stroke.
1066
+ */
1067
+ strokeSettings?: StrokeSettings;
1068
+ /**
1069
+ * Gets the current index of object from the array.
1070
+ */
1071
+ currIndex?: string;
1072
+ /**
1073
+ * Gets the flip object collection from the array.
1074
+ */
1075
+ flipObjColl?: string[];
1076
+ /**
1077
+ * Gets in between x, y points of line or arrow shape.
1078
+ */
1079
+ pointColl?: Point[];
1080
+ /**
1081
+ * Gets in between x, y points of horizontal top line of shape.
1082
+ */
1083
+ horTopLinePointColl?: Point[];
1084
+ /**
1085
+ * Gets in between x, y points of horizontal bottom line of shape.
1086
+ */
1087
+ horBottomLinePointColl?: Point[];
1088
+ /**
1089
+ * Gets in between x, y points of vertical left line of shape.
1090
+ */
1091
+ verLeftLinePointColl?: Point[];
1092
+ /**
1093
+ * Gets in between x, y points of vertical right line of shape.
1094
+ */
1095
+ verRightLinePointColl?: Point[];
1096
+ /**
1097
+ * Gets x, y points of rotation shape.
1098
+ */
1099
+ rotationCirclePoint?: Point;
1100
+ /**
1101
+ * Gets x, y points of rotation shape in each rotation.
1102
+ */
1103
+ rotationCirclePointColl?: Point;
1104
+ /**
1105
+ * Gets ratio of rotation line distance in each rotation.
1106
+ */
1107
+ rotationCircleLine: number;
1108
+ /**
1109
+ * Gets the triangle value from the object.
1110
+ */
1111
+ triangle?: Point[];
1112
+ /**
1113
+ * Gets the triangle ratio from the object.
1114
+ */
1115
+ triangleRatio?: Point[];
1116
+ /**
1117
+ * Gets the triangle direction from the object.
1118
+ */
1119
+ triangleDirection?: string;
1120
+ /**
1121
+ * Gets the start type of arrow shape.
1122
+ */
1123
+ start?: string;
1124
+ /**
1125
+ * Gets the end type of arrow shape.
1126
+ */
1127
+ end?: string;
1128
+ }