@syncfusion/ej2-image-editor 20.4.51 → 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 (50) hide show
  1. package/CHANGELOG.md +12 -12
  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 +3212 -1326
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +3254 -1363
  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 +839 -273
  14. package/src/image-editor/image-editor.js +3252 -1372
  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/GitLeaksReport.json +0 -1
  48. package/gitleaks-ci/gitleaks +0 -0
  49. package/gitleaks-ci.tar.gz +0 -0
  50. 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;
@@ -204,12 +291,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
204
291
  private isFreehandDrawing;
205
292
  private tempFreehandCounter;
206
293
  private tempActObj;
207
- private lastPan;
208
294
  private selectedFreehandColor;
209
295
  private isFreehandDrawCustomized;
210
- private isShapeInserted;
211
296
  private isAllowCropPan;
212
- private tempPannedPoint;
213
297
  private cropObj;
214
298
  private afterCropActions;
215
299
  private isCancelAction;
@@ -224,25 +308,39 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
224
308
  private cancelPointColl;
225
309
  private rotatedFlipCropSelection;
226
310
  private freehandDrawSelectedId;
227
- private panStartObj;
228
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;
229
329
  /**
230
- * 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.
231
334
  *
232
335
  * @default ''
233
- ```html
234
- * <div id='imageeditor'></div>
235
- * ```
236
- * ```typescript
237
- * <script>
238
- * var imageObj = new ImageEditor({cssClass: 'e-custom-img-editor'});
239
- * imageObj.appendTo("#imageeditor");
240
- * </script>
241
- * ```
336
+ *
242
337
  */
243
338
  cssClass: string;
244
339
  /**
245
- * 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.
246
344
  *
247
345
  * @default false
248
346
  */
@@ -250,13 +348,31 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
250
348
  /**
251
349
  * Specifies the height of the Image Editor.
252
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
+ *
253
354
  * @default '100%'
254
355
  */
255
356
  height: string;
256
357
  /**
257
- * Specifies the theme of the Image Editor. The shape selection appearance will be decided based on this property.
258
- * The property supports all the built-in themes of Syncfusion.
259
- * 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`.
260
376
  *
261
377
  * @isenumeration true
262
378
  * @default Theme.Bootstrap5
@@ -265,204 +381,289 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
265
381
  */
266
382
  theme: string | Theme;
267
383
  /**
268
- * 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.
269
387
  * If the property is defined as empty collection, the toolbar will not be rendered.
270
- * Suppose the property is not defined in control, an image editor’s toolbar will be rendered with preconfigured toolbar commands.
271
388
  * The preconfigured toolbar commands are
272
- * Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
273
- * 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.
274
- * Transform: helps to rotate and flip an image.
275
- * ZoomIn: performs zoom-in an image.
276
- * ZoomOut: performs zoom-out an image.
277
- * Pan: performs panning once zoomed an image.
278
- * Move: disable the pan action and move to perform other actions such as insert a shape, transform, and more.
279
- * Save: save the modified image.
280
- * Open: open an image to perform editing.
281
- * Reset: reset the modification and restore the original image.
282
- *
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.
283
411
  * @default null
284
- ```html
285
- * <div id='imageeditor'></div>
286
- * ```
287
- * ```typescript
288
- * <script>
289
- * var imageObj = new ImageEditor({
290
- * toolbar[Crop, ZoomIn, ZoomOut, Transform, {text: 'Custom'}]
291
- * });
292
- * imageObj.appendTo("#imageeditor");
293
- * </script>
294
- * ```
295
- */
296
- toolbar: (string | ImageEditorCommands | ItemModel)[];
297
- /**
298
- * Specifies template to the Image Editor Toolbar.
299
- * If you want to customize the entire toolbar in own way by using this property.
300
- * 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.
301
422
  *
302
423
  * @default null
303
- ```html
304
- * <div id='imageeditor'></div>
305
- * ```
306
- * ```typescript
307
- * <script>
308
- * var imageObj = new ImageEditor({
309
- * toolbarTemplate: '#toolbarTemplate'
310
- * });
311
- * imageObj.appendTo("#imageeditor");
312
- * </script>
313
- * <script id="toolbarTemplate" type="text/x-template">
314
- * <div class = 'e-toolbar'>
315
- * <button id= 'dltbtn'></button>
316
- * </div>
317
- * </script>
318
- * ```
424
+ *
425
+ * {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
426
+ *
319
427
  */
320
428
  toolbarTemplate: string;
321
429
  /**
322
- * 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').
323
434
  *
324
435
  * @default '100%'
325
436
  */
326
437
  width: string;
327
438
  /**
328
- * 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.
329
456
  *
330
457
  * @default false
331
458
  * @private
459
+ *
460
+ * @remarks
461
+ * Set this property to true to show the quick access toolbar, and false to hide it.
332
462
  */
333
- 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;
334
477
  /**
335
- * Gets or sets whether to prevent the interaction in signature component.
336
- * 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.
337
483
  *
338
484
  * @default false
339
485
  * @private
340
486
  */
341
487
  isReadOnly: boolean;
342
488
  /**
343
- * 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.
344
491
  *
345
492
  * @default false
346
493
  * @private
347
494
  */
348
495
  enableRtl: boolean;
349
496
  /**
350
- * Gets or sets whether to persist component's state between page reloads.
351
- * True, if the component's state persistence is enabled. The default value is false.
352
- * 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.
353
502
  *
354
503
  * @default false
355
504
  * @private
356
505
  */
357
506
  enablePersistence: boolean;
358
507
  /**
359
- * It can be done using the filter property of the canvas. The following fine tunes can be supported.
360
- * 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.
361
- * 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.
362
- * 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.
363
- * 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.
364
- * Exposure: If exposure increases, intensity of light appears brighter. As exposure decreases, intensity of light decreases. Exposure can be controlled by brightness property.
365
- * 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.
366
- * 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 %}
367
524
  *
368
525
  */
369
526
  finetuneSettings: FinetuneSettingsModel;
370
527
  /**
371
- * 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.
372
547
  *
373
548
  * @event beforeSave
374
549
  */
375
550
  beforeSave: EmitType<BeforeSaveEventArgs>;
376
551
  /**
377
- * Triggers once the component rendering is completed.
552
+ * Event callback that is raised after rendering the Image Editor component.
378
553
  *
379
554
  * @event created
380
555
  */
381
556
  created: EmitType<Event>;
382
557
  /**
383
- * 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.
384
559
  *
385
560
  * @event destroyed
386
561
  */
387
562
  destroyed: EmitType<Event>;
388
563
  /**
389
- * Triggers while zooming an image.
564
+ * Event callback that is raised while zooming an image.
390
565
  *
391
566
  * @event zooming
392
567
  */
393
568
  zooming: EmitType<ZoomEventArgs>;
394
569
  /**
395
- * Triggers while panning an image.
570
+ * Event callback that is raised while panning an image.
396
571
  *
397
572
  * @event panning
398
573
  */
399
574
  panning: EmitType<PanEventArgs>;
400
575
  /**
401
- * Triggers while cropping an image.
576
+ * Event callback that is raised while cropping an image.
402
577
  *
403
578
  * @event cropping
404
579
  */
405
580
  cropping: EmitType<CropEventArgs>;
406
581
  /**
407
- * Triggers while rotating an image.
582
+ * Event callback that is raised while rotating an image.
408
583
  *
409
584
  * @event rotating
410
585
  */
411
586
  rotating: EmitType<RotateEventArgs>;
412
587
  /**
413
- * Triggers while flipping an image.
588
+ * Event callback that is raised while flipping an image.
414
589
  *
415
590
  * @event flipping
416
591
  */
417
592
  flipping: EmitType<FlipEventArgs>;
418
593
  /**
419
- * Triggers while changing shapes in an image.
594
+ * Event callback that is raised while changing shapes in an Image Editor.
420
595
  *
421
596
  * @event shapeChanging
422
597
  */
423
598
  shapeChanging: EmitType<ShapeChangeEventArgs>;
424
599
  /**
425
- * Triggers once an image is opened.
600
+ * Event callback that is raised once an image is opened in an Image Editor.
426
601
  *
427
602
  * @event fileOpened
428
603
  */
429
604
  fileOpened: EmitType<OpenEventArgs>;
430
605
  /**
431
- * Triggers once an image is saved.
606
+ * Event callback that is raised once an image is saved.
432
607
  *
433
608
  * @event saved
434
609
  */
435
610
  saved: EmitType<SaveEventArgs>;
436
611
  /**
437
- * Triggers once the toolbar is created.
612
+ * Event callback that is raised once the toolbar is created.
438
613
  *
439
614
  * @event toolbarCreated
440
615
  */
441
616
  toolbarCreated: EmitType<ToolbarEventArgs>;
442
617
  /**
443
- * Triggers while updating/refreshing the toolbar
618
+ * Event callback that is raised while updating/refreshing the toolbar
444
619
  *
445
620
  * @event toolbarUpdating
621
+ *
622
+ * {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
623
+ *
446
624
  */
447
625
  toolbarUpdating: EmitType<ToolbarEventArgs>;
448
626
  /**
449
- * Triggers once the toolbar item is clicked.
627
+ * Event callback that is raised once the toolbar item is clicked.
450
628
  *
451
629
  * @event toolbarItemClicked
452
630
  */
453
631
  toolbarItemClicked: EmitType<ClickEventArgs>;
454
632
  /**
455
- * Triggers when applying filter to an image.
633
+ * Event callback that is raised when applying filter to an image.
456
634
  *
457
635
  * @event imageFiltering
458
636
  */
459
637
  imageFiltering: EmitType<ImageFilterEventArgs>;
460
638
  /**
461
- * Triggers when applying fine tune to an image.
639
+ * Event callback that is raised when applying fine tune to an image.
462
640
  *
463
641
  * @event finetuneValueChanging
464
642
  */
465
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>;
466
667
  /**
467
668
  *
468
669
  * Constructor for creating the widget
@@ -529,11 +730,13 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
529
730
  private toPascalCase;
530
731
  private createCanvas;
531
732
  private createToolbar;
733
+ private createQuickAccessToolbar;
532
734
  private createContextualToolbar;
533
735
  private updateContextualToolbar;
534
736
  private createBottomToolbar;
535
737
  private initBottomToolbar;
536
738
  private toolbarTemplateFn;
739
+ private quickAccessToolbarTemplateFn;
537
740
  private templateParser;
538
741
  private getLeftToolbarItem;
539
742
  private getRightToolbarItem;
@@ -541,6 +744,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
541
744
  private getZoomToolbarItem;
542
745
  private processToolbar;
543
746
  private processSubToolbar;
747
+ private wireZoomBtnEvents;
544
748
  private isToolbar;
545
749
  private initToolbarItem;
546
750
  private enableDisableToolbarBtn;
@@ -574,6 +778,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
574
778
  private refreshUndoRedoColl;
575
779
  private applyPreviewFilter;
576
780
  private contextualToolbarClicked;
781
+ private zoomInBtnClickHandler;
782
+ private zoomOutBtnClickHandler;
783
+ private zoomInBtnMouseDownHandler;
784
+ private zoomOutBtnMouseDownHandler;
785
+ private zoomBtnMouseUpHandler;
577
786
  private defToolbarClicked;
578
787
  private performCancel;
579
788
  private applyShape;
@@ -582,6 +791,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
582
791
  private openSlider;
583
792
  private setTempFilterProperties;
584
793
  private okBtn;
794
+ private getZeroZoomPointCollValue;
795
+ private getZeroZoomObjValue;
796
+ private updateCurrentUndoRedoColl;
585
797
  private updateBrightnessFilter;
586
798
  private isFreehandDrawIndex;
587
799
  private deleteFreehandDraw;
@@ -597,6 +809,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
597
809
  private renderSlider;
598
810
  private createSlider;
599
811
  private getCurrAdjustmentValue;
812
+ private getFinetuneOption;
600
813
  private setCurrAdjustmentValue;
601
814
  private cancelPan;
602
815
  private callMainToolbar;
@@ -649,6 +862,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
649
862
  private pointsVerticalFlip;
650
863
  private flipFreehandrawColl;
651
864
  private rotateFreehandDrawColl;
865
+ private updateCursorPointsForFreehandDrawing;
652
866
  private zoomFreehandDrawColl;
653
867
  private zoomX;
654
868
  private zoomY;
@@ -698,24 +912,39 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
698
912
  private getDistance;
699
913
  private setXYPoints;
700
914
  private touchStartHandler;
915
+ private getCurrentIndex;
916
+ private isShapeClick;
701
917
  private isShapeTouch;
702
918
  private isFreehandDrawTouch;
703
919
  private selectFreehandDraw;
704
920
  private closeContextualToolbar;
921
+ private applyObj;
922
+ private applyCurrShape;
705
923
  private mouseDownEventHandler;
706
924
  private mouseMoveEventHandler;
707
925
  private mouseUpEventHandler;
926
+ private getSquarePointForFreehandDraw;
927
+ private getQuickAccessToolbarItem;
928
+ private renderQuickAccessToolbar;
929
+ private deleteItem;
708
930
  private keyDownEventHandler;
709
931
  private keyUpEventHandler;
710
932
  private canvasMouseDownHandler;
711
933
  private canvasMouseMoveHandler;
712
934
  private canvasMouseUpHandler;
713
935
  private handleScroll;
936
+ private performPointZoom;
937
+ private adjustPanning;
938
+ private drawZoomPanImage;
714
939
  private textKeyDown;
715
940
  private adjustToScreen;
716
941
  private screenOrientation;
717
942
  private windowResizeHandler;
943
+ private alignTextAreaIntoCanvas;
944
+ private refreshMainToolbar;
718
945
  private updatePreviousShapeSettings;
946
+ private zoomAction;
947
+ private getCurrentZoomFactor;
719
948
  private disableZoomOutBtn;
720
949
  private setZoomDimension;
721
950
  private applyCurrActObj;
@@ -725,6 +954,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
725
954
  private setTextBoxPos;
726
955
  private setTextBoxPoints;
727
956
  private findTextTarget;
957
+ private renderTextArea;
728
958
  private selectedText;
729
959
  private setTextBoxHeight;
730
960
  private setTextBoxWidth;
@@ -733,7 +963,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
733
963
  private setDragHeight;
734
964
  private triggerShapeChange;
735
965
  private updateActivePoint;
966
+ private updateArrowDirection;
736
967
  private preventDraggingInvertly;
968
+ private preventTextDraggingInvertly;
737
969
  private updateNWPoints;
738
970
  private updateNPoints;
739
971
  private updateNEPoints;
@@ -752,10 +984,10 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
752
984
  private shapeCircle;
753
985
  private drawOuterSelection;
754
986
  private drawObject;
755
- private rotateShape;
756
987
  private updateActiveObject;
757
988
  private drawShapeObj;
758
989
  private shapeLine;
990
+ private shapeArrow;
759
991
  private shapeText;
760
992
  private updateActPoint;
761
993
  private drawSquareLines;
@@ -766,6 +998,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
766
998
  private getCurrentFlipState;
767
999
  private rotateDegree;
768
1000
  private updateCursorStyles;
1001
+ private updateCursorStylesForArrow;
769
1002
  private drawCropRatio;
770
1003
  private setDragDirection;
771
1004
  private updatePoints;
@@ -796,8 +1029,13 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
796
1029
  private rotateObjColl;
797
1030
  private redrawShape;
798
1031
  private applyActObj;
1032
+ private destroyQuickAccessToolbar;
799
1033
  private apply;
800
1034
  private setCenterPoints;
1035
+ private updateTriangleRatio;
1036
+ private updateTrianglePoints;
1037
+ private setDimension;
1038
+ private updateUndoRedo;
801
1039
  private drawShape;
802
1040
  private drawShapeText;
803
1041
  private updateShapeChangeEventArgs;
@@ -839,42 +1077,69 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
839
1077
  private performUndoDefaultAction;
840
1078
  private setAdjustment;
841
1079
  private updateFilter;
1080
+ private rotateImage;
1081
+ private flipImage;
1082
+ private componentToHex;
1083
+ private rgbToHex;
842
1084
  /**
843
- * Clear a current selection.
1085
+ * Clears the current selection performed in the image editor.
844
1086
  *
845
1087
  * @returns {void}.
846
1088
  */
847
1089
  clearSelection(): void;
848
1090
  /**
849
- * Crops an image based on the selection.
850
- * 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.
851
1095
  *
852
1096
  * @returns {boolean}.
1097
+ *
1098
+ * {% codeBlock src='image-editor/crop/index.md' %}{% endcodeBlock %}
1099
+ *
853
1100
  */
854
1101
  crop(): boolean;
855
1102
  /**
856
- * 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.
857
1110
  *
858
- * @param {Direction } direction - Specifies the direction to flip the image.
859
1111
  * @returns {void}.
1112
+ *
1113
+ * {% codeBlock src='image-editor/zoom/index.md' %}{% endcodeBlock %}
1114
+ *
860
1115
  */
861
1116
  flip(direction: Direction): void;
862
1117
  /**
863
- * 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.
864
1123
  *
865
1124
  * @returns {ImageData}.
866
1125
  */
867
1126
  getImageData(): ImageData;
868
1127
  /**
869
- * 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.
870
1131
  *
871
- * @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.
872
1134
  *
873
1135
  * @returns {void}.
874
1136
  */
875
1137
  open(data: string | ImageData): void;
876
1138
  /**
877
- * 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.
878
1143
  *
879
1144
  * @returns {void}.
880
1145
  */
@@ -883,9 +1148,15 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
883
1148
  * Rotate an image to clockwise and anti-clockwise.
884
1149
  *
885
1150
  * @param {number} degree - Specifies a degree to rotate an image.
886
- * 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.
887
1155
  *
888
1156
  * @returns {boolean}.
1157
+ *
1158
+ * {% codeBlock src='image-editor/rotate/index.md' %}{% endcodeBlock %}
1159
+ *
889
1160
  */
890
1161
  rotate(degree: number): boolean;
891
1162
  /**
@@ -894,6 +1165,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
894
1165
  * @param {string} type - Specifies a format of image to be saved.
895
1166
  * @param {string} fileName – Specifies a file name to be saved
896
1167
  *
1168
+ * @remarks
1169
+ * The supported file types are JPG, JPEG, PNG, and SVG.
1170
+ *
897
1171
  * @returns {void}.
898
1172
  */
899
1173
  export(type?: string, fileName?: string): void;
@@ -905,26 +1179,20 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
905
1179
  * @param {number} startY – Specifies the start y-coordinate point of the selection.
906
1180
  * @param {number} width - Specifies the width of the selection area.
907
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
+ *
908
1186
  * @returns {void}.
909
- * ```html
910
- * <div id='imageeditor'></div>
911
- * ```
912
- * ```typescript
913
- * <script>
914
- * var imageObj = new ImageEditor({
915
- * created : () => {
916
- * imageObj.select('16:9', 10, 10);
917
- * }
918
- * });
919
- * imageObj.appendTo("#imageeditor");
920
- * </script>
921
- * ```
1187
+ *
1188
+ * {% codeBlock src='image-editor/select/index.md' %}{% endcodeBlock %}
1189
+ *
922
1190
  */
923
1191
  select(type: string, startX?: number, startY?: number, width?: number, height?: number): void;
924
1192
  /**
925
- * Enable or disable a freehand drawing in an Image Editor.
1193
+ * Enable or disable a freehand drawing option in an Image Editor.
926
1194
  *
927
- * @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.
928
1196
  *
929
1197
  * @returns {void}.
930
1198
  * @private
@@ -933,9 +1201,12 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
933
1201
  /**
934
1202
  * Enable or disable a freehand drawing in an Image Editor.
935
1203
  *
936
- * @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.
937
1205
  *
938
- * @returns {void}.
1206
+ * @remarks
1207
+ * User can directly drawing on a canvas after enabling this option.
1208
+ *
1209
+ * @returns {void}.
939
1210
  */
940
1211
  freehandDraw(value: boolean): void;
941
1212
  /**
@@ -943,41 +1214,39 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
943
1214
  *
944
1215
  * @param {boolean} value - Specifies a value whether enable or disable panning.
945
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
+ *
946
1220
  * @returns {void}.
947
1221
  */
948
1222
  pan(value: boolean): void;
949
1223
  /**
950
- * 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}
951
1233
  *
952
- * @param {boolean} value - Specifies a value to be zoomed on the image.
953
- * @returns {void}.
954
1234
  */
955
- zoom(value: number): void;
1235
+ zoom(zoomFactor: number, zoomPoint?: Point): void;
956
1236
  /**
957
1237
  * Draw ellipse on an image.
958
1238
  *
959
1239
  * @param {number} x - Specifies x-coordinate of ellipse.
960
1240
  * @param {number} y - Specifies y-coordinate of ellipse.
961
- * @param {number} radiusX - the radius x point for the ellipse.
962
- * @param {number} radiusY - the radius y point for the ellipse.
963
- * @param {number} strokeWidth - the stroke width of ellipse.
964
- * @param {string} strokeColor - the stroke color of ellipse.
965
- * @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.
966
1246
  * @returns {boolean}.
967
1247
  *
968
- * ```html
969
- * <div id='imageeditor'></div>
970
- * ```
971
- * ```typescript
972
- * <script>
973
- * * var imageObj = new ImageEditor({
974
- * created: () => {
975
- * imageObj.drawEllipse(10, 10, 40, 60);
976
- * }
977
- * });
978
- * imageObj.appendTo("#imageeditor");
979
- * </script>
980
- * ```
1248
+ * {% codeBlock src='image-editor/ellipse/index.md' %}{% endcodeBlock %}
1249
+ *
981
1250
  */
982
1251
  drawEllipse(x?: number, y?: number, radiusX?: number, radiusY?: number, strokeWidth?: number, strokeColor?: string, fillColor?: string): boolean;
983
1252
  /**
@@ -992,6 +1261,19 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
992
1261
  * @returns {boolean}.
993
1262
  */
994
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;
995
1277
  /**
996
1278
  * Draw a rectangle on an image.
997
1279
  *
@@ -1001,7 +1283,7 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1001
1283
  * @param {number} height - Specifies the height of the rectangle.
1002
1284
  * @param {number} strokeWidth - Specifies the stroke width of rectangle.
1003
1285
  * @param {string} strokeColor - Specifies the stroke color of rectangle.
1004
- * @param {string} fillColor - the fill color of the rectangle.
1286
+ * @param {string} fillColor - Specifies the fill color of the rectangle.
1005
1287
  * @returns {boolean}.
1006
1288
  */
1007
1289
  drawRectangle(x?: number, y?: number, width?: number, height?: number, strokeWidth?: number, strokeColor?: string, fillColor?: string): boolean;
@@ -1018,60 +1300,30 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1018
1300
  * @param {string} color - Specifies font color of the text.
1019
1301
  * @returns {boolean}.
1020
1302
  *
1021
- * ```html
1022
- * <div id='imageeditor'></div>
1023
- * ```
1024
- * ```typescript
1025
- * <script>
1026
- * var imageObj = new ImageEditor({
1027
- * created: () => {
1028
- * imageObj.drawText(10, 10, 'Syncfusion', 'Arial', 12, true, true, '#000');
1029
- * }
1030
- * });
1031
- * imageObj.appendTo("#imageeditor");
1032
- *
1033
- * </script>
1034
- * ```
1303
+ * {% codeBlock src='image-editor/text/index.md' %}{% endcodeBlock %}
1304
+ *
1035
1305
  */
1036
1306
  drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string): boolean;
1037
1307
  /**
1038
- * 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.
1039
1310
  *
1040
1311
  * @param {string} id - Specifies the shape id to select a shape on an image.
1041
1312
  * @returns {boolean}.
1042
- * ```html
1043
- * <div id='imageeditor'></div>
1044
- * ```
1045
- * ```typescript
1046
- * <script>
1047
- * var imageObj = new ImageEditor({
1048
- * created: () => {
1049
- * imageObj.selectShape('shape_1');
1050
- * }
1051
- * });
1052
- * imageObj.appendTo("#imageeditor");
1053
- * </script>
1054
- * ```
1313
+ *
1314
+ * {% codeBlock src='image-editor/selectShape/index.md' %}{% endcodeBlock %}
1315
+ *
1055
1316
  */
1056
1317
  selectShape(id: string): boolean;
1057
1318
  /**
1058
- * 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.
1059
1321
  *
1060
1322
  * @param {string} id - Specifies the shape id to delete the shape on an image.
1061
1323
  * @returns {void}.
1062
- * ```html
1063
- * <div id='imageeditor'></div>
1064
- * ```
1065
- * ```typescript
1066
- * <script>
1067
- * var imageObj = new ImageEditor({
1068
- * created: () => {
1069
- * imageObj.deleteShape('shape_1');
1070
- * }
1071
- * });
1072
- * imageObj.appendTo("#imageeditor");
1073
- * </script>
1074
- * ```
1324
+ *
1325
+ * {% codeBlock src='image-editor/deleteShape/index.md' %}{% endcodeBlock %}
1326
+ *
1075
1327
  */
1076
1328
  deleteShape(id: string): void;
1077
1329
  /**
@@ -1079,19 +1331,9 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1079
1331
  *
1080
1332
  * @param {string} id - Specifies the shape id on an image.
1081
1333
  * @returns {ShapeSettings}.
1082
- * ```html
1083
- * <div id='imageeditor'></div>
1084
- * ```
1085
- * ```typescript
1086
- * <script>
1087
- * var imageObj = new ImageEditor({
1088
- * created: () => {
1089
- * imageObj.getShapeSetting('shape_1');
1090
- * }
1091
- * });
1092
- * imageObj.appendTo("#imageeditor");
1093
- * </script>
1094
- * ```
1334
+ *
1335
+ * {% codeBlock src='image-editor/getShapeSetting/index.md' %}{% endcodeBlock %}
1336
+ *
1095
1337
  */
1096
1338
  getShapeSetting(id: string): ShapeSettings;
1097
1339
  /**
@@ -1107,79 +1349,269 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1107
1349
  */
1108
1350
  update(): void;
1109
1351
  /**
1110
- * To apply the filters to an image
1352
+ * Finetuning an image with the given type of finetune and its value in the image editor.
1111
1353
  *
1112
- * @param {ImageFinetuneOptions } finetuneOption - Specifies the finetune options to the image.
1354
+ * @param {ImageFinetuneOption } finetuneOption - Specifies the finetune options to be performed in the image.
1113
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
+ *
1114
1360
  * @returns {void}.
1115
1361
  *
1116
1362
  */
1117
- finetuneImage(finetuneOption: ImageFinetuneOptions, value: number): void;
1363
+ finetuneImage(finetuneOption: ImageFinetuneOption, value: number): void;
1118
1364
  /**
1119
- * 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.
1120
1368
  *
1121
- * @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.
1122
1371
  * @returns {void}.
1123
1372
  */
1124
- applyImageFilter(filterOption: ImageFilterOptions): void;
1373
+ applyImageFilter(filterOption: ImageFilterOption): void;
1125
1374
  /**
1126
- * 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.
1127
1379
  *
1128
- * @private
1129
1380
  * @returns {void}.
1130
1381
  */
1131
1382
  undo(): void;
1132
1383
  /**
1133
- * Redo the last user action.
1384
+ * Redo the last user action that was undone by the user or `undo` method.
1134
1385
  *
1135
- * @private
1386
+ * @remarks
1387
+ * This method will take into effect once the 'allowUndoRedo' property is enabled.
1136
1388
  * @returns {void}.
1137
1389
  */
1138
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"
1139
1412
  }
1140
1413
  /**
1141
- * Defines the Image Editor file type.
1414
+ * An enumeration representing the direction of an image editor operation.
1415
+ *
1416
+ * @enum {string}
1142
1417
  */
1143
- 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
+ }
1144
1424
  /**
1145
- * 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}
1146
1428
  */
1147
- 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
+ }
1148
1443
  /**
1149
- * Defines the Image Editor shape type.
1444
+ * An enumeration representing the different ways to trigger zooming in the image editor.
1445
+ *
1446
+ * @enum {number}
1150
1447
  */
1151
- 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
+ }
1152
1458
  /**
1153
- * Defines the theme for Image Editor.
1459
+ * An enum representing the available themes in the image editor.
1154
1460
  */
1155
- 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
+ }
1156
1491
  /**
1157
- * Defines the toolbar items for Image Editor.
1492
+ * An enum representing the available toolbar commands in the image editor.
1158
1493
  */
1159
- 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
+ }
1160
1520
  /**
1161
- * 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.
1162
1525
  */
1163
- 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
+ }
1164
1542
  /**
1165
- * 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.
1166
1547
  */
1167
- 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
+ }
1168
1564
  /**
1169
- * Interface for zoom transition occur in the imageEditor.
1565
+ * The Interface which contains the properties for zoom transition occur in the Image Editor.
1170
1566
  */
1171
1567
  export interface ZoomEventArgs {
1172
1568
  /**
1173
- * 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
+ *
1174
1574
  */
1175
1575
  zoomPoint: Point;
1176
1576
  /**
1177
- * 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
+ *
1178
1582
  */
1179
- zoomLevel: number;
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.
1594
+ */
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;
1180
1612
  }
1181
1613
  /**
1182
- * Interface for pan transition occur in the imageEditor.
1614
+ * The Interface which contains the properties for pan transition occur in the Image Editor.
1183
1615
  */
1184
1616
  export interface PanEventArgs {
1185
1617
  /**
@@ -1190,40 +1622,64 @@ export interface PanEventArgs {
1190
1622
  * Returns the (x, y) point to be panning ended.
1191
1623
  */
1192
1624
  endPoint: Point;
1625
+ /**
1626
+ * Defines whether to cancel the panning action of image editor.
1627
+ */
1628
+ cancel: boolean;
1193
1629
  }
1194
1630
  /**
1195
- * Interface for crop transition occur in the imageEditor.
1631
+ * The Interface which contains the properties for crop transition occur in the Image Editor.
1196
1632
  */
1197
1633
  export interface CropEventArgs {
1198
1634
  /**
1199
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
+ *
1200
1640
  */
1201
1641
  startPoint: Point;
1202
1642
  /**
1203
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
+ *
1204
1648
  */
1205
1649
  endPoint: Point;
1650
+ /**
1651
+ * Defines whether to cancel the cropping action of image editor.
1652
+ */
1653
+ cancel: boolean;
1206
1654
  }
1207
1655
  /**
1208
- * Interface for rotate transition in the imageEditor.
1656
+ * The Interface which contains the properties for rotate transition in the Image Editor.
1209
1657
  */
1210
1658
  export interface RotateEventArgs {
1211
1659
  /**
1212
1660
  * Returns the degree to be rotated.
1213
1661
  */
1214
1662
  degree: number;
1663
+ /**
1664
+ * Defines whether to cancel the rotating action of image editor.
1665
+ */
1666
+ cancel: boolean;
1215
1667
  }
1216
1668
  /**
1217
- * Interface for flip transition in the imageEditor.
1669
+ * The Interface which contains the properties for flip transition in the Image Editor.
1218
1670
  */
1219
1671
  export interface FlipEventArgs {
1220
1672
  /**
1221
1673
  * Returns the direction(Horizontal and vertical) to be flipped.
1222
1674
  */
1223
1675
  direction: string;
1676
+ /**
1677
+ * Defines the cancel option to cancel the flip action.
1678
+ */
1679
+ cancel: boolean;
1224
1680
  }
1225
1681
  /**
1226
- * Interface for shape change in imageEditor.
1682
+ * The Interface which contains the properties for shape change in Image Editor.
1227
1683
  */
1228
1684
  export interface ShapeChangeEventArgs {
1229
1685
  /**
@@ -1240,11 +1696,11 @@ export interface ShapeChangeEventArgs {
1240
1696
  currentShapeSettings?: ShapeSettings;
1241
1697
  }
1242
1698
  /**
1243
- * Interface for Toolbar events.
1699
+ * The Interface which contains the properties for Toolbar events.
1244
1700
  */
1245
1701
  export interface ToolbarEventArgs {
1246
1702
  /**
1247
- * Defines the cancel option to cancel the toolbar action.
1703
+ * Defines whether the to cancel the toolbar updating/refreshing action in the image editor.
1248
1704
  */
1249
1705
  cancel?: boolean;
1250
1706
  /**
@@ -1257,11 +1713,17 @@ export interface ToolbarEventArgs {
1257
1713
  item?: ItemModel;
1258
1714
  /**
1259
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
+ *
1260
1722
  */
1261
1723
  toolbarItems?: (string | ItemModel)[];
1262
1724
  }
1263
1725
  /**
1264
- * Interface for opening the image.
1726
+ * The Interface which contains the properties for opening the image.
1265
1727
  */
1266
1728
  export interface OpenEventArgs {
1267
1729
  /**
@@ -1274,7 +1736,7 @@ export interface OpenEventArgs {
1274
1736
  fileType: FileType;
1275
1737
  }
1276
1738
  /**
1277
- * Interface for saving the canvas as image.
1739
+ * The Interface which contains the properties for saving the canvas as image.
1278
1740
  */
1279
1741
  export interface SaveEventArgs {
1280
1742
  /**
@@ -1287,11 +1749,11 @@ export interface SaveEventArgs {
1287
1749
  fileType: FileType;
1288
1750
  }
1289
1751
  /**
1290
- * Interface for before saving the canvas as image.
1752
+ * The Interface which contains the properties for before saving the canvas as image.
1291
1753
  */
1292
1754
  export interface BeforeSaveEventArgs {
1293
1755
  /**
1294
- * Defines the cancel option to cancel the save action.
1756
+ * Defines whether the to cancel the saving action in the image editor.
1295
1757
  */
1296
1758
  cancel: boolean;
1297
1759
  /**
@@ -1304,7 +1766,7 @@ export interface BeforeSaveEventArgs {
1304
1766
  fileType: FileType;
1305
1767
  }
1306
1768
  /**
1307
- * Interface for Point Object in the image editor.
1769
+ * The Interface which contains the properties for Point Object in the image editor.
1308
1770
  *
1309
1771
  */
1310
1772
  export interface Point {
@@ -1329,14 +1791,14 @@ export interface Point {
1329
1791
  */
1330
1792
  ratioY?: number;
1331
1793
  /**
1332
- * Gets or sets the time.
1794
+ * Specifies the time.
1333
1795
  *
1334
1796
  * @private
1335
1797
  */
1336
1798
  time?: number;
1337
1799
  }
1338
1800
  /**
1339
- * Interface for ShapeSettings in the imageEditor.
1801
+ * Interface for ShapeSettings in the Image Editor.
1340
1802
  */
1341
1803
  export interface ShapeSettings {
1342
1804
  /**
@@ -1380,7 +1842,7 @@ export interface ShapeSettings {
1380
1842
  */
1381
1843
  radius?: number;
1382
1844
  /**
1383
- * Returns the length of the line shape.
1845
+ * Returns the length of the line or arrow shape.
1384
1846
  */
1385
1847
  length?: number;
1386
1848
  /**
@@ -1411,18 +1873,122 @@ export interface ImageFilterEventArgs {
1411
1873
  /**
1412
1874
  * Specifies the when applying filter to an image.
1413
1875
  */
1414
- filter: ImageFilterOptions;
1876
+ filter: ImageFilterOption;
1877
+ /**
1878
+ * Defines the cancel option to cancel the filter action.
1879
+ */
1880
+ cancel: boolean;
1415
1881
  }
1416
1882
  /**
1417
- * Interface for filter option for the image.
1883
+ * Interface for fine tunes option for the image.
1418
1884
  */
1419
1885
  export interface FinetuneEventArgs {
1420
1886
  /**
1421
1887
  * Specifies the type of fine tunes.
1422
1888
  */
1423
- finetune: ImageFinetuneOptions;
1889
+ finetune: ImageFinetuneOption;
1424
1890
  /**
1425
1891
  * Specifies the value of the fine tunes.
1426
1892
  */
1427
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;
1428
1994
  }