@syncfusion/ej2-image-editor 20.4.49 → 21.1.35

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 (47) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/ej2-image-editor.umd.min.js +2 -2
  3. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-image-editor.es2015.js +4119 -1956
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +4227 -2059
  7. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-image-editor.min.js +2 -2
  9. package/dist/global/ej2-image-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +1 -1
  11. package/package.json +12 -12
  12. package/src/image-editor/image-editor-model.d.ts +306 -100
  13. package/src/image-editor/image-editor.d.ts +853 -276
  14. package/src/image-editor/image-editor.js +4227 -2060
  15. package/styles/bootstrap-dark.css +10 -5
  16. package/styles/bootstrap.css +10 -5
  17. package/styles/bootstrap4.css +10 -5
  18. package/styles/bootstrap5-dark.css +12 -8
  19. package/styles/bootstrap5.css +12 -8
  20. package/styles/fabric-dark.css +10 -5
  21. package/styles/fabric.css +10 -5
  22. package/styles/fluent-dark.css +10 -5
  23. package/styles/fluent.css +10 -5
  24. package/styles/highcontrast-light.css +10 -5
  25. package/styles/highcontrast.css +10 -5
  26. package/styles/image-editor/_layout.scss +7 -11
  27. package/styles/image-editor/_theme.scss +4 -4
  28. package/styles/image-editor/bootstrap-dark.css +10 -5
  29. package/styles/image-editor/bootstrap.css +10 -5
  30. package/styles/image-editor/bootstrap4.css +10 -5
  31. package/styles/image-editor/bootstrap5-dark.css +12 -8
  32. package/styles/image-editor/bootstrap5.css +12 -8
  33. package/styles/image-editor/fabric-dark.css +10 -5
  34. package/styles/image-editor/fabric.css +10 -5
  35. package/styles/image-editor/fluent-dark.css +10 -5
  36. package/styles/image-editor/fluent.css +10 -5
  37. package/styles/image-editor/highcontrast-light.css +10 -5
  38. package/styles/image-editor/highcontrast.css +10 -5
  39. package/styles/image-editor/material-dark.css +10 -13
  40. package/styles/image-editor/material.css +10 -8
  41. package/styles/image-editor/tailwind-dark.css +10 -5
  42. package/styles/image-editor/tailwind.css +10 -5
  43. package/styles/material-dark.css +10 -13
  44. package/styles/material.css +10 -8
  45. package/styles/tailwind-dark.css +10 -5
  46. package/styles/tailwind.css +10 -5
  47. package/styles/image-editor/_material3-definition.scss +0 -11
@@ -2,9 +2,9 @@ import { Component, INotifyPropertyChanged } from '@syncfusion/ej2-base';
2
2
  import { EmitType } from '@syncfusion/ej2-base';
3
3
  import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';
4
4
  import { ChildProperty } from '@syncfusion/ej2-base';
5
- import { ImageEditorModel, FinetuneSettingsModel } from './image-editor-model';
5
+ import { ImageEditorModel, FinetuneSettingsModel, ZoomSettingsModel } from './image-editor-model';
6
6
  /**
7
- * Interface for image finetune values.
7
+ * This interface is used to specify settings for image finetuning operations, including minimum and maximum values, as well as default values.
8
8
  */
9
9
  export interface ImageFinetuneValue {
10
10
  /**
@@ -27,70 +27,158 @@ export interface ImageFinetuneValue {
27
27
  defaultValue: number;
28
28
  }
29
29
  /**
30
- * Interface for image finetune values.
30
+ * This interface is used to specify settings for finetuning operations on images, including brightness, contrast, hue, saturation, exposure, opacity, and blur. It includes properties for setting minimum and maximum values for each of these options, as well as a default value.
31
31
  */
32
32
  export declare class FinetuneSettings extends ChildProperty<FinetuneSettings> {
33
33
  /**
34
- * Specifies the brightness level of image.
34
+ * Represents a finetune setting for adjusting the brightness of an image.
35
35
  *
36
+ * @type {ImageFinetuneValue}
37
+ *
38
+ * @property {number} value - The brightness level of the image, from -100 to 100.
39
+ * @property {number} min - The minimum brightness value allowed, typically -100.
40
+ * @property {number} max - The maximum brightness value allowed, typically 100.
36
41
  * @default null
37
42
  */
38
43
  brightness: ImageFinetuneValue;
39
44
  /**
40
- * Specifies the contrast level image.
45
+ * Represents a finetune setting for adjusting the contrast of an image.
46
+ *
47
+ * @type {ImageFinetuneValue}
41
48
  *
49
+ * @property {number} value - The contrast level of the image, from -100 to 100.
50
+ * @property {number} min - The minimum contrast value allowed, typically -100.
51
+ * @property {number} max - The maximum contrast value allowed, typically 100.
42
52
  * @default null
43
53
  */
44
54
  contrast: ImageFinetuneValue;
45
55
  /**
46
- * Specifies the hue level image.
56
+ * Represents a finetune setting for adjusting the hue of an image.
47
57
  *
58
+ * @type {ImageFinetuneValue}
59
+ *
60
+ * @property {number} value - The hue level of the image, from 0 to 100.
61
+ * @property {number} min - The minimum hue value allowed, typically 0.
62
+ * @property {number} max - The maximum hue value allowed, typically 100.
48
63
  * @default null
49
64
  */
50
65
  hue: ImageFinetuneValue;
51
66
  /**
52
- * Specifies the saturation level image.
67
+ * Represents a finetune setting for adjusting the saturation of an image.
68
+ *
69
+ * @type {ImageFinetuneValue}
53
70
  *
71
+ * @property {number} value - The saturation level of the image, from -100 to 100.
72
+ * @property {number} min - The minimum saturation value allowed, typically -100.
73
+ * @property {number} max - The maximum saturation value allowed, typically 100.
54
74
  * @default null
55
75
  */
56
76
  saturation: ImageFinetuneValue;
57
77
  /**
58
- * Specifies the exposure level image.
78
+ * Represents a finetune setting for adjusting the exposure of an image.
59
79
  *
80
+ * @type {ImageFinetuneValue}
81
+ *
82
+ * @property {number} value - The exposure level of the image, from -100 to 100.
83
+ * @property {number} min - The minimum exposure value allowed, typically -100.
84
+ * @property {number} max - The maximum exposure value allowed, typically 100.
60
85
  * @default null
61
86
  */
62
87
  exposure: ImageFinetuneValue;
63
88
  /**
64
- * Specifies the opacity level image.
89
+ * Represents a finetune setting for adjusting the opacity of an image.
90
+ *
91
+ * @type {ImageFinetuneValue}
65
92
  *
93
+ * @property {number} value - The opacity level of the image, from 0 to 100.
94
+ * @property {number} min - The minimum opacity value allowed, typically 0.
95
+ * @property {number} max - The maximum opacity value allowed, typically 100.
66
96
  * @default null
67
97
  */
68
98
  opacity: ImageFinetuneValue;
69
99
  /**
70
- * Specifies the blur level image.
100
+ * Represents a finetune setting for adjusting the blur of an image.
71
101
  *
102
+ * @type {ImageFinetuneValue}
103
+ *
104
+ * @property {number} value - The blur level of the image, from 0 to 100.
105
+ * @property {number} min - The minimum blur value allowed, typically 0.
106
+ * @property {number} max - The maximum blur value allowed, typically 100.
72
107
  * @default null
73
108
  */
74
109
  blur: ImageFinetuneValue;
75
110
  }
76
111
  /**
77
- * Image Editor is a graphical user interface that helps to edit an image by performing actions like selection,
78
- * cropping, rotating, inserting text and shapes (rectangles, ellipses, lines), and drawing free hand on top of an image.
112
+ * An interface used to define the settings such as minimum, maximum, and default zoom factors, and the type of zooming which are available in the image editor control.
113
+ */
114
+ export declare class ZoomSettings extends ChildProperty<ZoomSettings> {
115
+ /**
116
+ * Specifies the available options for zooming in an image editor control.
117
+ *
118
+ * @remarks
119
+ * Use this property to enable or disable specific types of zooming in the image editor. The following zooming options are available:
120
+ * MouseWheel: Zooming is performed by scrolling the mouse wheel up and down.
121
+ * Pinch: Zooming is performed using pinch gestures on touch-enabled devices.
122
+ * Commands: Zooming is performed by clicking the CTRL key and either the plus (+) or minus (-) buttons on the keyboard.
123
+ * Toolbar: Zooming is performed using toolbar buttons.
124
+ *
125
+ * By default, this property is set to `null`, which enables all types of zooming.
126
+ *
127
+ * @default null
128
+ */
129
+ zoomTrigger: ZoomTrigger;
130
+ /**
131
+ * Specifies the minimum zooming level to limit the zooming.
132
+ * An integer value that specifies the minimum zooming level. And the default value is 1 (100%).
133
+ *
134
+ * @private
135
+ * @remarks
136
+ * The given value is considered as percentage.
137
+ *
138
+ */
139
+ minZoomFactor: number;
140
+ /**
141
+ * Specifies the maximum zooming level to limit the zooming.
142
+ * An integer value that specifies the maximum zooming level. And the default value is 10 (1000 percent).
143
+ *
144
+ * @remarks
145
+ * The given value is considered as percentage.
146
+ *
147
+ */
148
+ maxZoomFactor: number;
149
+ /**
150
+ * Specifies the default zoom factor to be applied on initial loading of image.
151
+ * An integer value that specifies the current zooming level. And the default value is 1 (100 percent).
152
+ *
153
+ * @remarks
154
+ * The given value is considered as percentage.
155
+ *
156
+ */
157
+ zoomFactor: number;
158
+ /**
159
+ * Specifies the point in which the zooming has been performed in the image editor.
160
+ * A point value that specifies the current zooming point.
161
+ * And the default value is null, and it can be considered as center point of the image editor.
162
+ *
163
+ * @remarks
164
+ * The given value is a point object which has x and y coordinates.
165
+ *
166
+ */
167
+ zoomPoint: Point;
168
+ }
169
+ /**
170
+ * The Image Editor is a graphical user interface for editing images.
171
+ *
172
+ * @remarks
173
+ * The Image Editor component provides various image editing features such as zooming, cropping, rotating, inserting text and shapes (rectangles, ellipses, and lines), drawing freehand on top of an image, undo/redo, and more.
174
+ *
175
+ * {% codeBlock src='image-editor/default/index.md' %}{% endcodeBlock %}
79
176
  *
80
- ```html
81
- * <div id='imageeditor'></div>
82
- * ```
83
- * ```typescript
84
- * <script>
85
- * var imageObj = new ImageEditor({});
86
- * imageObj.appendTo("#imageeditor");
87
- * </script>
88
- * ```
89
177
  */
90
178
  export declare class ImageEditor extends Component<HTMLDivElement> implements INotifyPropertyChanged {
91
179
  /**
92
180
  *
93
- * ImageEditor Private Properties
181
+ * Image Editor Private Properties
94
182
  */
95
183
  private lowerCanvas;
96
184
  private lowerContext;
@@ -138,7 +226,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
138
226
  private l10n;
139
227
  private themeColl;
140
228
  private toolbarFn;
141
- private isTimer;
229
+ private quickAccessToolbarFn;
142
230
  private timer;
143
231
  private tempObjColl;
144
232
  private isFirstMove;
@@ -152,7 +240,6 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
152
240
  private currentFilter;
153
241
  private tempFilter;
154
242
  private canvasFilter;
155
- private tempUndoRedoColl;
156
243
  private tempUndoRedoStep;
157
244
  private zoomFactor;
158
245
  private tempZoomFactor;
@@ -165,6 +252,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
165
252
  private srcWidth;
166
253
  private srcHeight;
167
254
  private currSelectionPoint;
255
+ private currDestinationPoint;
168
256
  private cropDestPoints;
169
257
  private panDown;
170
258
  private panMove;
@@ -203,12 +291,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
203
291
  private isFreehandDrawing;
204
292
  private tempFreehandCounter;
205
293
  private tempActObj;
206
- private lastPan;
207
294
  private selectedFreehandColor;
208
295
  private isFreehandDrawCustomized;
209
- private isShapeInserted;
210
296
  private isAllowCropPan;
211
- private tempPannedPoint;
212
297
  private cropObj;
213
298
  private afterCropActions;
214
299
  private isCancelAction;
@@ -222,23 +307,40 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
222
307
  private cancelObjColl;
223
308
  private cancelPointColl;
224
309
  private rotatedFlipCropSelection;
310
+ private freehandDrawSelectedId;
311
+ private transformCurrentObj;
312
+ private currToolbar;
313
+ private currentMouseMovePoint;
314
+ private previousCropCurrentObj;
315
+ private zoomBtnHold;
316
+ private zoomType;
317
+ private cursorTargetObjId;
318
+ private appliedUndoRedoColl;
319
+ private selPoints;
320
+ private selPointColl;
321
+ private prevActObj;
322
+ private tempCurrSelectionPoint;
323
+ private previousZoomValue;
324
+ private initialZoomValue;
325
+ private isObjSelected;
326
+ private isShapeInserted;
327
+ private isInitialTextEdited;
328
+ private isShapeTextInserted;
225
329
  /**
226
- * Defines class/multiple classes separated by a space for customizing Image Editor UI.
330
+ * Defines one or more CSS classes that can be used to customize the appearance of an Image Editor component.
331
+ *
332
+ * @remarks
333
+ * One or more CSS classes to customize the appearance of the Image Editor component, such as by changing its toolbar appearance, borders, sizes, or other visual aspects.
227
334
  *
228
335
  * @default ''
229
- ```html
230
- * <div id='imageeditor'></div>
231
- * ```
232
- * ```typescript
233
- * <script>
234
- * var imageObj = new ImageEditor({cssClass: 'e-custom-img-editor'});
235
- * imageObj.appendTo("#imageeditor");
236
- * </script>
237
- * ```
336
+ *
238
337
  */
239
338
  cssClass: string;
240
339
  /**
241
- * Specifies whether the Image Editor is disabled.
340
+ * Defines whether an Image Editor component is enabled or disabled.
341
+ *
342
+ * @remarks
343
+ * A disabled Image Editor component may have a different visual appearance than an enabled one. When set to “true”, the Image Editor component will be disabled, and the user will not be able to interact with it.
242
344
  *
243
345
  * @default false
244
346
  */
@@ -246,13 +348,31 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
246
348
  /**
247
349
  * Specifies the height of the Image Editor.
248
350
  *
351
+ * @remarks
352
+ * The value of height is specified either as a percentage (e.g. '100%') or as a fixed pixel value (e.g. '100px').
353
+ *
249
354
  * @default '100%'
250
355
  */
251
356
  height: string;
252
357
  /**
253
- * Specifies the theme of the Image Editor. The shape selection appearance will be decided based on this property.
254
- * The property supports all the built-in themes of Syncfusion.
255
- * default 'Bootstrap5'
358
+ * Specifies the theme of the Image Editor. The appearance of the shape selection in Image Editor is determined by this property.
359
+ *
360
+ * @remarks
361
+ * The `theme` property supports all the built-in themes of Syncfusion, including:
362
+ * - `Bootstrap5`
363
+ * - `Fluent`
364
+ * - `Tailwind`
365
+ * - `Bootstrap4`
366
+ * - `Material`
367
+ * - `Fabric`
368
+ * - `HighContrast`
369
+ * - `Bootstrap5Dark`
370
+ * - `Bootstrap4Dark`
371
+ * - `MaterialDark`
372
+ * - `FabricDark`
373
+ * - `HighContrastDark`
374
+ *
375
+ * The default value is set to `Theme.Bootstrap5`.
256
376
  *
257
377
  * @isenumeration true
258
378
  * @default Theme.Bootstrap5
@@ -261,204 +381,289 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
261
381
  */
262
382
  theme: string | Theme;
263
383
  /**
264
- * Specifies the toolbar items to perform UI interactions. It accepts both string[] and ItemModel[] to configure its toolbar items.
384
+ * Specifies the toolbar items to perform UI interactions.
385
+ * It accepts both string[] and ItemModel[] to configure its toolbar items. The default value is null.
386
+ * If the property is not defined in the control, the default toolbar will be rendered with preconfigured toolbar commands.
265
387
  * If the property is defined as empty collection, the toolbar will not be rendered.
266
- * Suppose the property is not defined in control, an image editor’s toolbar will be rendered with preconfigured toolbar commands.
267
388
  * The preconfigured toolbar commands are
268
- * Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
269
- * Annotate: help to insert a shape on image that supports rectangle, ellipse, line, text and freehand drawing with resize, drag and drop, and customize its appearance.
270
- * Transform: helps to rotate and flip an image.
271
- * ZoomIn: performs zoom-in an image.
272
- * ZoomOut: performs zoom-out an image.
273
- * Pan: performs panning once zoomed an image.
274
- * Move: disable the pan action and move to perform other actions such as insert a shape, transform, and more.
275
- * Save: save the modified image.
276
- * Open: open an image to perform editing.
277
- * Reset: reset the modification and restore the original image.
278
- *
389
+ * - Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
390
+ * - Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, text and freehand drawing with resize, drag and drop, and customize its appearance.
391
+ * - Transform: helps to rotate and flip an image.
392
+ * - Finetunes: helps to perform adjustments on an image.
393
+ * - Filters: helps to perform predefined color filters.
394
+ * - ZoomIn: performs zoom-in an image.
395
+ * - ZoomOut: performs zoom-out an image.
396
+ * - Save: save the modified image.
397
+ * - Open: open an image to perform editing.
398
+ * - Reset: reset the modification and restore the original image.
399
+ *
400
+ * @example
401
+ * // Define toolbar items as an array of strings
402
+ * var toolbarItems = ["Crop", "Annotate", "Transform", "ZoomIn", "ZoomOut", "Pan", "Move", "Save", "Open", "Reset"];
403
+ *
404
+ * // Define toolbar items as an array of ItemModel objects
405
+ * var toolbarItems = [
406
+ * { text: "Crop", tooltipText: "Crop", prefixIcon: "e-icon e-crop-icon" }
407
+ * ]
408
+ *
409
+ * @remarks
410
+ * If the toolbarTemplate property is defined in the control, the toolbar will be rendered based on the toolbarTemplate property.
279
411
  * @default null
280
- ```html
281
- * <div id='imageeditor'></div>
282
- * ```
283
- * ```typescript
284
- * <script>
285
- * var imageObj = new ImageEditor({
286
- * toolbar[Crop, ZoomIn, ZoomOut, Transform, {text: 'Custom'}]
287
- * });
288
- * imageObj.appendTo("#imageeditor");
289
- * </script>
290
- * ```
291
- */
292
- toolbar: (string | ImageEditorCommands | ItemModel)[];
293
- /**
294
- * Specifies template to the Image Editor Toolbar.
295
- * If you want to customize the entire toolbar in own way by using this property.
296
- * The property is depending on ‘toolbar’.
412
+ *
413
+ * {% codeBlock src='image-editor/toolbar/index.md' %}{% endcodeBlock %}
414
+ */
415
+ toolbar: (string | ImageEditorCommand | ItemModel)[];
416
+ /**
417
+ * Specifies a custom template for the toolbar of an image editor control.
418
+ * A string that specifies a custom template for the toolbar of the image editor. If this property is defined, the 'toolbar' property will not have any effect.
419
+ *
420
+ * @remarks
421
+ * Use this property if you want to customize the entire toolbar in your own way. The template should be a string that contains the HTML markup for the custom toolbar.
297
422
  *
298
423
  * @default null
299
- ```html
300
- * <div id='imageeditor'></div>
301
- * ```
302
- * ```typescript
303
- * <script>
304
- * var imageObj = new ImageEditor({
305
- * toolbarTemplate: '#toolbarTemplate'
306
- * });
307
- * imageObj.appendTo("#imageeditor");
308
- * </script>
309
- * <script id="toolbarTemplate" type="text/x-template">
310
- * <div class = 'e-toolbar'>
311
- * <button id= 'dltbtn'></button>
312
- * </div>
313
- * </script>
314
- * ```
424
+ *
425
+ * {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
426
+ *
315
427
  */
316
428
  toolbarTemplate: string;
317
429
  /**
318
- * Specifies the width of the Image Editor.
430
+ * Specifies the width of an Image Editor.
431
+ *
432
+ * @remarks
433
+ * The value of width is specified either as a percentage (e.g. '100%') or as a fixed pixel value (e.g. '100px').
319
434
  *
320
435
  * @default '100%'
321
436
  */
322
437
  width: string;
323
438
  /**
324
- * Specifies whether to perform undo / redo operation.
439
+ * Specifies a boolean value whether enable undo/redo operations in the image editor.
440
+ *
441
+ * @remarks
442
+ * If this property is true, the undo redo options will be enabled in toolbar and can also be accessed via keyboard shortcuts.
443
+ * If set to false, both options will be disabled.
444
+ * The undo redo history is limited to 16. Once the maximum limit is reached, the oldest history item will be removed to make space for the new item.
445
+ *
446
+ * @default true
447
+ *
448
+ */
449
+ allowUndoRedo: boolean;
450
+ /**
451
+ * Specifies whether to show/hide the Quick Access Toolbar while select the shapes.
452
+ *
453
+ * @remarks
454
+ * The Quick Access Toolbar is a small customizable toolbar that shows commonly used commands while select the shapes.
455
+ * Set this property to true to show the Quick Access Toolbar, and false to hide it.
325
456
  *
326
457
  * @default false
327
458
  * @private
459
+ *
460
+ * @remarks
461
+ * Set this property to true to show the quick access toolbar, and false to hide it.
328
462
  */
329
- allowUndoRedo: boolean;
463
+ showQuickAccessToolbar: boolean;
464
+ /**
465
+ * Specifies a custom template content for the quick access toolbar of an Image Editor control.
466
+ *
467
+ * @default null
468
+ * @private
469
+ *
470
+ * @remarks
471
+ * This property only works if the "showQuickAccessToolbar" property is set to true.
472
+ *
473
+ * {% codeBlock src='image-editor/quickAccessToolbarTemplate/index.md' %}{% endcodeBlock %}
474
+ *
475
+ */
476
+ quickAccessToolbarTemplate: string;
330
477
  /**
331
- * Gets or sets whether to prevent the interaction in signature component.
332
- * True, if the signature component is read only state where the user interaction is prevented. The default value is false.
478
+ * Specifies whether to prevent user interaction with the image editor control.
479
+ * A boolean that specifies whether to prevent the interaction in image editor control. The default value is false.
480
+ *
481
+ * @remarks
482
+ * If the property is true, the image editor control becomes read-only, and the user interaction will be prevented.
333
483
  *
334
484
  * @default false
335
485
  * @private
336
486
  */
337
487
  isReadOnly: boolean;
338
488
  /**
339
- * Specifies the Signature in RTL mode that displays the content in the right-to-left direction.
489
+ * Specifies whether to enable RTL mode in image editor control that displays the content in the right-to-left direction.
490
+ * A boolean that specifies whether to enable RTL mode in image editor control. The default value is false.
340
491
  *
341
492
  * @default false
342
493
  * @private
343
494
  */
344
495
  enableRtl: boolean;
345
496
  /**
346
- * Gets or sets whether to persist component's state between page reloads.
347
- * True, if the component's state persistence is enabled. The default value is false.
348
- * Component's property will be stored in browser local storage to persist component's state when page reloads.
497
+ * Specifies a bool value whether enable or disable persist component's state between page reloads. The default value is false.
498
+ *
499
+ * @remarks
500
+ * If this property is true, the controls's state persistence will be enabled.
501
+ * Control's property will be stored in browser local storage to persist control's state when page reloads.
349
502
  *
350
503
  * @default false
351
504
  * @private
352
505
  */
353
506
  enablePersistence: boolean;
354
507
  /**
355
- * It can be done using the filter property of the canvas. The following fine tunes can be supported.
356
- * Brightness: The intensity of the primary colors grows with increased brightness, but the color itself does not change. It can be done by changing brightness and opacity property.
357
- * Contrast: The contrast of an image refers to the difference between the light pixels and dark pixels. Low contrast images contain either a narrow range of colors while high contrast images have bright highlights and dark shadows. It can be done by changing contrast property.
358
- * Hue: Hue distinguishes one color from another and is described using common color names such as green, blue, red, yellow, etc. Value refers to the lightness or darkness of a color. It can be controlled by hue-rotate property.
359
- * Saturation: If saturation increases, colors appear sharper or purer. As saturation decreases, colors appear more washed-out or faded. It can be controlled by saturation and brightness property.
360
- * Exposure: If exposure increases, intensity of light appears brighter. As exposure decreases, intensity of light decreases. Exposure can be controlled by brightness property.
361
- * Opacity: The state or quality of being opaque or transparent, not allowing light to pass through the image. Opacity can be controlled by opacity property.
362
- * Blur : Adjusting the blur can make an image unfocused or unclear. Blur can be controlled by blur property.
508
+ * Specifies the finetune settings option which can be used to perform color adjustments in the image editor control.
509
+ *
510
+ * @remarks
511
+ * A 'FinetuneSettingsModel' value that specifies the the finetune options which are enabled in image editor control.
512
+ * If the property is not specified, then the default values will be applied for minimum, maximum, and value properties for all finetune options.
513
+ *
514
+ * The possible values are:
515
+ * - Brightness: The intensity of the primary colors grows with increased brightness, but the color itself does not change. It can be done by changing brightness and opacity property.
516
+ * - Contrast: The contrast of an image refers to the difference between the light pixels and dark pixels. Low contrast images contain either a narrow range of colors while high contrast images have bright highlights and dark shadows. It can be done by changing contrast property.
517
+ * - Hue: Hue distinguishes one color from another and is described using common color names such as green, blue, red, yellow, etc. Value refers to the lightness or darkness of a color. It can be controlled by hue-rotate property.
518
+ * - Saturation: If saturation increases, colors appear sharper or purer. As saturation decreases, colors appear more washed-out or faded. It can be controlled by saturation and brightness property.
519
+ * - Exposure: If exposure increases, intensity of light appears brighter. As exposure decreases, intensity of light decreases. Exposure can be controlled by brightness property.
520
+ * - Opacity: The state or quality of being opaque or transparent, not allowing light to pass through the image. Opacity can be controlled by opacity property.
521
+ * - Blur : Adjusting the blur can make an image unfocused or unclear. Blur can be controlled by blur property.
522
+ *
523
+ * {% codeBlock src='image-editor/finetuneSettings/index.md' %}{% endcodeBlock %}
363
524
  *
364
525
  */
365
526
  finetuneSettings: FinetuneSettingsModel;
366
527
  /**
367
- * Triggers before an image is saved.
528
+ * Specifies the zoom settings to perform zooming action.
529
+ * A 'ZoomSettingsModel' value that specifies the the zoom related options which are enabled in image editor control. The default value is null.
530
+ *
531
+ * @remarks
532
+ * If the property is not specified, then the default settings will be applied for all the properties available in zoom settings.
533
+ *
534
+ * The following options are available in `zoomSettings`.
535
+ * - minZoomFactor: Specifies the minimum zoom factor level to control the zoom.
536
+ * - maxZoomFactor: Specifies the maximum zoom factor level to control the zoom.
537
+ * - zoomFactor: Specifies the zoom factor to be applied to the image.
538
+ * - zoomTrigger: Specifies the types of zooming to be supported in the image editor.
539
+ * - zoomPoint: Specifies the x and y coordinates in which the zooming performed on initial load.
540
+ *
541
+ * {% codeBlock src='image-editor/zoomSettings/index.md' %}{% endcodeBlock %}
542
+ *
543
+ */
544
+ zoomSettings: ZoomSettingsModel;
545
+ /**
546
+ * Event callback that is raised before an image is saved.
368
547
  *
369
548
  * @event beforeSave
370
549
  */
371
550
  beforeSave: EmitType<BeforeSaveEventArgs>;
372
551
  /**
373
- * Triggers once the component rendering is completed.
552
+ * Event callback that is raised after rendering the Image Editor component.
374
553
  *
375
554
  * @event created
376
555
  */
377
556
  created: EmitType<Event>;
378
557
  /**
379
- * Triggers once the component is destroyed with its elements and bound events.
558
+ * Event callback that is raised once the component is destroyed with its elements and bound events.
380
559
  *
381
560
  * @event destroyed
382
561
  */
383
562
  destroyed: EmitType<Event>;
384
563
  /**
385
- * Triggers while zooming an image.
564
+ * Event callback that is raised while zooming an image.
386
565
  *
387
566
  * @event zooming
388
567
  */
389
568
  zooming: EmitType<ZoomEventArgs>;
390
569
  /**
391
- * Triggers while panning an image.
570
+ * Event callback that is raised while panning an image.
392
571
  *
393
572
  * @event panning
394
573
  */
395
574
  panning: EmitType<PanEventArgs>;
396
575
  /**
397
- * Triggers while cropping an image.
576
+ * Event callback that is raised while cropping an image.
398
577
  *
399
578
  * @event cropping
400
579
  */
401
580
  cropping: EmitType<CropEventArgs>;
402
581
  /**
403
- * Triggers while rotating an image.
582
+ * Event callback that is raised while rotating an image.
404
583
  *
405
584
  * @event rotating
406
585
  */
407
586
  rotating: EmitType<RotateEventArgs>;
408
587
  /**
409
- * Triggers while flipping an image.
588
+ * Event callback that is raised while flipping an image.
410
589
  *
411
590
  * @event flipping
412
591
  */
413
592
  flipping: EmitType<FlipEventArgs>;
414
593
  /**
415
- * Triggers while changing shapes in an image.
594
+ * Event callback that is raised while changing shapes in an Image Editor.
416
595
  *
417
596
  * @event shapeChanging
418
597
  */
419
598
  shapeChanging: EmitType<ShapeChangeEventArgs>;
420
599
  /**
421
- * Triggers once an image is opened.
600
+ * Event callback that is raised once an image is opened in an Image Editor.
422
601
  *
423
602
  * @event fileOpened
424
603
  */
425
604
  fileOpened: EmitType<OpenEventArgs>;
426
605
  /**
427
- * Triggers once an image is saved.
606
+ * Event callback that is raised once an image is saved.
428
607
  *
429
608
  * @event saved
430
609
  */
431
610
  saved: EmitType<SaveEventArgs>;
432
611
  /**
433
- * Triggers once the toolbar is created.
612
+ * Event callback that is raised once the toolbar is created.
434
613
  *
435
614
  * @event toolbarCreated
436
615
  */
437
616
  toolbarCreated: EmitType<ToolbarEventArgs>;
438
617
  /**
439
- * Triggers while updating/refreshing the toolbar
618
+ * Event callback that is raised while updating/refreshing the toolbar
440
619
  *
441
620
  * @event toolbarUpdating
621
+ *
622
+ * {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
623
+ *
442
624
  */
443
625
  toolbarUpdating: EmitType<ToolbarEventArgs>;
444
626
  /**
445
- * Triggers once the toolbar item is clicked.
627
+ * Event callback that is raised once the toolbar item is clicked.
446
628
  *
447
629
  * @event toolbarItemClicked
448
630
  */
449
631
  toolbarItemClicked: EmitType<ClickEventArgs>;
450
632
  /**
451
- * Triggers when applying filter to an image.
633
+ * Event callback that is raised when applying filter to an image.
452
634
  *
453
635
  * @event imageFiltering
454
636
  */
455
637
  imageFiltering: EmitType<ImageFilterEventArgs>;
456
638
  /**
457
- * Triggers when applying fine tune to an image.
639
+ * Event callback that is raised when applying fine tune to an image.
458
640
  *
459
641
  * @event finetuneValueChanging
460
642
  */
461
643
  finetuneValueChanging: EmitType<FinetuneEventArgs>;
644
+ /**
645
+ * Event callback that is raised while clicking on an image in the Image Editor.
646
+ *
647
+ * @event click
648
+ */
649
+ click: EmitType<ImageEditorClickEventArgs>;
650
+ /**
651
+ * Event callback that is triggered when the quick access toolbar is opening.
652
+ *
653
+ * @event quickAccessToolbarOpening
654
+ * @private
655
+ *
656
+ * @remarks
657
+ * Use this event to customize the toolbar items that appear in the quick access toolbar.
658
+ * To customize the toolbar items, modify the "toolbarItems" collection property of the event arguments.
659
+ * The "toolbarItems" collection contains string and ItemModel values.
660
+ * The string values representing the names of the built-in toolbar items to display.
661
+ * The ItemModel values representing the ItemModel of custom toolbar items to display.
662
+ *
663
+ * {% codeBlock src='image-editor/quickAccessToolbarOpening/index.md' %}{% endcodeBlock %}
664
+ *
665
+ */
666
+ quickAccessToolbarOpening: EmitType<QuickAccessToolbarEventArgs>;
462
667
  /**
463
668
  *
464
669
  * Constructor for creating the widget
@@ -525,11 +730,13 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
525
730
  private toPascalCase;
526
731
  private createCanvas;
527
732
  private createToolbar;
733
+ private createQuickAccessToolbar;
528
734
  private createContextualToolbar;
529
735
  private updateContextualToolbar;
530
736
  private createBottomToolbar;
531
737
  private initBottomToolbar;
532
738
  private toolbarTemplateFn;
739
+ private quickAccessToolbarTemplateFn;
533
740
  private templateParser;
534
741
  private getLeftToolbarItem;
535
742
  private getRightToolbarItem;
@@ -537,6 +744,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
537
744
  private getZoomToolbarItem;
538
745
  private processToolbar;
539
746
  private processSubToolbar;
747
+ private wireZoomBtnEvents;
540
748
  private isToolbar;
541
749
  private initToolbarItem;
542
750
  private enableDisableToolbarBtn;
@@ -570,6 +778,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
570
778
  private refreshUndoRedoColl;
571
779
  private applyPreviewFilter;
572
780
  private contextualToolbarClicked;
781
+ private zoomInBtnClickHandler;
782
+ private zoomOutBtnClickHandler;
783
+ private zoomInBtnMouseDownHandler;
784
+ private zoomOutBtnMouseDownHandler;
785
+ private zoomBtnMouseUpHandler;
573
786
  private defToolbarClicked;
574
787
  private performCancel;
575
788
  private applyShape;
@@ -578,6 +791,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
578
791
  private openSlider;
579
792
  private setTempFilterProperties;
580
793
  private okBtn;
794
+ private getZeroZoomPointCollValue;
795
+ private getZeroZoomObjValue;
796
+ private updateCurrentUndoRedoColl;
581
797
  private updateBrightnessFilter;
582
798
  private isFreehandDrawIndex;
583
799
  private deleteFreehandDraw;
@@ -593,10 +809,12 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
593
809
  private renderSlider;
594
810
  private createSlider;
595
811
  private getCurrAdjustmentValue;
812
+ private getFinetuneOption;
596
813
  private setCurrAdjustmentValue;
597
814
  private cancelPan;
598
815
  private callMainToolbar;
599
816
  private setCurrSelectionPoints;
817
+ private updatePannedRegion;
600
818
  private updateObjAndFreeHandDrawColl;
601
819
  private cancelItems;
602
820
  private freehandDownHandler;
@@ -640,8 +858,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
640
858
  private cropObjColl;
641
859
  private cropFreehandDrawColl;
642
860
  private hoverFreehandraw;
861
+ private pointsHorizontalFlip;
862
+ private pointsVerticalFlip;
643
863
  private flipFreehandrawColl;
644
864
  private rotateFreehandDrawColl;
865
+ private updateCursorPointsForFreehandDrawing;
645
866
  private zoomFreehandDrawColl;
646
867
  private zoomX;
647
868
  private zoomY;
@@ -651,7 +872,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
651
872
  private clearOuterCanvas;
652
873
  private cropCircle;
653
874
  private updateCropObj;
654
- private setCropObj;
875
+ private setCurrentObj;
655
876
  private drawCropSelectionImage;
656
877
  private cropImg;
657
878
  private updateImageRatioForActObj;
@@ -667,6 +888,8 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
667
888
  private resetPanPoints;
668
889
  private flipCrop;
669
890
  private rotateCrop;
891
+ private getCurrentCropState;
892
+ private isInitialRotate;
670
893
  private updateRotatePanPoints;
671
894
  private rotatePan;
672
895
  private rotateZoom;
@@ -677,6 +900,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
677
900
  private refreshActiveObj;
678
901
  private redrawText;
679
902
  private setTextSelection;
903
+ private getCurrentObj;
680
904
  private updateUndoRedoColl;
681
905
  private fileSelect;
682
906
  private findTextPoint;
@@ -688,24 +912,39 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
688
912
  private getDistance;
689
913
  private setXYPoints;
690
914
  private touchStartHandler;
915
+ private getCurrentIndex;
916
+ private isShapeClick;
691
917
  private isShapeTouch;
692
918
  private isFreehandDrawTouch;
693
919
  private selectFreehandDraw;
694
920
  private closeContextualToolbar;
921
+ private applyObj;
922
+ private applyCurrShape;
695
923
  private mouseDownEventHandler;
696
924
  private mouseMoveEventHandler;
697
925
  private mouseUpEventHandler;
926
+ private getSquarePointForFreehandDraw;
927
+ private getQuickAccessToolbarItem;
928
+ private renderQuickAccessToolbar;
929
+ private deleteItem;
698
930
  private keyDownEventHandler;
699
931
  private keyUpEventHandler;
700
932
  private canvasMouseDownHandler;
701
933
  private canvasMouseMoveHandler;
702
934
  private canvasMouseUpHandler;
703
935
  private handleScroll;
936
+ private performPointZoom;
937
+ private adjustPanning;
938
+ private drawZoomPanImage;
704
939
  private textKeyDown;
705
940
  private adjustToScreen;
706
941
  private screenOrientation;
707
942
  private windowResizeHandler;
943
+ private alignTextAreaIntoCanvas;
944
+ private refreshMainToolbar;
708
945
  private updatePreviousShapeSettings;
946
+ private zoomAction;
947
+ private getCurrentZoomFactor;
709
948
  private disableZoomOutBtn;
710
949
  private setZoomDimension;
711
950
  private applyCurrActObj;
@@ -715,6 +954,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
715
954
  private setTextBoxPos;
716
955
  private setTextBoxPoints;
717
956
  private findTextTarget;
957
+ private renderTextArea;
718
958
  private selectedText;
719
959
  private setTextBoxHeight;
720
960
  private setTextBoxWidth;
@@ -723,7 +963,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
723
963
  private setDragHeight;
724
964
  private triggerShapeChange;
725
965
  private updateActivePoint;
966
+ private updateArrowDirection;
726
967
  private preventDraggingInvertly;
968
+ private preventTextDraggingInvertly;
727
969
  private updateNWPoints;
728
970
  private updateNPoints;
729
971
  private updateNEPoints;
@@ -742,10 +984,10 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
742
984
  private shapeCircle;
743
985
  private drawOuterSelection;
744
986
  private drawObject;
745
- private rotateShape;
746
987
  private updateActiveObject;
747
988
  private drawShapeObj;
748
989
  private shapeLine;
990
+ private shapeArrow;
749
991
  private shapeText;
750
992
  private updateActPoint;
751
993
  private drawSquareLines;
@@ -756,6 +998,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
756
998
  private getCurrentFlipState;
757
999
  private rotateDegree;
758
1000
  private updateCursorStyles;
1001
+ private updateCursorStylesForArrow;
759
1002
  private drawCropRatio;
760
1003
  private setDragDirection;
761
1004
  private updatePoints;
@@ -784,11 +1027,15 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
784
1027
  private redrawObj;
785
1028
  private updateCurrentActiveObjPoint;
786
1029
  private rotateObjColl;
787
- private setTextFontSize;
788
1030
  private redrawShape;
789
1031
  private applyActObj;
1032
+ private destroyQuickAccessToolbar;
790
1033
  private apply;
791
1034
  private setCenterPoints;
1035
+ private updateTriangleRatio;
1036
+ private updateTrianglePoints;
1037
+ private setDimension;
1038
+ private updateUndoRedo;
792
1039
  private drawShape;
793
1040
  private drawShapeText;
794
1041
  private updateShapeChangeEventArgs;
@@ -798,6 +1045,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
798
1045
  private clearActObj;
799
1046
  private applyPenDraw;
800
1047
  private drawRotatedImage;
1048
+ private updateCurrSelectionPoint;
801
1049
  private setClientTransformedDimension;
802
1050
  private popForDefaultTransformedState;
803
1051
  private popForDefaultFlipState;
@@ -824,45 +1072,74 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
824
1072
  private setFilter;
825
1073
  private renderImage;
826
1074
  private updateTextBox;
1075
+ private drawNewSelection;
1076
+ private setDestPointsForFlipState;
1077
+ private performUndoDefaultAction;
827
1078
  private setAdjustment;
828
1079
  private updateFilter;
829
- private drawNewSelection;
1080
+ private rotateImage;
1081
+ private flipImage;
1082
+ private componentToHex;
1083
+ private rgbToHex;
830
1084
  /**
831
- * Clear a current selection.
1085
+ * Clears the current selection performed in the image editor.
832
1086
  *
833
1087
  * @returns {void}.
834
1088
  */
835
1089
  clearSelection(): void;
836
1090
  /**
837
- * Crops an image based on the selection.
838
- * The selection can be done through programmatically using the select method or through UI interactions.
1091
+ * Crops an image based on the selection done in the image editor.
1092
+ *
1093
+ * @remarks
1094
+ * The selection can be done through programmatically using the 'select' method or through UI interactions.
839
1095
  *
840
1096
  * @returns {boolean}.
1097
+ *
1098
+ * {% codeBlock src='image-editor/crop/index.md' %}{% endcodeBlock %}
1099
+ *
841
1100
  */
842
1101
  crop(): boolean;
843
1102
  /**
844
- * Flips an image by horizontally or vertically.
1103
+ * Flips an image by horizontally or vertically in the image editor.
1104
+ *
1105
+ * @param { Direction } direction - Specifies the direction to flip the image.
1106
+ * A horizontal direction for horizontal flipping and vertical direction for vertical flipping.
1107
+ *
1108
+ * @remarks
1109
+ * It flips the shapes including rectangle, circle, line, text, and freehand drawings.
845
1110
  *
846
- * @param {Direction } direction - Specifies the direction to flip the image.
847
1111
  * @returns {void}.
1112
+ *
1113
+ * {% codeBlock src='image-editor/zoom/index.md' %}{% endcodeBlock %}
1114
+ *
848
1115
  */
849
1116
  flip(direction: Direction): void;
850
1117
  /**
851
- * Return an image as ImageData.
1118
+ * Returns an image as ImageData to load it in to a canvas.
1119
+ *
1120
+ * @remarks
1121
+ * The data returned from this method is directly drawn in a canvas using 'putImageData' method.
1122
+ * And then the user can get the base64 string from the canvas using toDataURL method.
852
1123
  *
853
1124
  * @returns {ImageData}.
854
1125
  */
855
1126
  getImageData(): ImageData;
856
1127
  /**
857
- * Load/opens an image for editing within an image editor.
1128
+ * Opens an image as URL or ImageData for editing in an image editor.
1129
+ *
1130
+ * @param {string | ImageData } data - Specifies url of the image or image data.
858
1131
  *
859
- * @param {string | ImageData } data - Specifies url of the Image or image data.
1132
+ * @remarks
1133
+ * The supported file types are JPG, JPEG, PNG, and SVG.
860
1134
  *
861
1135
  * @returns {void}.
862
1136
  */
863
1137
  open(data: string | ImageData): void;
864
1138
  /**
865
- * Reset all the changes and revert to original image.
1139
+ * Reset all the changes done in an image editor and revert to original image.
1140
+ *
1141
+ * @remarks
1142
+ * The undo redo collection also cleared while resetting the image editor.
866
1143
  *
867
1144
  * @returns {void}.
868
1145
  */
@@ -871,9 +1148,15 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
871
1148
  * Rotate an image to clockwise and anti-clockwise.
872
1149
  *
873
1150
  * @param {number} degree - Specifies a degree to rotate an image.
874
- * positive integer value for clockwise and negative integer value for anti-clockwise rotation.
1151
+ * A positive integer value for clockwise and negative integer value for anti-clockwise rotation.
1152
+ *
1153
+ * @remarks
1154
+ * It rotated the shapes including rectangle, circle, line, text, and freehand drawings.
875
1155
  *
876
1156
  * @returns {boolean}.
1157
+ *
1158
+ * {% codeBlock src='image-editor/rotate/index.md' %}{% endcodeBlock %}
1159
+ *
877
1160
  */
878
1161
  rotate(degree: number): boolean;
879
1162
  /**
@@ -882,6 +1165,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
882
1165
  * @param {string} type - Specifies a format of image to be saved.
883
1166
  * @param {string} fileName – Specifies a file name to be saved
884
1167
  *
1168
+ * @remarks
1169
+ * The supported file types are JPG, JPEG, PNG, and SVG.
1170
+ *
885
1171
  * @returns {void}.
886
1172
  */
887
1173
  export(type?: string, fileName?: string): void;
@@ -893,26 +1179,20 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
893
1179
  * @param {number} startY – Specifies the start y-coordinate point of the selection.
894
1180
  * @param {number} width - Specifies the width of the selection area.
895
1181
  * @param {number} height - Specifies the height of the selection area.
1182
+ *
1183
+ * @remarks
1184
+ * The selection UI is based on the 'theme' property.
1185
+ *
896
1186
  * @returns {void}.
897
- * ```html
898
- * <div id='imageeditor'></div>
899
- * ```
900
- * ```typescript
901
- * <script>
902
- * var imageObj = new ImageEditor({
903
- * created : () => {
904
- * imageObj.select('16:9', 10, 10);
905
- * }
906
- * });
907
- * imageObj.appendTo("#imageeditor");
908
- * </script>
909
- * ```
1187
+ *
1188
+ * {% codeBlock src='image-editor/select/index.md' %}{% endcodeBlock %}
1189
+ *
910
1190
  */
911
1191
  select(type: string, startX?: number, startY?: number, width?: number, height?: number): void;
912
1192
  /**
913
- * Enable or disable a freehand drawing in an Image Editor.
1193
+ * Enable or disable a freehand drawing option in an Image Editor.
914
1194
  *
915
- * @param {boolean} value - Specifies a value whether enable or disable freehand drawing.
1195
+ * @param {boolean} value - Specifies a value whether to enable or disable freehand drawing.
916
1196
  *
917
1197
  * @returns {void}.
918
1198
  * @private
@@ -921,9 +1201,12 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
921
1201
  /**
922
1202
  * Enable or disable a freehand drawing in an Image Editor.
923
1203
  *
924
- * @param {boolean} value - Specifies a value whether enable or disable freehand drawing.
1204
+ * @param {boolean} value - Specifies a value whether to enable or disable freehand drawing.
925
1205
  *
926
- * @returns {void}.
1206
+ * @remarks
1207
+ * User can directly drawing on a canvas after enabling this option.
1208
+ *
1209
+ * @returns {void}.
927
1210
  */
928
1211
  freehandDraw(value: boolean): void;
929
1212
  /**
@@ -931,42 +1214,39 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
931
1214
  *
932
1215
  * @param {boolean} value - Specifies a value whether enable or disable panning.
933
1216
  *
1217
+ * @remarks
1218
+ * This option will take into effect once the image's visibility is hidden when zooming an image or selection has been performed.
1219
+ *
934
1220
  * @returns {void}.
935
1221
  */
936
1222
  pan(value: boolean): void;
937
- private setDestPointsForFlipState;
938
1223
  /**
939
- * Increase / Decrease the magnification of an image.
1224
+ * Zoom in or out on a point in the image editor.
1225
+ *
1226
+ * @param {number} zoomFactor - The percentage-based zoom factor to use (e.g. 20 for 2x zoom).
1227
+ * @param {Point} zoomPoint - The point in the image editor to zoom in/out on.
1228
+ *
1229
+ * @remarks
1230
+ * Zooming directly enables the panning option when the image's visibility is hidden.
1231
+ * User can disable it by using 'Pan' method.
1232
+ * @returns {void}
940
1233
  *
941
- * @param {boolean} value - Specifies a value to be zoomed on the image.
942
- * @returns {void}.
943
1234
  */
944
- zoom(value: number): void;
1235
+ zoom(zoomFactor: number, zoomPoint?: Point): void;
945
1236
  /**
946
1237
  * Draw ellipse on an image.
947
1238
  *
948
1239
  * @param {number} x - Specifies x-coordinate of ellipse.
949
1240
  * @param {number} y - Specifies y-coordinate of ellipse.
950
- * @param {number} radiusX - the radius x point for the ellipse.
951
- * @param {number} radiusY - the radius y point for the ellipse.
952
- * @param {number} strokeWidth - the stroke width of ellipse.
953
- * @param {string} strokeColor - the stroke color of ellipse.
954
- * @param {string} fillColor - the fill color of the ellipse.
1241
+ * @param {number} radiusX - Specifies the radius x point for the ellipse.
1242
+ * @param {number} radiusY - Specifies the radius y point for the ellipse.
1243
+ * @param {number} strokeWidth - Specifies the stroke width of ellipse.
1244
+ * @param {string} strokeColor - Specifies the stroke color of ellipse.
1245
+ * @param {string} fillColor - Specifies the fill color of the ellipse.
955
1246
  * @returns {boolean}.
956
1247
  *
957
- * ```html
958
- * <div id='imageeditor'></div>
959
- * ```
960
- * ```typescript
961
- * <script>
962
- * * var imageObj = new ImageEditor({
963
- * created: () => {
964
- * imageObj.drawEllipse(10, 10, 40, 60);
965
- * }
966
- * });
967
- * imageObj.appendTo("#imageeditor");
968
- * </script>
969
- * ```
1248
+ * {% codeBlock src='image-editor/ellipse/index.md' %}{% endcodeBlock %}
1249
+ *
970
1250
  */
971
1251
  drawEllipse(x?: number, y?: number, radiusX?: number, radiusY?: number, strokeWidth?: number, strokeColor?: string, fillColor?: string): boolean;
972
1252
  /**
@@ -981,6 +1261,19 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
981
1261
  * @returns {boolean}.
982
1262
  */
983
1263
  drawLine(startX?: number, startY?: number, endX?: number, endY?: number, strokeWidth?: number, strokeColor?: string): boolean;
1264
+ /**
1265
+ * Draw arrow on an image.
1266
+ *
1267
+ * @param {number} startX – Specifies start point x-coordinate of arrow.
1268
+ * @param {number} startY – Specifies start point y-coordinate of arrow.
1269
+ * @param {number} endX - Specifies end point x-coordinates of arrow.
1270
+ * @param {number} endY - Specifies end point y-coordinates of the arrow.
1271
+ * @param {number} strokeWidth - Specifies the stroke width of arrow.
1272
+ * @param {string} strokeColor - Specifies the stroke color of arrow.
1273
+ * @returns {boolean}.
1274
+ * @private
1275
+ */
1276
+ drawArrow(startX?: number, startY?: number, endX?: number, endY?: number, strokeWidth?: number, strokeColor?: string): boolean;
984
1277
  /**
985
1278
  * Draw a rectangle on an image.
986
1279
  *
@@ -990,7 +1283,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
990
1283
  * @param {number} height - Specifies the height of the rectangle.
991
1284
  * @param {number} strokeWidth - Specifies the stroke width of rectangle.
992
1285
  * @param {string} strokeColor - Specifies the stroke color of rectangle.
993
- * @param {string} fillColor - the fill color of the rectangle.
1286
+ * @param {string} fillColor - Specifies the fill color of the rectangle.
994
1287
  * @returns {boolean}.
995
1288
  */
996
1289
  drawRectangle(x?: number, y?: number, width?: number, height?: number, strokeWidth?: number, strokeColor?: string, fillColor?: string): boolean;
@@ -1007,60 +1300,30 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1007
1300
  * @param {string} color - Specifies font color of the text.
1008
1301
  * @returns {boolean}.
1009
1302
  *
1010
- * ```html
1011
- * <div id='imageeditor'></div>
1012
- * ```
1013
- * ```typescript
1014
- * <script>
1015
- * var imageObj = new ImageEditor({
1016
- * created: () => {
1017
- * imageObj.drawText(10, 10, 'Syncfusion', 'Arial', 12, true, true, '#000');
1018
- * }
1019
- * });
1020
- * imageObj.appendTo("#imageeditor");
1021
- *
1022
- * </script>
1023
- * ```
1303
+ * {% codeBlock src='image-editor/text/index.md' %}{% endcodeBlock %}
1304
+ *
1024
1305
  */
1025
1306
  drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string): boolean;
1026
1307
  /**
1027
- * Selects a shape based on the given shape id. The id can be got from the public method ‘getShapeSettings’.
1308
+ * Select a shape based on the given shape id.
1309
+ * Use 'getShapeSettings' method to get the shape id which is then passed to perform selection.
1028
1310
  *
1029
1311
  * @param {string} id - Specifies the shape id to select a shape on an image.
1030
1312
  * @returns {boolean}.
1031
- * ```html
1032
- * <div id='imageeditor'></div>
1033
- * ```
1034
- * ```typescript
1035
- * <script>
1036
- * var imageObj = new ImageEditor({
1037
- * created: () => {
1038
- * imageObj.selectShape('shape_1');
1039
- * }
1040
- * });
1041
- * imageObj.appendTo("#imageeditor");
1042
- * </script>
1043
- * ```
1313
+ *
1314
+ * {% codeBlock src='image-editor/selectShape/index.md' %}{% endcodeBlock %}
1315
+ *
1044
1316
  */
1045
1317
  selectShape(id: string): boolean;
1046
1318
  /**
1047
- * Deletes a shape based on the given shape id. The id can be got from the public method getShapeSettings.
1319
+ * Deletes a shape based on the given shape id.
1320
+ * Use 'getShapeSettings' method to get the shape id which is then passed to perform selection.
1048
1321
  *
1049
1322
  * @param {string} id - Specifies the shape id to delete the shape on an image.
1050
1323
  * @returns {void}.
1051
- * ```html
1052
- * <div id='imageeditor'></div>
1053
- * ```
1054
- * ```typescript
1055
- * <script>
1056
- * var imageObj = new ImageEditor({
1057
- * created: () => {
1058
- * imageObj.deleteShape('shape_1');
1059
- * }
1060
- * });
1061
- * imageObj.appendTo("#imageeditor");
1062
- * </script>
1063
- * ```
1324
+ *
1325
+ * {% codeBlock src='image-editor/deleteShape/index.md' %}{% endcodeBlock %}
1326
+ *
1064
1327
  */
1065
1328
  deleteShape(id: string): void;
1066
1329
  /**
@@ -1068,19 +1331,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1068
1331
  *
1069
1332
  * @param {string} id - Specifies the shape id on an image.
1070
1333
  * @returns {ShapeSettings}.
1071
- * ```html
1072
- * <div id='imageeditor'></div>
1073
- * ```
1074
- * ```typescript
1075
- * <script>
1076
- * var imageObj = new ImageEditor({
1077
- * created: () => {
1078
- * imageObj.getShapeSetting('shape_1');
1079
- * }
1080
- * });
1081
- * imageObj.appendTo("#imageeditor");
1082
- * </script>
1083
- * ```
1334
+ *
1335
+ * {% codeBlock src='image-editor/getShapeSetting/index.md' %}{% endcodeBlock %}
1336
+ *
1084
1337
  */
1085
1338
  getShapeSetting(id: string): ShapeSettings;
1086
1339
  /**
@@ -1096,79 +1349,269 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1096
1349
  */
1097
1350
  update(): void;
1098
1351
  /**
1099
- * To apply the filters to an image
1352
+ * Finetuning an image with the given type of finetune and its value in the image editor.
1100
1353
  *
1101
- * @param {ImageFinetuneOptions } finetuneOption - Specifies the finetune options to the image.
1354
+ * @param {ImageFinetuneOption } finetuneOption - Specifies the finetune options to be performed in the image.
1102
1355
  * @param {number } value - Specifies the value for finetuning the image.
1356
+ *
1357
+ * @remarks
1358
+ * The finetuning will not affect the shapes background and border color.
1359
+ *
1103
1360
  * @returns {void}.
1104
1361
  *
1105
1362
  */
1106
- finetuneImage(finetuneOption: ImageFinetuneOptions, value: number): void;
1363
+ finetuneImage(finetuneOption: ImageFinetuneOption, value: number): void;
1107
1364
  /**
1108
- * To apply the filters to an image
1365
+ * Filtering an image with the given type of filters.
1366
+ *
1367
+ * @param {ImageFilterOption } filterOption - Specifies the filter options to the image.
1109
1368
  *
1110
- * @param {ImageFilterOptions } filterOption - Specifies the filter options to the image.
1369
+ * @remarks
1370
+ * The filtering will not affect the shape's background and border color.
1111
1371
  * @returns {void}.
1112
1372
  */
1113
- applyImageFilter(filterOption: ImageFilterOptions): void;
1373
+ applyImageFilter(filterOption: ImageFilterOption): void;
1114
1374
  /**
1115
- * Undo the last user action.
1375
+ * Reverse the last action which performed by the user in the Image Editor.
1376
+ *
1377
+ * @remarks
1378
+ * This method will take into effect once the 'allowUndoRedo' property is enabled.
1116
1379
  *
1117
- * @private
1118
1380
  * @returns {void}.
1119
1381
  */
1120
1382
  undo(): void;
1121
1383
  /**
1122
- * Redo the last user action.
1384
+ * Redo the last user action that was undone by the user or `undo` method.
1123
1385
  *
1124
- * @private
1386
+ * @remarks
1387
+ * This method will take into effect once the 'allowUndoRedo' property is enabled.
1125
1388
  * @returns {void}.
1126
1389
  */
1127
1390
  redo(): void;
1391
+ /**
1392
+ * Get the dimension of an image in the image editor such as x, y, width, and height.
1393
+ * The method helps to get dimension after cropped an image.
1394
+ *
1395
+ * @returns {Dimension}.
1396
+ * A Dimension object containing the x, y, width, and height of an image.
1397
+ */
1398
+ getImageDimension(): Dimension;
1399
+ }
1400
+ /**
1401
+ * An enum representing the file types supported by the image editor.
1402
+ *
1403
+ * @enum {string}
1404
+ */
1405
+ export declare enum FileType {
1406
+ /** The PNG file type. */
1407
+ Png = "Png",
1408
+ /** The JPEG file type. */
1409
+ Jpeg = "Jpeg",
1410
+ /** The SVG file type. */
1411
+ Svg = "Svg"
1128
1412
  }
1129
1413
  /**
1130
- * Defines the Image Editor file type.
1414
+ * An enumeration representing the direction of an image editor operation.
1415
+ *
1416
+ * @enum {string}
1131
1417
  */
1132
- export declare type FileType = 'Png' | 'Jpeg' | 'Svg';
1418
+ export declare enum Direction {
1419
+ /** The horizontal direction. */
1420
+ Horizontal = "Horizontal",
1421
+ /** The vertical direction. */
1422
+ Vertical = "Vertical"
1423
+ }
1133
1424
  /**
1134
- * Defines the direction to flip the image on Image Editor.
1425
+ * An enumeration representing the type of shape to be added in the image editor.
1426
+ *
1427
+ * @enum {string}
1135
1428
  */
1136
- export declare type Direction = 'Horizontal' | 'Vertical';
1429
+ export declare enum ShapeType {
1430
+ /** A rectangle shape. */
1431
+ Rectangle = "Rectangle",
1432
+ /** An ellipse shape. */
1433
+ Ellipse = "Ellipse",
1434
+ /** A line shape. */
1435
+ Line = "Line",
1436
+ /** An arrow shape. */
1437
+ Arrow = "Arrow",
1438
+ /** A text shape. */
1439
+ Text = "Text",
1440
+ /** A freehand drawing shape. */
1441
+ FreehandDraw = "FreehandDraw"
1442
+ }
1137
1443
  /**
1138
- * Defines the Image Editor shape type.
1444
+ * An enumeration representing the different ways to trigger zooming in the image editor.
1445
+ *
1446
+ * @enum {number}
1139
1447
  */
1140
- export declare type ShapeType = 'Rectangle' | 'Ellipse' | 'Line' | 'Text' | 'FreehandDraw';
1448
+ export declare enum ZoomTrigger {
1449
+ /** Zooming triggered by mouse wheel. */
1450
+ MouseWheel = 1,
1451
+ /** Zooming triggered by pinch gesture. */
1452
+ Pinch = 2,
1453
+ /** Zooming triggered by command keys. */
1454
+ Commands = 4,
1455
+ /** Zooming triggered by toolbar button click. */
1456
+ Toolbar = 8
1457
+ }
1141
1458
  /**
1142
- * Defines the theme for Image Editor.
1459
+ * An enum representing the available themes in the image editor.
1143
1460
  */
1144
- export declare type Theme = 'Bootstrap5' | 'Bootstrap5Dark' | 'Tailwind' | 'TailwindDark' | 'Fluent' | 'FluentDark' | 'Bootstrap4' | 'Bootstrap' | 'BootstrapDark' | 'Material' | 'MaterialDark' | 'Fabric' | 'FabricDark' | 'Highcontrast';
1461
+ export declare enum Theme {
1462
+ /** The Bootstrap 5 theme. */
1463
+ Bootstrap5 = "Bootstrap5",
1464
+ /** The dark variant of the Bootstrap 5 theme. */
1465
+ Bootstrap5Dark = "Bootstrap5Dark",
1466
+ /** The Tailwind CSS theme. */
1467
+ Tailwind = "Tailwind",
1468
+ /** The dark variant of the Tailwind CSS theme. */
1469
+ TailwindDark = "TailwindDark",
1470
+ /** The Fluent UI theme. */
1471
+ Fluent = "Fluent",
1472
+ /** The dark variant of the Fluent UI theme. */
1473
+ FluentDark = "FluentDark",
1474
+ /** The Bootstrap 4 theme. */
1475
+ Bootstrap4 = "Bootstrap4",
1476
+ /** The Bootstrap theme. */
1477
+ Bootstrap = "Bootstrap",
1478
+ /** The dark variant of the Bootstrap theme. */
1479
+ BootstrapDark = "BootstrapDark",
1480
+ /** The Material Design theme. */
1481
+ Material = "Material",
1482
+ /** The dark variant of the Material Design theme. */
1483
+ MaterialDark = "MaterialDark",
1484
+ /** The Fabric theme. */
1485
+ Fabric = "Fabric",
1486
+ /** The dark variant of the Fabric theme. */
1487
+ FabricDark = "FabricDark",
1488
+ /** The high contrast theme. */
1489
+ Highcontrast = "Highcontrast"
1490
+ }
1145
1491
  /**
1146
- * Defines the toolbar items for Image Editor.
1492
+ * An enum representing the available toolbar commands in the image editor.
1147
1493
  */
1148
- export declare type ImageEditorCommands = 'Crop' | 'Transform' | 'Annotate' | 'ZoomIn' | 'ZoomOut' | 'Open' | 'Reset' | 'Save' | 'Pan' | 'Move' | 'Pen' | 'Line' | 'Rectangle' | 'Ellipse' | 'Text' | 'CustomSelection' | 'CircleSelection' | 'SquareSelection' | 'RatioSelection' | 'RotateLeft' | 'RotateRight' | 'FlipHorizontal' | 'FlipVertical';
1494
+ export declare enum ImageEditorCommand {
1495
+ Crop = "Crop",
1496
+ Transform = "Transform",
1497
+ Annotate = "Annotate",
1498
+ ZoomIn = "ZoomIn",
1499
+ ZoomOut = "ZoomOut",
1500
+ Open = "Open",
1501
+ Reset = "Reset",
1502
+ Save = "Save",
1503
+ Pan = "Pan",
1504
+ Move = "Move",
1505
+ Pen = "Pen",
1506
+ Line = "Line",
1507
+ Arrow = "Arrow",
1508
+ Rectangle = "Rectangle",
1509
+ Ellipse = "Ellipse",
1510
+ Text = "Text",
1511
+ CustomSelection = "CustomSelection",
1512
+ CircleSelection = "CircleSelection",
1513
+ SquareSelection = "SquareSelection",
1514
+ RatioSelection = "RatioSelection",
1515
+ RotateLeft = "RotateLeft",
1516
+ RotateRight = "RotateRight",
1517
+ FlipHorizontal = "FlipHorizontal",
1518
+ FlipVertical = "FlipVertical"
1519
+ }
1149
1520
  /**
1150
- * Defines the image filter options
1521
+ * An enumeration of available image filter options.
1522
+ *
1523
+ * @remarks
1524
+ * These options can be used with the `applyImageFilter` method of the image editor control to apply filters to an image.
1151
1525
  */
1152
- export declare type ImageFilterOptions = 'Default' | 'Chrome' | 'Cold' | 'Warm' | 'Grayscale' | 'Sepia' | 'Invert';
1526
+ export declare enum ImageFilterOption {
1527
+ /** Default filter */
1528
+ Default = "Default",
1529
+ /** Chrome filter */
1530
+ Chrome = "Chrome",
1531
+ /** Cold filter */
1532
+ Cold = "Cold",
1533
+ /** Warm filter */
1534
+ Warm = "Warm",
1535
+ /** Grayscale filter */
1536
+ Grayscale = "Grayscale",
1537
+ /** Sepia filter */
1538
+ Sepia = "Sepia",
1539
+ /** Invert filter */
1540
+ Invert = "Invert"
1541
+ }
1153
1542
  /**
1154
- * Defines the image filter options
1543
+ * An enumeration of available image finetune options.
1544
+ *
1545
+ * @remarks
1546
+ * These options can be used with the `finetuneImage` method of the image editor control to apply finetuning to an image.
1155
1547
  */
1156
- export declare type ImageFinetuneOptions = 'Brightness' | 'Contrast' | 'Hue' | 'Saturation' | 'Exposure' | 'Opacity' | 'Blur';
1548
+ export declare enum ImageFinetuneOption {
1549
+ /** Adjust the brightness of the image */
1550
+ Brightness = "Brightness",
1551
+ /** Adjust the contrast of the image */
1552
+ Contrast = "Contrast",
1553
+ /** Adjust the hue of the image */
1554
+ Hue = "Hue",
1555
+ /** Adjust the saturation of the image */
1556
+ Saturation = "Saturation",
1557
+ /** Adjust the exposure of the image */
1558
+ Exposure = "Exposure",
1559
+ /** Adjust the opacity of the image */
1560
+ Opacity = "Opacity",
1561
+ /** Adjust the blur of the image */
1562
+ Blur = "Blur"
1563
+ }
1157
1564
  /**
1158
- * Interface for zoom transition occur in the imageEditor.
1565
+ * The Interface which contains the properties for zoom transition occur in the Image Editor.
1159
1566
  */
1160
1567
  export interface ZoomEventArgs {
1161
1568
  /**
1162
- * Returns the (x, y) point to be zoomed.
1569
+ * Returns the point in which the zooming action was performed.
1570
+ *
1571
+ * @remarks
1572
+ * The given value is a point object which has x and y coordinates.
1573
+ *
1163
1574
  */
1164
1575
  zoomPoint: Point;
1165
1576
  /**
1166
- * Specifies the value of zooming. Zoom in or out can be defined based on the value.
1577
+ * Returns the previous zoom factor that already had before this current zooming action.
1578
+ *
1579
+ * @remarks
1580
+ * The previous and current zoom factor is used for finding whether the performed zooming is a zoom in or zoom out.
1581
+ *
1582
+ */
1583
+ previousZoomFactor: number;
1584
+ /**
1585
+ * Returns the current zoomed level, in which the loaded image is enlarged in the image editor.
1586
+ *
1587
+ * @remarks
1588
+ * The previous and current zoom factor is used for finding whether the performed zooming is a zoom in or zoom out.
1589
+ *
1590
+ */
1591
+ currentZoomFactor: number;
1592
+ /**
1593
+ * Specifies a value that indicates whether the zooming action can be canceled in image editor.
1167
1594
  */
1168
- zoomLevel: number;
1595
+ cancel: boolean;
1596
+ /**
1597
+ * Returns the type of zooming performed in the image editor.
1598
+ *
1599
+ * @remarks
1600
+ * This property is used to get the type of zooming performed in the editor.
1601
+ * The possible values of this property are 'MouseWheel', 'Pinch', 'Commands', and 'Toolbar'.
1602
+ * The value of this property will be updated each time a zoom operation is performed.
1603
+ * MouseWheel - It indicates the zooming performed using mouse wheel.
1604
+ * Pinch - It indicates that zooming is performed using pinch gestures on touch-enabled devices.
1605
+ * Commands - It indicates that zooming is performed by clicking the CTRL key and either the plus (+) or minus (-) buttons on the keyboard.
1606
+ * Toolbar - It indicates that zooming is performed using toolbar buttons.
1607
+ * By default, this property is set to 'Toolbar'.
1608
+ *
1609
+ *
1610
+ */
1611
+ zoomTrigger: string;
1169
1612
  }
1170
1613
  /**
1171
- * Interface for pan transition occur in the imageEditor.
1614
+ * The Interface which contains the properties for pan transition occur in the Image Editor.
1172
1615
  */
1173
1616
  export interface PanEventArgs {
1174
1617
  /**
@@ -1179,40 +1622,64 @@ export interface PanEventArgs {
1179
1622
  * Returns the (x, y) point to be panning ended.
1180
1623
  */
1181
1624
  endPoint: Point;
1625
+ /**
1626
+ * Defines whether to cancel the panning action of image editor.
1627
+ */
1628
+ cancel: boolean;
1182
1629
  }
1183
1630
  /**
1184
- * Interface for crop transition occur in the imageEditor.
1631
+ * The Interface which contains the properties for crop transition occur in the Image Editor.
1185
1632
  */
1186
1633
  export interface CropEventArgs {
1187
1634
  /**
1188
1635
  * Returns the start point of the crop region.
1636
+ *
1637
+ * @remarks
1638
+ * The start and end point is used get the cropping region in a image editor.
1639
+ *
1189
1640
  */
1190
1641
  startPoint: Point;
1191
1642
  /**
1192
1643
  * Returns the end point of the crop region.
1644
+ *
1645
+ * @remarks
1646
+ * The start and end point is used get the cropping region in a image editor.
1647
+ *
1193
1648
  */
1194
1649
  endPoint: Point;
1650
+ /**
1651
+ * Defines whether to cancel the cropping action of image editor.
1652
+ */
1653
+ cancel: boolean;
1195
1654
  }
1196
1655
  /**
1197
- * Interface for rotate transition in the imageEditor.
1656
+ * The Interface which contains the properties for rotate transition in the Image Editor.
1198
1657
  */
1199
1658
  export interface RotateEventArgs {
1200
1659
  /**
1201
1660
  * Returns the degree to be rotated.
1202
1661
  */
1203
1662
  degree: number;
1663
+ /**
1664
+ * Defines whether to cancel the rotating action of image editor.
1665
+ */
1666
+ cancel: boolean;
1204
1667
  }
1205
1668
  /**
1206
- * Interface for flip transition in the imageEditor.
1669
+ * The Interface which contains the properties for flip transition in the Image Editor.
1207
1670
  */
1208
1671
  export interface FlipEventArgs {
1209
1672
  /**
1210
1673
  * Returns the direction(Horizontal and vertical) to be flipped.
1211
1674
  */
1212
1675
  direction: string;
1676
+ /**
1677
+ * Defines the cancel option to cancel the flip action.
1678
+ */
1679
+ cancel: boolean;
1213
1680
  }
1214
1681
  /**
1215
- * Interface for shape change in imageEditor.
1682
+ * The Interface which contains the properties for shape change in Image Editor.
1216
1683
  */
1217
1684
  export interface ShapeChangeEventArgs {
1218
1685
  /**
@@ -1229,11 +1696,11 @@ export interface ShapeChangeEventArgs {
1229
1696
  currentShapeSettings?: ShapeSettings;
1230
1697
  }
1231
1698
  /**
1232
- * Interface for Toolbar events.
1699
+ * The Interface which contains the properties for Toolbar events.
1233
1700
  */
1234
1701
  export interface ToolbarEventArgs {
1235
1702
  /**
1236
- * Defines the cancel option to cancel the toolbar action.
1703
+ * Defines whether the to cancel the toolbar updating/refreshing action in the image editor.
1237
1704
  */
1238
1705
  cancel?: boolean;
1239
1706
  /**
@@ -1246,11 +1713,17 @@ export interface ToolbarEventArgs {
1246
1713
  item?: ItemModel;
1247
1714
  /**
1248
1715
  * Specifies the toolbar item collection to be rendered as contextual toolbar.
1716
+ *
1717
+ * @remarks
1718
+ * This property collection contains string and ItemModel values.
1719
+ * The string values representing the names of the built-in toolbar items to be displayed.
1720
+ * The ItemModel values representing the object of custom toolbar items to be displayed.
1721
+ *
1249
1722
  */
1250
1723
  toolbarItems?: (string | ItemModel)[];
1251
1724
  }
1252
1725
  /**
1253
- * Interface for opening the image.
1726
+ * The Interface which contains the properties for opening the image.
1254
1727
  */
1255
1728
  export interface OpenEventArgs {
1256
1729
  /**
@@ -1263,7 +1736,7 @@ export interface OpenEventArgs {
1263
1736
  fileType: FileType;
1264
1737
  }
1265
1738
  /**
1266
- * Interface for saving the canvas as image.
1739
+ * The Interface which contains the properties for saving the canvas as image.
1267
1740
  */
1268
1741
  export interface SaveEventArgs {
1269
1742
  /**
@@ -1276,11 +1749,11 @@ export interface SaveEventArgs {
1276
1749
  fileType: FileType;
1277
1750
  }
1278
1751
  /**
1279
- * Interface for before saving the canvas as image.
1752
+ * The Interface which contains the properties for before saving the canvas as image.
1280
1753
  */
1281
1754
  export interface BeforeSaveEventArgs {
1282
1755
  /**
1283
- * Defines the cancel option to cancel the save action.
1756
+ * Defines whether the to cancel the saving action in the image editor.
1284
1757
  */
1285
1758
  cancel: boolean;
1286
1759
  /**
@@ -1293,7 +1766,7 @@ export interface BeforeSaveEventArgs {
1293
1766
  fileType: FileType;
1294
1767
  }
1295
1768
  /**
1296
- * Interface for Point Object in the image editor.
1769
+ * The Interface which contains the properties for Point Object in the image editor.
1297
1770
  *
1298
1771
  */
1299
1772
  export interface Point {
@@ -1318,14 +1791,14 @@ export interface Point {
1318
1791
  */
1319
1792
  ratioY?: number;
1320
1793
  /**
1321
- * Gets or sets the time.
1794
+ * Specifies the time.
1322
1795
  *
1323
1796
  * @private
1324
1797
  */
1325
1798
  time?: number;
1326
1799
  }
1327
1800
  /**
1328
- * Interface for ShapeSettings in the imageEditor.
1801
+ * Interface for ShapeSettings in the Image Editor.
1329
1802
  */
1330
1803
  export interface ShapeSettings {
1331
1804
  /**
@@ -1369,7 +1842,7 @@ export interface ShapeSettings {
1369
1842
  */
1370
1843
  radius?: number;
1371
1844
  /**
1372
- * Returns the length of the line shape.
1845
+ * Returns the length of the line or arrow shape.
1373
1846
  */
1374
1847
  length?: number;
1375
1848
  /**
@@ -1400,18 +1873,122 @@ export interface ImageFilterEventArgs {
1400
1873
  /**
1401
1874
  * Specifies the when applying filter to an image.
1402
1875
  */
1403
- filter: ImageFilterOptions;
1876
+ filter: ImageFilterOption;
1877
+ /**
1878
+ * Defines the cancel option to cancel the filter action.
1879
+ */
1880
+ cancel: boolean;
1404
1881
  }
1405
1882
  /**
1406
- * Interface for filter option for the image.
1883
+ * Interface for fine tunes option for the image.
1407
1884
  */
1408
1885
  export interface FinetuneEventArgs {
1409
1886
  /**
1410
1887
  * Specifies the type of fine tunes.
1411
1888
  */
1412
- finetune: ImageFinetuneOptions;
1889
+ finetune: ImageFinetuneOption;
1413
1890
  /**
1414
1891
  * Specifies the value of the fine tunes.
1415
1892
  */
1416
1893
  value: number;
1894
+ /**
1895
+ * Defines the cancel option to cancel the fine tunes action.
1896
+ */
1897
+ cancel: boolean;
1898
+ }
1899
+ /**
1900
+ * Interface that provides information to the click event in the Image Editor.
1901
+ */
1902
+ export interface ImageEditorClickEventArgs {
1903
+ /**
1904
+ * Returns the x and y coordinates of the mouse or touch action which performed in the Image Editor.
1905
+ */
1906
+ point: Point;
1907
+ }
1908
+ /**
1909
+ * Interface for quick access toolbar for the image.
1910
+ *
1911
+ * @private
1912
+ */
1913
+ export interface QuickAccessToolbarEventArgs {
1914
+ /**
1915
+ * Specifies whether to cancel the opening action of the quick access toolbar.
1916
+ *
1917
+ * @remarks
1918
+ * Set this property to `true` to cancel the opening action of the quick access toolbar.
1919
+ * By default, this property is set to `false`.
1920
+ *
1921
+ */
1922
+ cancel: boolean;
1923
+ /**
1924
+ * Specifies the collection of toolbar items to be rendered as a quick access toolbar.
1925
+ *
1926
+ * @remarks
1927
+ * This property collection contains string and ItemModel values.
1928
+ * The string values representing the names of the built-in toolbar items to display.
1929
+ * The ItemModel values representing the object of custom toolbar items to display.
1930
+ *
1931
+ */
1932
+ toolbarItems: (string | ItemModel)[];
1933
+ /**
1934
+ * Returns the current toolbar type.
1935
+ */
1936
+ toolbarType?: string;
1937
+ }
1938
+ /**
1939
+ * Interface for Dimension calculation in the imageEditor.
1940
+ *
1941
+ */
1942
+ export interface Dimension {
1943
+ /**
1944
+ * Gets x position from the canvas.
1945
+ */
1946
+ x?: number;
1947
+ /**
1948
+ * Gets y position from the canvas.
1949
+ */
1950
+ y?: number;
1951
+ /**
1952
+ * Gets width of the image.
1953
+ */
1954
+ width: number;
1955
+ /**
1956
+ * Gets height of the image.
1957
+ */
1958
+ height: number;
1959
+ }
1960
+ /**
1961
+ * Interface for active object in the imageEditor.
1962
+ *
1963
+ * @private
1964
+ */
1965
+ export interface ActivePoint {
1966
+ /**
1967
+ * Gets mouse down x-point.
1968
+ */
1969
+ startX: number;
1970
+ /**
1971
+ * Gets mouse down y-point.
1972
+ */
1973
+ startY: number;
1974
+ /**
1975
+ * Gets mouse move x-point.
1976
+ */
1977
+ endX?: number;
1978
+ /**
1979
+ * Gets mouse move y-point.
1980
+ */
1981
+ endY?: number;
1982
+ /**
1983
+ * Gets width of the selection.
1984
+ */
1985
+ width?: number;
1986
+ /**
1987
+ * Gets height of the selection.
1988
+ */
1989
+ height?: number;
1990
+ /**
1991
+ * Gets radius of the circle dot.
1992
+ */
1993
+ radius?: number;
1417
1994
  }