@syncfusion/ej2-image-editor 30.2.4 → 31.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +3 -3
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +3 -3
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/dist/ts/image-editor/action/crop.d.ts +44 -0
- package/dist/ts/image-editor/action/crop.ts +867 -0
- package/dist/ts/image-editor/action/draw.d.ts +187 -0
- package/dist/ts/image-editor/action/draw.ts +4924 -0
- package/dist/ts/image-editor/action/export.d.ts +29 -0
- package/dist/ts/image-editor/action/export.ts +509 -0
- package/dist/ts/image-editor/action/filter.d.ts +48 -0
- package/dist/ts/image-editor/action/filter.ts +872 -0
- package/dist/ts/image-editor/action/freehand-draw.d.ts +68 -0
- package/dist/ts/image-editor/action/freehand-draw.ts +1135 -0
- package/dist/ts/image-editor/action/index.d.ts +9 -0
- package/dist/ts/image-editor/action/index.ts +9 -0
- package/dist/ts/image-editor/action/selection.d.ts +178 -0
- package/dist/ts/image-editor/action/selection.ts +5241 -0
- package/dist/ts/image-editor/action/shape.d.ts +130 -0
- package/dist/ts/image-editor/action/shape.ts +3917 -0
- package/dist/ts/image-editor/action/transform.d.ts +77 -0
- package/dist/ts/image-editor/action/transform.ts +2008 -0
- package/dist/ts/image-editor/action/undo-redo.d.ts +52 -0
- package/dist/ts/image-editor/action/undo-redo.ts +1169 -0
- package/dist/ts/image-editor/base/enum.d.ts +277 -0
- package/dist/ts/image-editor/base/enum.ts +288 -0
- package/dist/ts/image-editor/base/image-editor-model.d.ts +770 -0
- package/dist/ts/image-editor/base/image-editor.d.ts +1928 -0
- package/dist/ts/image-editor/base/image-editor.ts +5496 -0
- package/dist/ts/image-editor/base/index.d.ts +4 -0
- package/dist/ts/image-editor/base/index.ts +4 -0
- package/dist/ts/image-editor/base/interface.d.ts +1637 -0
- package/dist/ts/image-editor/base/interface.ts +1709 -0
- package/dist/ts/image-editor/index.d.ts +3 -0
- package/dist/ts/image-editor/index.ts +3 -0
- package/dist/ts/image-editor/renderer/index.d.ts +1 -0
- package/dist/ts/image-editor/renderer/index.ts +1 -0
- package/dist/ts/image-editor/renderer/toolbar.d.ts +171 -0
- package/dist/ts/image-editor/renderer/toolbar.ts +6356 -0
- package/dist/ts/index.d.ts +4 -0
- package/dist/ts/index.ts +4 -0
- package/package.json +47 -15
- package/src/image-editor/action/undo-redo.js +3 -3
|
@@ -0,0 +1,1637 @@
|
|
|
1
|
+
import { FileType, ShapeType, ImageFinetuneOption, ImageFilterOption, FrameType, FrameLineStyle, ArrowheadType, RedactType, Direction } from '../index';
|
|
2
|
+
import { ItemModel } from '@syncfusion/ej2-navigations';
|
|
3
|
+
/**
|
|
4
|
+
* This interface is used to specify settings for image finetuning operations, including minimum and maximum values, as well as default values.
|
|
5
|
+
*/
|
|
6
|
+
export interface ImageFinetuneValue {
|
|
7
|
+
/**
|
|
8
|
+
* Specifies the minimum value of finetune option.
|
|
9
|
+
*
|
|
10
|
+
* @default null
|
|
11
|
+
*/
|
|
12
|
+
min: number;
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the maximum value of finetune option.
|
|
15
|
+
*
|
|
16
|
+
* @default null
|
|
17
|
+
*/
|
|
18
|
+
max: number;
|
|
19
|
+
/**
|
|
20
|
+
* Specifies the default value of finetune option.
|
|
21
|
+
*
|
|
22
|
+
* @default null
|
|
23
|
+
*/
|
|
24
|
+
defaultValue: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The Interface which contains the properties for zoom transition occur in the Image Editor.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* The `cancel` and `previousZoomFactor` properties were used for `zooming` event.
|
|
31
|
+
*/
|
|
32
|
+
export interface ZoomEventArgs {
|
|
33
|
+
/**
|
|
34
|
+
* Returns the point in which the zooming action was performed.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* The given value is a point object which has x and y coordinates.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
zoomPoint: Point;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the previous zoom factor that already had before this current zooming action.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* The previous and current zoom factor is used for finding whether the performed zooming is a zoom in or zoom out.
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
previousZoomFactor: number;
|
|
49
|
+
/**
|
|
50
|
+
* Returns the current zoomed level, in which the loaded image is enlarged in the image editor.
|
|
51
|
+
*
|
|
52
|
+
* @remarks
|
|
53
|
+
* The previous and current zoom factor is used for finding whether the performed zooming is a zoom in or zoom out.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
currentZoomFactor: number;
|
|
57
|
+
/**
|
|
58
|
+
* Specifies a value that indicates whether the zooming action can be canceled in image editor.
|
|
59
|
+
*/
|
|
60
|
+
cancel?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Returns the type of zooming performed in the image editor.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* This property is used to get the type of zooming performed in the editor.
|
|
66
|
+
* The possible values of this property are 'MouseWheel', 'Pinch', 'Commands', and 'Toolbar'.
|
|
67
|
+
* The value of this property will be updated each time a zoom operation is performed.
|
|
68
|
+
* MouseWheel - It indicates the zooming performed using mouse wheel.
|
|
69
|
+
* Pinch - It indicates that zooming is performed using pinch gestures on touch-enabled devices.
|
|
70
|
+
* Commands - It indicates that zooming is performed by clicking the CTRL key and either the plus (+) or minus (-) buttons on the keyboard.
|
|
71
|
+
* Toolbar - It indicates that zooming is performed using toolbar buttons.
|
|
72
|
+
* By default, this property is set to 'Toolbar'.
|
|
73
|
+
*
|
|
74
|
+
*
|
|
75
|
+
*/
|
|
76
|
+
zoomTrigger: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The Interface which contains the properties for pan transition occur in the Image Editor.
|
|
80
|
+
*/
|
|
81
|
+
export interface PanEventArgs {
|
|
82
|
+
/**
|
|
83
|
+
* Returns the (x, y) point of panning started
|
|
84
|
+
*/
|
|
85
|
+
startPoint: Point;
|
|
86
|
+
/**
|
|
87
|
+
* Returns the (x, y) point to be panning ended.
|
|
88
|
+
*/
|
|
89
|
+
endPoint: Point;
|
|
90
|
+
/**
|
|
91
|
+
* Defines whether to cancel the panning action of image editor.
|
|
92
|
+
*/
|
|
93
|
+
cancel: boolean;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* The Interface which contains the properties for crop transition occurs in the Image Editor.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* The `cancel` and `preventScaling` properties were used for `cropping` event.
|
|
100
|
+
*/
|
|
101
|
+
export interface CropEventArgs {
|
|
102
|
+
/**
|
|
103
|
+
* Returns the start point of the crop region.
|
|
104
|
+
*
|
|
105
|
+
* @remarks
|
|
106
|
+
* The start and end point is used get the cropping region in an image editor.
|
|
107
|
+
*
|
|
108
|
+
*/
|
|
109
|
+
startPoint: Point;
|
|
110
|
+
/**
|
|
111
|
+
* Returns the end point of the crop region.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* The start and end point is used get the cropping region in an image editor.
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
endPoint: Point;
|
|
118
|
+
/**
|
|
119
|
+
* Specifies whether to prevent scale-based cropping in the image editor.
|
|
120
|
+
*/
|
|
121
|
+
preventScaling?: boolean;
|
|
122
|
+
/**
|
|
123
|
+
* Defines whether to cancel the cropping action of image editor.
|
|
124
|
+
*/
|
|
125
|
+
cancel?: boolean;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* The Interface which contains the properties for rotate transition in the Image Editor.
|
|
129
|
+
*
|
|
130
|
+
* @remarks
|
|
131
|
+
* The `cancel` and `previousDegree` properties were used for `rotating` event.
|
|
132
|
+
*/
|
|
133
|
+
export interface RotateEventArgs {
|
|
134
|
+
/**
|
|
135
|
+
* Returns the current degree to be rotated.
|
|
136
|
+
*/
|
|
137
|
+
currentDegree: number;
|
|
138
|
+
/**
|
|
139
|
+
* Returns the previous degree of rotated image.
|
|
140
|
+
*/
|
|
141
|
+
previousDegree: number;
|
|
142
|
+
/**
|
|
143
|
+
* Defines whether to cancel the rotating action of image editor.
|
|
144
|
+
*/
|
|
145
|
+
cancel?: boolean;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The Interface which contains the properties for flip transition in the Image Editor.
|
|
149
|
+
*
|
|
150
|
+
* @remarks
|
|
151
|
+
* The `cancel` and `previousDirection` properties were used for `flipping` event.
|
|
152
|
+
*/
|
|
153
|
+
export interface FlipEventArgs {
|
|
154
|
+
/**
|
|
155
|
+
* Returns the direction(Horizontal and vertical) to be flipped.
|
|
156
|
+
*/
|
|
157
|
+
direction: string;
|
|
158
|
+
/**
|
|
159
|
+
* Defines the cancel option to cancel the flip action.
|
|
160
|
+
*/
|
|
161
|
+
cancel?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Returns the previous flipped direction of image.
|
|
164
|
+
*/
|
|
165
|
+
previousDirection: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* The Interface which contains the properties for shape change in Image Editor.
|
|
169
|
+
*
|
|
170
|
+
* @remarks
|
|
171
|
+
* The `cancel` and `previousShapeSettings` properties were used for `shapeChanging` event.
|
|
172
|
+
*/
|
|
173
|
+
export interface ShapeChangeEventArgs {
|
|
174
|
+
/**
|
|
175
|
+
* Defines the cancel option to cancel the shape change action.
|
|
176
|
+
*/
|
|
177
|
+
cancel?: boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Returns the name of the action.
|
|
180
|
+
*/
|
|
181
|
+
action?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Returns the object of shape before moved, resized, or customized the UI.
|
|
184
|
+
*/
|
|
185
|
+
previousShapeSettings?: ShapeSettings;
|
|
186
|
+
/**
|
|
187
|
+
* Returns `the object of shape which is inserted or moved or deleted or resized or customized the UI.
|
|
188
|
+
*/
|
|
189
|
+
currentShapeSettings?: ShapeSettings;
|
|
190
|
+
/**
|
|
191
|
+
* Prevents shapes from being dragged outside the image boundary.
|
|
192
|
+
*/
|
|
193
|
+
allowShapeOverflow?: boolean;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* The Interface which contains the properties for selection change in Image Editor.
|
|
197
|
+
*/
|
|
198
|
+
export interface SelectionChangeEventArgs {
|
|
199
|
+
/**
|
|
200
|
+
* Returns the name of the action.
|
|
201
|
+
*/
|
|
202
|
+
action?: string;
|
|
203
|
+
/**
|
|
204
|
+
* Returns the object of selection before resized, or customized the UI.
|
|
205
|
+
*/
|
|
206
|
+
previousSelectionSettings?: CropSelectionSettings;
|
|
207
|
+
/**
|
|
208
|
+
* Returns the object of selection which is inserted or deleted or resized or customized the UI.
|
|
209
|
+
*/
|
|
210
|
+
currentSelectionSettings?: CropSelectionSettings;
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* The Interface which contains the properties for Toolbar events.
|
|
214
|
+
*/
|
|
215
|
+
export interface ToolbarEventArgs {
|
|
216
|
+
/**
|
|
217
|
+
* Defines whether the to cancel the toolbar updating/refreshing action in the image editor.
|
|
218
|
+
*/
|
|
219
|
+
cancel?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Returns the current toolbar type.
|
|
222
|
+
*/
|
|
223
|
+
toolbarType?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Returns the current toolbar item.
|
|
226
|
+
*/
|
|
227
|
+
item?: ItemModel;
|
|
228
|
+
/**
|
|
229
|
+
* Specifies the toolbar item collection to be rendered as contextual toolbar.
|
|
230
|
+
*
|
|
231
|
+
* @remarks
|
|
232
|
+
* This property collection contains string and ItemModel values.
|
|
233
|
+
* The string values representing the names of the built-in toolbar items to be displayed.
|
|
234
|
+
* The ItemModel values representing the object of custom toolbar items to be displayed.
|
|
235
|
+
*
|
|
236
|
+
*/
|
|
237
|
+
toolbarItems?: (string | ItemModel)[];
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* The Interface which contains the properties for opening the image.
|
|
241
|
+
*/
|
|
242
|
+
export interface OpenEventArgs {
|
|
243
|
+
/**
|
|
244
|
+
* Returns the file name of an image.
|
|
245
|
+
*/
|
|
246
|
+
fileName: string;
|
|
247
|
+
/**
|
|
248
|
+
* Returns the file type of an image.
|
|
249
|
+
*/
|
|
250
|
+
fileType: FileType;
|
|
251
|
+
/**
|
|
252
|
+
* Returns whether the loaded file is valid in the image editor.
|
|
253
|
+
*/
|
|
254
|
+
isValidImage: boolean;
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* The Interface which contains the properties for saving the canvas as image.
|
|
258
|
+
*/
|
|
259
|
+
export interface SaveEventArgs {
|
|
260
|
+
/**
|
|
261
|
+
* Returns the file name of an image.
|
|
262
|
+
*/
|
|
263
|
+
fileName: string;
|
|
264
|
+
/**
|
|
265
|
+
* Returns the file type of an image.
|
|
266
|
+
*/
|
|
267
|
+
fileType: FileType;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* The Interface which contains the properties for before saving the canvas as image.
|
|
271
|
+
*/
|
|
272
|
+
export interface BeforeSaveEventArgs {
|
|
273
|
+
/**
|
|
274
|
+
* Defines whether the to cancel the saving action in the image editor.
|
|
275
|
+
*/
|
|
276
|
+
cancel: boolean;
|
|
277
|
+
/**
|
|
278
|
+
* Specifies the file name for an image.
|
|
279
|
+
*/
|
|
280
|
+
fileName: string;
|
|
281
|
+
/**
|
|
282
|
+
* Returns the file type for an image.
|
|
283
|
+
*/
|
|
284
|
+
fileType: FileType;
|
|
285
|
+
/**
|
|
286
|
+
* Returns the Quality of an image.
|
|
287
|
+
*/
|
|
288
|
+
imageQuality?: number;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* The Interface which contains the properties for Point Object in the image editor.
|
|
292
|
+
*
|
|
293
|
+
*/
|
|
294
|
+
export interface Point {
|
|
295
|
+
/**
|
|
296
|
+
* Returns the x position in the canvas.
|
|
297
|
+
*/
|
|
298
|
+
x: number;
|
|
299
|
+
/**
|
|
300
|
+
* Returns y position in the canvas.
|
|
301
|
+
*/
|
|
302
|
+
y: number;
|
|
303
|
+
/**
|
|
304
|
+
* Returns the x ratio from in the image.
|
|
305
|
+
*
|
|
306
|
+
* @private
|
|
307
|
+
*/
|
|
308
|
+
ratioX?: number;
|
|
309
|
+
/**
|
|
310
|
+
* Returns y ratio from the image.
|
|
311
|
+
*
|
|
312
|
+
* @private
|
|
313
|
+
*/
|
|
314
|
+
ratioY?: number;
|
|
315
|
+
/**
|
|
316
|
+
* Specifies the time.
|
|
317
|
+
*
|
|
318
|
+
* @private
|
|
319
|
+
*/
|
|
320
|
+
time?: number;
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Interface for CropSelectionSettings in the Image Editor.
|
|
324
|
+
*/
|
|
325
|
+
export interface CropSelectionSettings {
|
|
326
|
+
/**
|
|
327
|
+
* Returns the type of the selection.
|
|
328
|
+
*/
|
|
329
|
+
type: string;
|
|
330
|
+
/**
|
|
331
|
+
* Returns the start x position of the selection.
|
|
332
|
+
*/
|
|
333
|
+
startX: number;
|
|
334
|
+
/**
|
|
335
|
+
* Returns the start y position of the selection.
|
|
336
|
+
*/
|
|
337
|
+
startY: number;
|
|
338
|
+
/**
|
|
339
|
+
* Returns the width of the selection.
|
|
340
|
+
*/
|
|
341
|
+
width?: number;
|
|
342
|
+
/**
|
|
343
|
+
* Returns the height of the selection.
|
|
344
|
+
*/
|
|
345
|
+
height?: number;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Interface for ShapeSettings in the Image Editor.
|
|
349
|
+
*/
|
|
350
|
+
export interface ShapeSettings {
|
|
351
|
+
/**
|
|
352
|
+
* Returns the id of the shape.
|
|
353
|
+
*/
|
|
354
|
+
id: string;
|
|
355
|
+
/**
|
|
356
|
+
* Returns the type of the shape.
|
|
357
|
+
*/
|
|
358
|
+
type: ShapeType;
|
|
359
|
+
/**
|
|
360
|
+
* Returns the start x position of the shape.
|
|
361
|
+
*/
|
|
362
|
+
startX: number;
|
|
363
|
+
/**
|
|
364
|
+
* Returns the start y position of the shape.
|
|
365
|
+
*/
|
|
366
|
+
startY: number;
|
|
367
|
+
/**
|
|
368
|
+
* Returns the opacity value of the shape.
|
|
369
|
+
*/
|
|
370
|
+
opacity?: number;
|
|
371
|
+
/**
|
|
372
|
+
* Returns the width of the shape.
|
|
373
|
+
*/
|
|
374
|
+
width?: number;
|
|
375
|
+
/**
|
|
376
|
+
* Returns the height of the shape.
|
|
377
|
+
*/
|
|
378
|
+
height?: number;
|
|
379
|
+
/**
|
|
380
|
+
* Returns the stroke color of the shape.
|
|
381
|
+
*/
|
|
382
|
+
strokeColor?: string;
|
|
383
|
+
/**
|
|
384
|
+
* Returns the fill color of the shape.
|
|
385
|
+
*/
|
|
386
|
+
fillColor?: string;
|
|
387
|
+
/**
|
|
388
|
+
* Returns the stroke width of the shape.
|
|
389
|
+
*/
|
|
390
|
+
strokeWidth?: number;
|
|
391
|
+
/**
|
|
392
|
+
* Returns the radius of the ellipse shape.
|
|
393
|
+
*/
|
|
394
|
+
radius?: number;
|
|
395
|
+
/**
|
|
396
|
+
* Returns the length of the line or arrow shape.
|
|
397
|
+
*/
|
|
398
|
+
length?: number;
|
|
399
|
+
/**
|
|
400
|
+
* Returns the text content of the text.
|
|
401
|
+
*/
|
|
402
|
+
text?: string;
|
|
403
|
+
/**
|
|
404
|
+
* Returns the font size of the text.
|
|
405
|
+
*/
|
|
406
|
+
fontSize?: number;
|
|
407
|
+
/**
|
|
408
|
+
* Returns the font family of the text.
|
|
409
|
+
*/
|
|
410
|
+
fontFamily?: string;
|
|
411
|
+
/**
|
|
412
|
+
* Returns the font style of the text.
|
|
413
|
+
*/
|
|
414
|
+
fontStyle?: string[];
|
|
415
|
+
/**
|
|
416
|
+
* Returns the font color of the text.
|
|
417
|
+
*/
|
|
418
|
+
color?: string;
|
|
419
|
+
/**
|
|
420
|
+
* Returns the points collection of freehand drawing and path annotation.
|
|
421
|
+
*/
|
|
422
|
+
points?: Point[];
|
|
423
|
+
/**
|
|
424
|
+
* Returns the degree of rotated shape.
|
|
425
|
+
*/
|
|
426
|
+
degree?: number;
|
|
427
|
+
/**
|
|
428
|
+
* Returns the imageData of the image annotation.
|
|
429
|
+
*/
|
|
430
|
+
imageData?: string | ImageData;
|
|
431
|
+
/**
|
|
432
|
+
* Returns the width radius of the ellipse shape.
|
|
433
|
+
*/
|
|
434
|
+
radiusX?: number;
|
|
435
|
+
/**
|
|
436
|
+
* Returns the height radius of the ellipse shape.
|
|
437
|
+
*/
|
|
438
|
+
radiusY?: number;
|
|
439
|
+
/**
|
|
440
|
+
* Returns the end x position of line and arrow.
|
|
441
|
+
*/
|
|
442
|
+
endX?: number;
|
|
443
|
+
/**
|
|
444
|
+
* Returns the end y position of line and arrow.
|
|
445
|
+
*/
|
|
446
|
+
endY?: number;
|
|
447
|
+
/**
|
|
448
|
+
* Returns the head type of an arrow.
|
|
449
|
+
*/
|
|
450
|
+
arrowHead?: ArrowheadType;
|
|
451
|
+
/**
|
|
452
|
+
* Returns the tail type of an arrow.
|
|
453
|
+
*/
|
|
454
|
+
arrowTail?: ArrowheadType;
|
|
455
|
+
/**
|
|
456
|
+
* Returns the order of the annotation in which it is placed on the image.
|
|
457
|
+
*/
|
|
458
|
+
index?: number;
|
|
459
|
+
/**
|
|
460
|
+
* Returns the border radius of the rectangle annotation.
|
|
461
|
+
*/
|
|
462
|
+
borderRadius?: number;
|
|
463
|
+
/**
|
|
464
|
+
* Returns the transform collection of the annotations.
|
|
465
|
+
*/
|
|
466
|
+
transformCollection?: TransformationCollection[];
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* The interface which contains the properties for filter option for the image.
|
|
470
|
+
*
|
|
471
|
+
* @remarks
|
|
472
|
+
* The `cancel` property is used for `imageFiltering` event.
|
|
473
|
+
*/
|
|
474
|
+
export interface ImageFilterEventArgs {
|
|
475
|
+
/**
|
|
476
|
+
* Specifies the when applying filter to an image.
|
|
477
|
+
*/
|
|
478
|
+
filter: ImageFilterOption;
|
|
479
|
+
/**
|
|
480
|
+
* Defines the cancel option to cancel the filter action.
|
|
481
|
+
*/
|
|
482
|
+
cancel?: boolean;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* The interface which contains the properties for fine tunes option for the image.
|
|
486
|
+
*
|
|
487
|
+
* @remarks
|
|
488
|
+
* The `cancel` property is used for `finetuneValueChanging` event.
|
|
489
|
+
*/
|
|
490
|
+
export interface FinetuneEventArgs {
|
|
491
|
+
/**
|
|
492
|
+
* Specifies the type of fine tunes.
|
|
493
|
+
*/
|
|
494
|
+
finetune: ImageFinetuneOption;
|
|
495
|
+
/**
|
|
496
|
+
* Specifies the value of the fine tunes.
|
|
497
|
+
*/
|
|
498
|
+
value: number;
|
|
499
|
+
/**
|
|
500
|
+
* Defines the cancel option to cancel the fine tunes action.
|
|
501
|
+
*/
|
|
502
|
+
cancel?: boolean;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* Interface for Dimension calculation in the imageEditor.
|
|
506
|
+
*
|
|
507
|
+
*/
|
|
508
|
+
export interface Dimension {
|
|
509
|
+
/**
|
|
510
|
+
* Gets x position from the canvas.
|
|
511
|
+
*/
|
|
512
|
+
x?: number;
|
|
513
|
+
/**
|
|
514
|
+
* Gets y position from the canvas.
|
|
515
|
+
*/
|
|
516
|
+
y?: number;
|
|
517
|
+
/**
|
|
518
|
+
* Gets width of the image.
|
|
519
|
+
*/
|
|
520
|
+
width: number;
|
|
521
|
+
/**
|
|
522
|
+
* Gets height of the image.
|
|
523
|
+
*/
|
|
524
|
+
height: number;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Interface that provides information to the click event in the Image Editor.
|
|
528
|
+
*/
|
|
529
|
+
export interface ImageEditorClickEventArgs {
|
|
530
|
+
/**
|
|
531
|
+
* Returns the x and y coordinates of the mouse or touch action which performed in the Image Editor.
|
|
532
|
+
*/
|
|
533
|
+
point: Point;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* The Interface which contains the properties for resize action in the Image Editor.
|
|
537
|
+
*
|
|
538
|
+
* @remarks
|
|
539
|
+
* The `cancel`, `previousWidth`, and `previousHeight` properties were used for `resizing` event.
|
|
540
|
+
*/
|
|
541
|
+
export interface ResizeEventArgs {
|
|
542
|
+
/**
|
|
543
|
+
* Defines whether to cancel the resizing action of image editor.
|
|
544
|
+
*/
|
|
545
|
+
cancel?: boolean;
|
|
546
|
+
/**
|
|
547
|
+
* Returns the width of the image before resizing can be performed.
|
|
548
|
+
*/
|
|
549
|
+
previousWidth: number;
|
|
550
|
+
/**
|
|
551
|
+
* Returns the height of the image before resizing can be performed.
|
|
552
|
+
*/
|
|
553
|
+
previousHeight: number;
|
|
554
|
+
/**
|
|
555
|
+
* Returns the width of the image after resizing can be performed.
|
|
556
|
+
*/
|
|
557
|
+
width: number;
|
|
558
|
+
/**
|
|
559
|
+
* Returns the height of the image after resizing can be performed.
|
|
560
|
+
*/
|
|
561
|
+
height: number;
|
|
562
|
+
/**
|
|
563
|
+
* Returns whether the resizing action should be an aspect ratio resizing or not.
|
|
564
|
+
*/
|
|
565
|
+
isAspectRatio: boolean;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Interface for quick access toolbar for the image.
|
|
569
|
+
*
|
|
570
|
+
*/
|
|
571
|
+
export interface QuickAccessToolbarEventArgs {
|
|
572
|
+
/**
|
|
573
|
+
* Specifies whether to cancel the quick access toolbar the opening action.
|
|
574
|
+
*
|
|
575
|
+
* @remarks
|
|
576
|
+
* Set this property to `true` to cancel the quick access toolbar opening action.
|
|
577
|
+
* By default, this property is set to `false`.
|
|
578
|
+
*
|
|
579
|
+
*/
|
|
580
|
+
cancel: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* Specifies the collection of toolbar items to be rendered in a quick access toolbar.
|
|
583
|
+
*
|
|
584
|
+
* @remarks
|
|
585
|
+
* This property collection contains string and ItemModel values.
|
|
586
|
+
* The string values representing the names of the built-in toolbar items to display.
|
|
587
|
+
* The ItemModel values representing the object of custom toolbar items to display.
|
|
588
|
+
* The ItemModel will be used to enable/disable the toolbar items.
|
|
589
|
+
*
|
|
590
|
+
*/
|
|
591
|
+
toolbarItems: (string | ItemModel)[];
|
|
592
|
+
/**
|
|
593
|
+
* Returns the type of shape to be selected such as Rectangle, Text, Line, Ellipse, Arrow, Path, Image, or Freehand draw.
|
|
594
|
+
*/
|
|
595
|
+
shape?: string;
|
|
596
|
+
}
|
|
597
|
+
/**
|
|
598
|
+
* The Interface which contains the properties for frame action in the Image Editor.
|
|
599
|
+
*
|
|
600
|
+
* @remarks
|
|
601
|
+
* The `cancel` and `previousFrameSetting` properties were used for `frameChange` event.
|
|
602
|
+
*/
|
|
603
|
+
export interface FrameChangeEventArgs {
|
|
604
|
+
/**
|
|
605
|
+
* Defines whether to cancel the frame changing action of image editor.
|
|
606
|
+
*/
|
|
607
|
+
cancel?: boolean;
|
|
608
|
+
/**
|
|
609
|
+
* Returns the previous frame settings applied on the image.
|
|
610
|
+
*/
|
|
611
|
+
previousFrameSetting: FrameSettings;
|
|
612
|
+
/**
|
|
613
|
+
* Defines the current frame settings to be applied on the image.
|
|
614
|
+
*/
|
|
615
|
+
currentFrameSetting: FrameSettings;
|
|
616
|
+
}
|
|
617
|
+
/**
|
|
618
|
+
* Interface for a class FrameSettings
|
|
619
|
+
*/
|
|
620
|
+
export interface FrameSettings {
|
|
621
|
+
/**
|
|
622
|
+
* Specifies the frame option such as None, Mat, Bevel, Line, Inset, and Hook.
|
|
623
|
+
*
|
|
624
|
+
* @type {FrameType}
|
|
625
|
+
*
|
|
626
|
+
*/
|
|
627
|
+
type: FrameType;
|
|
628
|
+
/**
|
|
629
|
+
* Specifies the color of a frame.
|
|
630
|
+
* A string value specifying the color of the frame. The color can be provided in various formats, including named colors ("red", "blue") and hexadecimal notation.
|
|
631
|
+
*
|
|
632
|
+
* @type {string}
|
|
633
|
+
*
|
|
634
|
+
*/
|
|
635
|
+
color: string;
|
|
636
|
+
/**
|
|
637
|
+
* Specifies the color of a frame.
|
|
638
|
+
* A string value specifying the gradient color of the frame. The color can be provided in various formats, including named colors ("red", "blue") and hexadecimal notation.
|
|
639
|
+
*
|
|
640
|
+
* @type {string}
|
|
641
|
+
*
|
|
642
|
+
*/
|
|
643
|
+
gradientColor: string;
|
|
644
|
+
/**
|
|
645
|
+
* Specifies the size of a frame.
|
|
646
|
+
* A number value specifying the size of the frame as a percentage. The size value indicates how much of the image's dimensions the frame occupies.
|
|
647
|
+
*
|
|
648
|
+
* @type {number}
|
|
649
|
+
*
|
|
650
|
+
*/
|
|
651
|
+
size: number;
|
|
652
|
+
/**
|
|
653
|
+
* Specifies the inset value of a frame.
|
|
654
|
+
* A number value specifying the inset of the frame as a percentage. The inset value determines how far the frame is drawn inside the image boundaries.
|
|
655
|
+
*
|
|
656
|
+
* @remarks
|
|
657
|
+
* The Inset value only be available for Line, Inset, and Hook frames.
|
|
658
|
+
*
|
|
659
|
+
* @type {number}
|
|
660
|
+
*
|
|
661
|
+
*/
|
|
662
|
+
inset: number;
|
|
663
|
+
/**
|
|
664
|
+
* Specifies the offset value of a frame.
|
|
665
|
+
* A number value specifying the inset of the frame as a percentage. The inset value determines how far the frame is drawn inside the image boundaries.
|
|
666
|
+
*
|
|
667
|
+
* @remarks
|
|
668
|
+
* The Inset value only be available for Line, Inset, and Hook frames.
|
|
669
|
+
*
|
|
670
|
+
* @type {number}
|
|
671
|
+
*
|
|
672
|
+
*/
|
|
673
|
+
offset: number;
|
|
674
|
+
/**
|
|
675
|
+
* Specifies the radius value for line-type frame.
|
|
676
|
+
* A number value that specifies the border radius of the frame as a percentage. The border radius controls the curvature of the frame's corners or edges.
|
|
677
|
+
*
|
|
678
|
+
* @remarks
|
|
679
|
+
* The radius value only be available for Line and Bevel frames.
|
|
680
|
+
*
|
|
681
|
+
* @type {number}
|
|
682
|
+
*
|
|
683
|
+
*/
|
|
684
|
+
borderRadius: number;
|
|
685
|
+
/**
|
|
686
|
+
* Specifies the type of line to be drawn for line-type frame.
|
|
687
|
+
* A FrameLineStyle enumeration value that specifies the type of line to be applied as a frame.
|
|
688
|
+
*
|
|
689
|
+
* @remarks
|
|
690
|
+
* The FrameLineStyle value only be available for Line frames.
|
|
691
|
+
*
|
|
692
|
+
* @type {FrameLineStyle}
|
|
693
|
+
*
|
|
694
|
+
*/
|
|
695
|
+
frameLineStyle: FrameLineStyle;
|
|
696
|
+
/**
|
|
697
|
+
* Specifies the number of lines to be drawn for line-type frame.
|
|
698
|
+
*
|
|
699
|
+
* @remarks
|
|
700
|
+
* The lineCount value only be available for Line frame.
|
|
701
|
+
*
|
|
702
|
+
* @type {number}
|
|
703
|
+
*
|
|
704
|
+
*/
|
|
705
|
+
lineCount: number;
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* The Interface which contains the properties for loading an image into Image Editor.
|
|
709
|
+
*/
|
|
710
|
+
export interface ImageSettings {
|
|
711
|
+
/**
|
|
712
|
+
* Specifies the background color of an image. The default value of background color is an empty string (''), meaning no background color is applied by default when a transparent image is opened.
|
|
713
|
+
*/
|
|
714
|
+
backgroundColor: string;
|
|
715
|
+
/**
|
|
716
|
+
* Specifies the target width at which the image should be rendered on the canvas.
|
|
717
|
+
*/
|
|
718
|
+
width?: number;
|
|
719
|
+
/**
|
|
720
|
+
* Specifies the target height at which the image should be rendered on the canvas.
|
|
721
|
+
*/
|
|
722
|
+
height?: number;
|
|
723
|
+
/**
|
|
724
|
+
* Indicates whether to maintain the original aspect ratio when scaling the image.
|
|
725
|
+
*/
|
|
726
|
+
isAspectRatio?: boolean;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* The Interface which contains the tranformation collection of annotation in Image Editor.
|
|
730
|
+
*/
|
|
731
|
+
export interface TransformationCollection {
|
|
732
|
+
/**
|
|
733
|
+
* Returns the transformed degree of annotation.
|
|
734
|
+
*/
|
|
735
|
+
degree?: number;
|
|
736
|
+
/**
|
|
737
|
+
* Returns the transformed flip state of annotation.
|
|
738
|
+
*/
|
|
739
|
+
flip?: Direction;
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Interface for active object in the imageEditor.
|
|
743
|
+
*
|
|
744
|
+
* @private
|
|
745
|
+
*/
|
|
746
|
+
export interface ActivePoint {
|
|
747
|
+
/**
|
|
748
|
+
* Gets mouse down x-point.
|
|
749
|
+
*/
|
|
750
|
+
startX: number;
|
|
751
|
+
/**
|
|
752
|
+
* Gets mouse down y-point.
|
|
753
|
+
*/
|
|
754
|
+
startY: number;
|
|
755
|
+
/**
|
|
756
|
+
* Gets mouse move x-point.
|
|
757
|
+
*/
|
|
758
|
+
endX?: number;
|
|
759
|
+
/**
|
|
760
|
+
* Gets mouse move y-point.
|
|
761
|
+
*/
|
|
762
|
+
endY?: number;
|
|
763
|
+
/**
|
|
764
|
+
* Gets width of the selection.
|
|
765
|
+
*/
|
|
766
|
+
width?: number;
|
|
767
|
+
/**
|
|
768
|
+
* Gets height of the selection.
|
|
769
|
+
*/
|
|
770
|
+
height?: number;
|
|
771
|
+
/**
|
|
772
|
+
* Gets radius of the circle dot.
|
|
773
|
+
*/
|
|
774
|
+
radius?: number;
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Defines the cropped value of all Objects for Image Editor.
|
|
778
|
+
*
|
|
779
|
+
* @private
|
|
780
|
+
*/
|
|
781
|
+
export interface CurrentObject {
|
|
782
|
+
/**
|
|
783
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
784
|
+
*/
|
|
785
|
+
cropZoom: number;
|
|
786
|
+
/**
|
|
787
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
788
|
+
*/
|
|
789
|
+
defaultZoom: number;
|
|
790
|
+
/**
|
|
791
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
792
|
+
*/
|
|
793
|
+
zoomFactor: number;
|
|
794
|
+
/**
|
|
795
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
796
|
+
*/
|
|
797
|
+
previousZoomValue: number;
|
|
798
|
+
/**
|
|
799
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
800
|
+
*/
|
|
801
|
+
straightenZoom: number;
|
|
802
|
+
/**
|
|
803
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
804
|
+
*/
|
|
805
|
+
totalPannedPoint: Point;
|
|
806
|
+
/**
|
|
807
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
808
|
+
*/
|
|
809
|
+
totalPannedClientPoint: Point;
|
|
810
|
+
/**
|
|
811
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
812
|
+
*/
|
|
813
|
+
totalPannedInternalPoint: Point;
|
|
814
|
+
/**
|
|
815
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
816
|
+
*/
|
|
817
|
+
tempFlipPanPoint: Point;
|
|
818
|
+
/**
|
|
819
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
820
|
+
*/
|
|
821
|
+
activeObj: SelectionPoint;
|
|
822
|
+
/**
|
|
823
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
824
|
+
*/
|
|
825
|
+
rotateFlipColl: string[] | number[];
|
|
826
|
+
/**
|
|
827
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
828
|
+
*/
|
|
829
|
+
degree: number;
|
|
830
|
+
/**
|
|
831
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
832
|
+
*/
|
|
833
|
+
currFlipState: string;
|
|
834
|
+
/**
|
|
835
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
836
|
+
*/
|
|
837
|
+
straighten: number;
|
|
838
|
+
/**
|
|
839
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
840
|
+
*/
|
|
841
|
+
destPoints: ActivePoint;
|
|
842
|
+
/**
|
|
843
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
844
|
+
*/
|
|
845
|
+
srcPoints: ActivePoint;
|
|
846
|
+
/**
|
|
847
|
+
* Specifies the filter for the image in Image Editor.
|
|
848
|
+
*/
|
|
849
|
+
filter: string;
|
|
850
|
+
/**
|
|
851
|
+
* Specifies the brightness finetune is adjusted or not for the image in Image Editor.
|
|
852
|
+
*/
|
|
853
|
+
isBrightAdjust: boolean;
|
|
854
|
+
/**
|
|
855
|
+
* Specifies the width of image to be resized in Image Editor.
|
|
856
|
+
*/
|
|
857
|
+
aspectWidth: number;
|
|
858
|
+
/**
|
|
859
|
+
* Specifies the height of image to be resized in Image Editor.
|
|
860
|
+
*/
|
|
861
|
+
aspectHeight: number;
|
|
862
|
+
/**
|
|
863
|
+
* Specifies the frame to be drawn in the image in Image Editor.
|
|
864
|
+
*/
|
|
865
|
+
frame: string;
|
|
866
|
+
/**
|
|
867
|
+
* Specifies the finetune value in Image Editor.
|
|
868
|
+
*/
|
|
869
|
+
adjustmentLevel: Adjustment;
|
|
870
|
+
/**
|
|
871
|
+
* Specifies the selected filter value in Image Editor.
|
|
872
|
+
*/
|
|
873
|
+
currentFilter: string;
|
|
874
|
+
/**
|
|
875
|
+
* Specifies the frame object to be drawn on the image in Image Editor.
|
|
876
|
+
*/
|
|
877
|
+
frameObj?: FrameValue;
|
|
878
|
+
/**
|
|
879
|
+
* Specifies the object collection in Image Editor.
|
|
880
|
+
*/
|
|
881
|
+
objColl?: SelectionPoint[];
|
|
882
|
+
/**
|
|
883
|
+
* Specifies the point collections for freehand drawing in Image Editor.
|
|
884
|
+
*/
|
|
885
|
+
pointColl?: Point[];
|
|
886
|
+
/**
|
|
887
|
+
* Specifies the selection point collections for freehand drawing in Image Editor.
|
|
888
|
+
*/
|
|
889
|
+
selPointColl?: Point[];
|
|
890
|
+
/**
|
|
891
|
+
* Specifies the action collections performed after cropping in Image Editor.
|
|
892
|
+
*/
|
|
893
|
+
afterCropActions?: string[];
|
|
894
|
+
/**
|
|
895
|
+
* Specifies the action collections performed after cropping in Image Editor.
|
|
896
|
+
*/
|
|
897
|
+
currSelectionPoint?: SelectionPoint;
|
|
898
|
+
/**
|
|
899
|
+
* Specifies the source of the loaded image in Image Editor.
|
|
900
|
+
*/
|
|
901
|
+
imageSource?: string;
|
|
902
|
+
/**
|
|
903
|
+
* Specifies the background color of image in Image Editor.
|
|
904
|
+
*/
|
|
905
|
+
bgColor?: string;
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* Defines the stroke color, fillColor and strokeWidth properties for Image Editor.
|
|
909
|
+
*
|
|
910
|
+
* @private
|
|
911
|
+
*/
|
|
912
|
+
export interface StrokeSettings {
|
|
913
|
+
/**
|
|
914
|
+
* Specifies the stroke color for the object in Image Editor.
|
|
915
|
+
*/
|
|
916
|
+
strokeColor: string;
|
|
917
|
+
/**
|
|
918
|
+
* Specifies the background color for the object in Image Editor.
|
|
919
|
+
*/
|
|
920
|
+
fillColor: string;
|
|
921
|
+
/**
|
|
922
|
+
* Specifies the stroke width for the object in Image Editor.
|
|
923
|
+
*/
|
|
924
|
+
strokeWidth: number;
|
|
925
|
+
/**
|
|
926
|
+
* Specifies the flip state for the object in Image Editor.
|
|
927
|
+
*/
|
|
928
|
+
flipState?: string;
|
|
929
|
+
/**
|
|
930
|
+
* Specifies the flip state for the object in Image Editor.
|
|
931
|
+
*/
|
|
932
|
+
radius?: number;
|
|
933
|
+
/**
|
|
934
|
+
* Specifies the stroke text color for Text Annotation.
|
|
935
|
+
*/
|
|
936
|
+
outlineColor?: string;
|
|
937
|
+
/**
|
|
938
|
+
* Specifies the stroke width for the object in Image Editor.
|
|
939
|
+
*/
|
|
940
|
+
outlineWidth?: number;
|
|
941
|
+
}
|
|
942
|
+
/**
|
|
943
|
+
* Defines the destination and source points of image to draw in canvas.
|
|
944
|
+
*
|
|
945
|
+
* @private
|
|
946
|
+
*/
|
|
947
|
+
export interface ImageDimension {
|
|
948
|
+
/**
|
|
949
|
+
* Specifies the x coordinate where to place the image on the canvas.
|
|
950
|
+
*/
|
|
951
|
+
destLeft: number;
|
|
952
|
+
/**
|
|
953
|
+
* Specifies the y coordinate where to place the image on the canvas.
|
|
954
|
+
*/
|
|
955
|
+
destTop: number;
|
|
956
|
+
/**
|
|
957
|
+
* Specifies the width of the image to draw on the canvas.
|
|
958
|
+
*/
|
|
959
|
+
destWidth: number;
|
|
960
|
+
/**
|
|
961
|
+
* Specifies the height of the image to draw on the canvas.
|
|
962
|
+
*/
|
|
963
|
+
destHeight: number;
|
|
964
|
+
/**
|
|
965
|
+
* Specifies the x coordinate where to start clipping from the image.
|
|
966
|
+
*/
|
|
967
|
+
srcLeft: number;
|
|
968
|
+
/**
|
|
969
|
+
* Specifies the y coordinate where to start clipping from the image.
|
|
970
|
+
*/
|
|
971
|
+
srcTop: number;
|
|
972
|
+
/**
|
|
973
|
+
* Specifies the width of the clipped image.
|
|
974
|
+
*/
|
|
975
|
+
srcWidth: number;
|
|
976
|
+
/**
|
|
977
|
+
* Specifies the height of the clipped image.
|
|
978
|
+
*/
|
|
979
|
+
srcHeight: number;
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* Defines the transformed values of image in canvas.
|
|
983
|
+
*
|
|
984
|
+
* @private
|
|
985
|
+
*/
|
|
986
|
+
export interface TransformValue {
|
|
987
|
+
/**
|
|
988
|
+
* Specifies the rotated degree of image on the canvas.
|
|
989
|
+
*/
|
|
990
|
+
degree: number;
|
|
991
|
+
/**
|
|
992
|
+
* Specifies the flipped state of image on the canvas.
|
|
993
|
+
*/
|
|
994
|
+
currFlipState: string;
|
|
995
|
+
/**
|
|
996
|
+
* Specifies the total zoomed value of image on the canvas.
|
|
997
|
+
*/
|
|
998
|
+
zoomFactor: number;
|
|
999
|
+
/**
|
|
1000
|
+
* Specifies the zoomed value of image in selection state on the canvas.
|
|
1001
|
+
*/
|
|
1002
|
+
cropZoomFactor: number;
|
|
1003
|
+
/**
|
|
1004
|
+
* Specifies the zoomed value of image in non-selection state on the canvas.
|
|
1005
|
+
*/
|
|
1006
|
+
defaultZoomFactor: number;
|
|
1007
|
+
/**
|
|
1008
|
+
* Specifies the straighten value of image on the canvas.
|
|
1009
|
+
*/
|
|
1010
|
+
straighten: number;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Defines the panned values of image in canvas.
|
|
1014
|
+
*
|
|
1015
|
+
* @private
|
|
1016
|
+
*/
|
|
1017
|
+
export interface PanPoint {
|
|
1018
|
+
/**
|
|
1019
|
+
* Specifies the temporary difference of old panned point and new panned point.
|
|
1020
|
+
*/
|
|
1021
|
+
currentPannedPoint: Point;
|
|
1022
|
+
/**
|
|
1023
|
+
* Specifies the total panned point in non-rotated state from center of the image.
|
|
1024
|
+
*/
|
|
1025
|
+
totalPannedPoint: Point;
|
|
1026
|
+
/**
|
|
1027
|
+
* Specifies the total temporary panned point in rotated state from center of the image.
|
|
1028
|
+
*/
|
|
1029
|
+
totalPannedInternalPoint: Point;
|
|
1030
|
+
/**
|
|
1031
|
+
* Specifies the total panned point in rotated state from center of the image.
|
|
1032
|
+
*/
|
|
1033
|
+
totalPannedClientPoint: Point;
|
|
1034
|
+
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Defines the text, fontFamily, fontSize, bold, italic and underline properties for Image Editor.
|
|
1037
|
+
*
|
|
1038
|
+
* @private
|
|
1039
|
+
*/
|
|
1040
|
+
export interface TextSettings {
|
|
1041
|
+
/**
|
|
1042
|
+
* Specifies pre-defined text on canvas.
|
|
1043
|
+
*/
|
|
1044
|
+
text: string;
|
|
1045
|
+
/**
|
|
1046
|
+
* Specifies the fontFamily for the text content.
|
|
1047
|
+
*/
|
|
1048
|
+
fontFamily: string;
|
|
1049
|
+
/**
|
|
1050
|
+
* Specifies the fontSize for the text content.
|
|
1051
|
+
*/
|
|
1052
|
+
fontSize: number;
|
|
1053
|
+
/**
|
|
1054
|
+
* Specifies the fontSize for the text content.
|
|
1055
|
+
*/
|
|
1056
|
+
fontRatio: number;
|
|
1057
|
+
/**
|
|
1058
|
+
* Specifies the bold styles for the text content.
|
|
1059
|
+
*/
|
|
1060
|
+
bold: boolean;
|
|
1061
|
+
/**
|
|
1062
|
+
* Specifies the italic styles for the text content.
|
|
1063
|
+
*/
|
|
1064
|
+
italic: boolean;
|
|
1065
|
+
/**
|
|
1066
|
+
* Specifies the underline styles for the text content.
|
|
1067
|
+
*/
|
|
1068
|
+
underline: boolean;
|
|
1069
|
+
/**
|
|
1070
|
+
* Specifies the strikethrough styles for the text content.
|
|
1071
|
+
*/
|
|
1072
|
+
strikethrough: boolean;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* Interface for Transition occur in the Image Editor.
|
|
1076
|
+
*
|
|
1077
|
+
* @private
|
|
1078
|
+
*/
|
|
1079
|
+
export interface Transition {
|
|
1080
|
+
/**
|
|
1081
|
+
* Specifies the operation name for undo / redo in Image Editor.
|
|
1082
|
+
*/
|
|
1083
|
+
operation: string;
|
|
1084
|
+
/**
|
|
1085
|
+
* Specifies all previous object in Image Editor.
|
|
1086
|
+
*/
|
|
1087
|
+
previousObj: CurrentObject;
|
|
1088
|
+
/**
|
|
1089
|
+
* Specifies all current object in Image Editor.
|
|
1090
|
+
*/
|
|
1091
|
+
currentObj: CurrentObject;
|
|
1092
|
+
/**
|
|
1093
|
+
* Specifies the previous object collection in Image Editor.
|
|
1094
|
+
*/
|
|
1095
|
+
previousObjColl: SelectionPoint[];
|
|
1096
|
+
/**
|
|
1097
|
+
* Specifies the current object collection in Image Editor.
|
|
1098
|
+
*/
|
|
1099
|
+
currentObjColl: SelectionPoint[];
|
|
1100
|
+
/**
|
|
1101
|
+
* Specifies the previous point collection in Image Editor.
|
|
1102
|
+
*/
|
|
1103
|
+
previousPointColl: Point[];
|
|
1104
|
+
/**
|
|
1105
|
+
* Specifies the current point collection in Image Editor.
|
|
1106
|
+
*/
|
|
1107
|
+
currentPointColl: Point[];
|
|
1108
|
+
/**
|
|
1109
|
+
* Specifies the previous selection point collection in Image Editor.
|
|
1110
|
+
*/
|
|
1111
|
+
previousSelPointColl: Point[];
|
|
1112
|
+
/**
|
|
1113
|
+
* Specifies the current selection point collection in Image Editor.
|
|
1114
|
+
*/
|
|
1115
|
+
currentSelPointColl: Point[];
|
|
1116
|
+
/**
|
|
1117
|
+
* Specifies the previous crop object in Image Editor.
|
|
1118
|
+
*/
|
|
1119
|
+
previousCropObj: CurrentObject;
|
|
1120
|
+
/**
|
|
1121
|
+
* Specifies the current crop object in Image Editor.
|
|
1122
|
+
*/
|
|
1123
|
+
currentCropObj: CurrentObject;
|
|
1124
|
+
/**
|
|
1125
|
+
* Specifies the previous text from the text area in Image Editor.
|
|
1126
|
+
*/
|
|
1127
|
+
previousText?: string;
|
|
1128
|
+
/**
|
|
1129
|
+
* Specifies the current text from the text area in Image Editor.
|
|
1130
|
+
*/
|
|
1131
|
+
currentText?: string;
|
|
1132
|
+
/**
|
|
1133
|
+
* Specifies the current filter in Image Editor.
|
|
1134
|
+
*/
|
|
1135
|
+
filter?: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* Specifies the circle crop value in Image Editor.
|
|
1138
|
+
*/
|
|
1139
|
+
isCircleCrop?: boolean;
|
|
1140
|
+
/**
|
|
1141
|
+
* Specifies the finetune slider value in Image Editor.
|
|
1142
|
+
*/
|
|
1143
|
+
adjustmentLevel?: Adjustment;
|
|
1144
|
+
/**
|
|
1145
|
+
* Specifies the selected filter value in Image Editor.
|
|
1146
|
+
*/
|
|
1147
|
+
currentFilter?: string;
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Interface for freehand drawing in the Image Editor.
|
|
1151
|
+
*
|
|
1152
|
+
* @private
|
|
1153
|
+
*/
|
|
1154
|
+
export interface FreehandDraw {
|
|
1155
|
+
/**
|
|
1156
|
+
* Specifies the last width of freehand draw points in Image Editor.
|
|
1157
|
+
*/
|
|
1158
|
+
lastWidth: number;
|
|
1159
|
+
/**
|
|
1160
|
+
* Specifies the last velocity of freehand draw points in Image Editor.
|
|
1161
|
+
*/
|
|
1162
|
+
lastVelocity: number;
|
|
1163
|
+
/**
|
|
1164
|
+
* Specifies the time of freehand draw points in Image Editor.
|
|
1165
|
+
*/
|
|
1166
|
+
time: number;
|
|
1167
|
+
/**
|
|
1168
|
+
* Specifies the x point of freehand draw points in Image Editor.
|
|
1169
|
+
*/
|
|
1170
|
+
pointX: number;
|
|
1171
|
+
/**
|
|
1172
|
+
* Specifies the y point of freehand draw points in Image Editor.
|
|
1173
|
+
*/
|
|
1174
|
+
pointY: number;
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Interface for Transition occur in the Image Editor.
|
|
1178
|
+
*
|
|
1179
|
+
* @private
|
|
1180
|
+
*/
|
|
1181
|
+
export interface Adjustment {
|
|
1182
|
+
/**
|
|
1183
|
+
* Gets brightness level of image.
|
|
1184
|
+
*/
|
|
1185
|
+
brightness: number;
|
|
1186
|
+
/**
|
|
1187
|
+
* Gets contrast level of image.
|
|
1188
|
+
*/
|
|
1189
|
+
contrast: number;
|
|
1190
|
+
/**
|
|
1191
|
+
* Gets hue level of image.
|
|
1192
|
+
*/
|
|
1193
|
+
hue: number;
|
|
1194
|
+
/**
|
|
1195
|
+
* Gets saturation level of image.
|
|
1196
|
+
*/
|
|
1197
|
+
saturation: number;
|
|
1198
|
+
/**
|
|
1199
|
+
* Gets exposure level of image.
|
|
1200
|
+
*/
|
|
1201
|
+
exposure: number;
|
|
1202
|
+
/**
|
|
1203
|
+
* Gets opacity level of image.
|
|
1204
|
+
*/
|
|
1205
|
+
opacity: number;
|
|
1206
|
+
/**
|
|
1207
|
+
* Gets blur level of image.
|
|
1208
|
+
*/
|
|
1209
|
+
blur: number;
|
|
1210
|
+
/**
|
|
1211
|
+
* Gets transparency level of image.
|
|
1212
|
+
*/
|
|
1213
|
+
transparency: number;
|
|
1214
|
+
/**
|
|
1215
|
+
* Gets sharpness level of image.
|
|
1216
|
+
*/
|
|
1217
|
+
sharpen: boolean;
|
|
1218
|
+
/**
|
|
1219
|
+
* Gets black and white level of image.
|
|
1220
|
+
*/
|
|
1221
|
+
bw: boolean;
|
|
1222
|
+
}
|
|
1223
|
+
/**
|
|
1224
|
+
* Interface for interaction occur in the Image Editor.
|
|
1225
|
+
*
|
|
1226
|
+
* @private
|
|
1227
|
+
*/
|
|
1228
|
+
export interface Interaction {
|
|
1229
|
+
/**
|
|
1230
|
+
* Gets function name called from the canvas.
|
|
1231
|
+
*/
|
|
1232
|
+
shape: string;
|
|
1233
|
+
/**
|
|
1234
|
+
* Gets function name called from the canvas.
|
|
1235
|
+
*/
|
|
1236
|
+
isDragging: boolean;
|
|
1237
|
+
/**
|
|
1238
|
+
* Gets function name called from the canvas.
|
|
1239
|
+
*/
|
|
1240
|
+
isActiveObj: boolean;
|
|
1241
|
+
/**
|
|
1242
|
+
* Gets function name called from the canvas.
|
|
1243
|
+
*/
|
|
1244
|
+
isText: boolean;
|
|
1245
|
+
/**
|
|
1246
|
+
* Gets function name called from the canvas.
|
|
1247
|
+
*/
|
|
1248
|
+
isInitialText: boolean;
|
|
1249
|
+
/**
|
|
1250
|
+
* Gets function name called from the canvas.
|
|
1251
|
+
*/
|
|
1252
|
+
isLine: boolean;
|
|
1253
|
+
/**
|
|
1254
|
+
* Gets function name called from the canvas.
|
|
1255
|
+
*/
|
|
1256
|
+
isInitialLine: boolean;
|
|
1257
|
+
/**
|
|
1258
|
+
* Gets function name called from the canvas.
|
|
1259
|
+
*/
|
|
1260
|
+
isCustomCrop: boolean;
|
|
1261
|
+
/**
|
|
1262
|
+
* Gets function name called from the canvas.
|
|
1263
|
+
*/
|
|
1264
|
+
isZoomed: boolean;
|
|
1265
|
+
/**
|
|
1266
|
+
* Gets function name called from the canvas.
|
|
1267
|
+
*/
|
|
1268
|
+
isUndoZoom: boolean;
|
|
1269
|
+
/**
|
|
1270
|
+
* Gets function name called from the canvas.
|
|
1271
|
+
*/
|
|
1272
|
+
isUndoAction: boolean;
|
|
1273
|
+
/**
|
|
1274
|
+
* Gets function name called from the canvas.
|
|
1275
|
+
*/
|
|
1276
|
+
isFiltered: boolean;
|
|
1277
|
+
/**
|
|
1278
|
+
* Gets function name called from the canvas.
|
|
1279
|
+
*/
|
|
1280
|
+
isSave: boolean;
|
|
1281
|
+
/**
|
|
1282
|
+
* Gets function name called from the canvas.
|
|
1283
|
+
*/
|
|
1284
|
+
isResize: boolean;
|
|
1285
|
+
/**
|
|
1286
|
+
* Gets function name called from the canvas.
|
|
1287
|
+
*/
|
|
1288
|
+
isRedact: boolean;
|
|
1289
|
+
}
|
|
1290
|
+
/**
|
|
1291
|
+
* Interface for frame support in the Image Editor.
|
|
1292
|
+
*
|
|
1293
|
+
* @private
|
|
1294
|
+
*/
|
|
1295
|
+
export interface FrameValue {
|
|
1296
|
+
/**
|
|
1297
|
+
* Gets type of the frame.
|
|
1298
|
+
*/
|
|
1299
|
+
type: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* Gets color of the frame.
|
|
1302
|
+
*/
|
|
1303
|
+
color: string;
|
|
1304
|
+
/**
|
|
1305
|
+
* Gets size of the frame.
|
|
1306
|
+
*/
|
|
1307
|
+
size: number;
|
|
1308
|
+
/**
|
|
1309
|
+
* Gets inset value of the frame.
|
|
1310
|
+
*/
|
|
1311
|
+
inset: number;
|
|
1312
|
+
/**
|
|
1313
|
+
* Gets offset value of the frame.
|
|
1314
|
+
*/
|
|
1315
|
+
offset: number;
|
|
1316
|
+
/**
|
|
1317
|
+
* Gets radius of the frame.
|
|
1318
|
+
*/
|
|
1319
|
+
radius: number;
|
|
1320
|
+
/**
|
|
1321
|
+
* Gets amount of the frame.
|
|
1322
|
+
*/
|
|
1323
|
+
amount: number;
|
|
1324
|
+
/**
|
|
1325
|
+
* Gets line type of the frame.
|
|
1326
|
+
*/
|
|
1327
|
+
border: string;
|
|
1328
|
+
/**
|
|
1329
|
+
* Gets gradient color of the frame.
|
|
1330
|
+
*/
|
|
1331
|
+
gradientColor: string;
|
|
1332
|
+
}
|
|
1333
|
+
/**
|
|
1334
|
+
* Interface for Selection Object in the Image Editor.
|
|
1335
|
+
*
|
|
1336
|
+
* @private
|
|
1337
|
+
*/
|
|
1338
|
+
export interface SelectionPoint {
|
|
1339
|
+
/**
|
|
1340
|
+
* Gets start and end x, y Point.
|
|
1341
|
+
*/
|
|
1342
|
+
horTopLine: ActivePoint;
|
|
1343
|
+
/**
|
|
1344
|
+
* Gets start and end x, y Point.
|
|
1345
|
+
*/
|
|
1346
|
+
horTopInnerLine: ActivePoint;
|
|
1347
|
+
/**
|
|
1348
|
+
* Gets start and end x, y Point.
|
|
1349
|
+
*/
|
|
1350
|
+
horBottomInnerLine: ActivePoint;
|
|
1351
|
+
/**
|
|
1352
|
+
* Gets start and end x, y Point.
|
|
1353
|
+
*/
|
|
1354
|
+
horBottomLine: ActivePoint;
|
|
1355
|
+
/**
|
|
1356
|
+
* Gets start and end x, y Point.
|
|
1357
|
+
*/
|
|
1358
|
+
verLeftLine: ActivePoint;
|
|
1359
|
+
/**
|
|
1360
|
+
* Gets start and end x, y Point.
|
|
1361
|
+
*/
|
|
1362
|
+
verLeftInnerLine: ActivePoint;
|
|
1363
|
+
/**
|
|
1364
|
+
* Gets start and end x, y Point.
|
|
1365
|
+
*/
|
|
1366
|
+
verRightInnerLine: ActivePoint;
|
|
1367
|
+
/**
|
|
1368
|
+
* Gets start and end x, y Point.
|
|
1369
|
+
*/
|
|
1370
|
+
verRightLine: ActivePoint;
|
|
1371
|
+
/**
|
|
1372
|
+
* Gets start and end x, y Point with radius.
|
|
1373
|
+
*/
|
|
1374
|
+
topLeftCircle: ActivePoint;
|
|
1375
|
+
/**
|
|
1376
|
+
* Gets start and end x, y Point with radius.
|
|
1377
|
+
*/
|
|
1378
|
+
topCenterCircle: ActivePoint;
|
|
1379
|
+
/**
|
|
1380
|
+
* Gets start and end x, y Point with radius.
|
|
1381
|
+
*/
|
|
1382
|
+
topRightCircle: ActivePoint;
|
|
1383
|
+
/**
|
|
1384
|
+
* Gets start and end x, y Point with radius.
|
|
1385
|
+
*/
|
|
1386
|
+
centerLeftCircle: ActivePoint;
|
|
1387
|
+
/**
|
|
1388
|
+
* Gets start and end x, y Point with radius.
|
|
1389
|
+
*/
|
|
1390
|
+
centerRightCircle: ActivePoint;
|
|
1391
|
+
/**
|
|
1392
|
+
* Gets start and end x, y Point with radius.
|
|
1393
|
+
*/
|
|
1394
|
+
bottomLeftCircle: ActivePoint;
|
|
1395
|
+
/**
|
|
1396
|
+
* Gets start and end x, y Point with radius.
|
|
1397
|
+
*/
|
|
1398
|
+
bottomCenterCircle: ActivePoint;
|
|
1399
|
+
/**
|
|
1400
|
+
* Gets start and end x, y Point with radius.
|
|
1401
|
+
*/
|
|
1402
|
+
bottomRightCircle: ActivePoint;
|
|
1403
|
+
/**
|
|
1404
|
+
* Gets start and end x, y Point with radius.
|
|
1405
|
+
*/
|
|
1406
|
+
activePoint: ActivePoint;
|
|
1407
|
+
/**
|
|
1408
|
+
* Gets angle of rotated shape.
|
|
1409
|
+
*/
|
|
1410
|
+
rotatedAngle: number;
|
|
1411
|
+
/**
|
|
1412
|
+
* Gets order of shape.
|
|
1413
|
+
*/
|
|
1414
|
+
order: number;
|
|
1415
|
+
/**
|
|
1416
|
+
* Gets start and end x, y Point with radius.
|
|
1417
|
+
*/
|
|
1418
|
+
imageRatio?: ActivePoint;
|
|
1419
|
+
/**
|
|
1420
|
+
* Gets the shape to be drawn.
|
|
1421
|
+
*/
|
|
1422
|
+
shape?: string;
|
|
1423
|
+
/**
|
|
1424
|
+
* Gets the line direction to be drawn.
|
|
1425
|
+
*/
|
|
1426
|
+
lineDraw?: string;
|
|
1427
|
+
/**
|
|
1428
|
+
* Gets the text to be drawn.
|
|
1429
|
+
*/
|
|
1430
|
+
keyHistory?: string;
|
|
1431
|
+
/**
|
|
1432
|
+
* Gets the direction to be dragged.
|
|
1433
|
+
*/
|
|
1434
|
+
dragDirection?: string;
|
|
1435
|
+
/**
|
|
1436
|
+
* Gets the degree of the inserted shape / text.
|
|
1437
|
+
*/
|
|
1438
|
+
shapeDegree?: number;
|
|
1439
|
+
/**
|
|
1440
|
+
* Gets the flipped state of shape / text.
|
|
1441
|
+
*/
|
|
1442
|
+
textFlip?: string;
|
|
1443
|
+
/**
|
|
1444
|
+
* Gets the flipped state of shape / text.
|
|
1445
|
+
*/
|
|
1446
|
+
shapeFlip?: string;
|
|
1447
|
+
/**
|
|
1448
|
+
* Gets the properties to customize the text.
|
|
1449
|
+
*/
|
|
1450
|
+
textSettings?: TextSettings;
|
|
1451
|
+
/**
|
|
1452
|
+
* Gets the properties to customize the stroke.
|
|
1453
|
+
*/
|
|
1454
|
+
strokeSettings?: StrokeSettings;
|
|
1455
|
+
/**
|
|
1456
|
+
* Gets the current index of object from the array.
|
|
1457
|
+
*/
|
|
1458
|
+
currIndex?: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* Gets the flip object collection from the array.
|
|
1461
|
+
*/
|
|
1462
|
+
flipObjColl?: string[];
|
|
1463
|
+
/**
|
|
1464
|
+
* Gets in between x, y points of line or arrow shape.
|
|
1465
|
+
*/
|
|
1466
|
+
pointColl?: Point[];
|
|
1467
|
+
/**
|
|
1468
|
+
* Gets in between x, y points of horizontal top line of shape.
|
|
1469
|
+
*/
|
|
1470
|
+
horTopLinePointColl?: Point[];
|
|
1471
|
+
/**
|
|
1472
|
+
* Gets in between x, y points of horizontal bottom line of shape.
|
|
1473
|
+
*/
|
|
1474
|
+
horBottomLinePointColl?: Point[];
|
|
1475
|
+
/**
|
|
1476
|
+
* Gets in between x, y points of vertical left line of shape.
|
|
1477
|
+
*/
|
|
1478
|
+
verLeftLinePointColl?: Point[];
|
|
1479
|
+
/**
|
|
1480
|
+
* Gets in between x, y points of vertical right line of shape.
|
|
1481
|
+
*/
|
|
1482
|
+
verRightLinePointColl?: Point[];
|
|
1483
|
+
/**
|
|
1484
|
+
* Gets x, y points of rotation shape.
|
|
1485
|
+
*/
|
|
1486
|
+
rotationCirclePoint?: Point;
|
|
1487
|
+
/**
|
|
1488
|
+
* Gets x, y points of rotation shape in each rotation.
|
|
1489
|
+
*/
|
|
1490
|
+
rotationCirclePointColl?: Point;
|
|
1491
|
+
/**
|
|
1492
|
+
* Gets ratio of rotation line distance in each rotation.
|
|
1493
|
+
*/
|
|
1494
|
+
rotationCircleLine: number;
|
|
1495
|
+
/**
|
|
1496
|
+
* Gets the triangle value from the object.
|
|
1497
|
+
*/
|
|
1498
|
+
triangle?: Point[];
|
|
1499
|
+
/**
|
|
1500
|
+
* Gets the triangle ratio from the object.
|
|
1501
|
+
*/
|
|
1502
|
+
triangleRatio?: Point[];
|
|
1503
|
+
/**
|
|
1504
|
+
* Gets the triangle direction from the object.
|
|
1505
|
+
*/
|
|
1506
|
+
triangleDirection?: string;
|
|
1507
|
+
/**
|
|
1508
|
+
* Gets the start type of arrow shape.
|
|
1509
|
+
*/
|
|
1510
|
+
start?: string;
|
|
1511
|
+
/**
|
|
1512
|
+
* Gets the end type of arrow shape.
|
|
1513
|
+
*/
|
|
1514
|
+
end?: string;
|
|
1515
|
+
/**
|
|
1516
|
+
* Gets the canvas of image shape.
|
|
1517
|
+
*/
|
|
1518
|
+
imageCanvas?: HTMLCanvasElement;
|
|
1519
|
+
/**
|
|
1520
|
+
* Gets the image element of image shape.
|
|
1521
|
+
*/
|
|
1522
|
+
imageElement?: HTMLImageElement;
|
|
1523
|
+
/**
|
|
1524
|
+
* Gets the image element is flipped in horizontal or not.
|
|
1525
|
+
*/
|
|
1526
|
+
isHorImageFlip?: boolean;
|
|
1527
|
+
/**
|
|
1528
|
+
* Gets the image element is flipped in vertical or not.
|
|
1529
|
+
*/
|
|
1530
|
+
isVerImageFlip?: boolean;
|
|
1531
|
+
/**
|
|
1532
|
+
* Gets the transform collection values.
|
|
1533
|
+
*/
|
|
1534
|
+
rotateFlipColl?: any;
|
|
1535
|
+
/**
|
|
1536
|
+
* Gets the opacity value of image annotation.
|
|
1537
|
+
*/
|
|
1538
|
+
opacity?: number;
|
|
1539
|
+
/**
|
|
1540
|
+
* Prevents shapes from being dragged outside the image boundary.
|
|
1541
|
+
*/
|
|
1542
|
+
preventShapeDragOut?: boolean;
|
|
1543
|
+
/**
|
|
1544
|
+
* Gets redact type.
|
|
1545
|
+
*/
|
|
1546
|
+
redactType?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Gets blur value of redact.
|
|
1549
|
+
*/
|
|
1550
|
+
redactBlur?: number;
|
|
1551
|
+
/**
|
|
1552
|
+
* Gets pixelate value of redact.
|
|
1553
|
+
*/
|
|
1554
|
+
redactPixelate?: number;
|
|
1555
|
+
/**
|
|
1556
|
+
* Gets redact image.
|
|
1557
|
+
*/
|
|
1558
|
+
redactImage?: HTMLCanvasElement;
|
|
1559
|
+
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Interface for RedactSettings in the Image Editor.
|
|
1562
|
+
*/
|
|
1563
|
+
export interface RedactSettings {
|
|
1564
|
+
/**
|
|
1565
|
+
* Returns the id of the shape.
|
|
1566
|
+
*/
|
|
1567
|
+
type: RedactType;
|
|
1568
|
+
/**
|
|
1569
|
+
* Returns the type of the shape.
|
|
1570
|
+
*/
|
|
1571
|
+
id: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Returns the start x position of the redaction.
|
|
1574
|
+
*/
|
|
1575
|
+
startX: number;
|
|
1576
|
+
/**
|
|
1577
|
+
* Returns the start y position of the redaction.
|
|
1578
|
+
*/
|
|
1579
|
+
startY: number;
|
|
1580
|
+
/**
|
|
1581
|
+
* Returns the width of the redaction.
|
|
1582
|
+
*/
|
|
1583
|
+
width: number;
|
|
1584
|
+
/**
|
|
1585
|
+
* Returns the height of the redaction.
|
|
1586
|
+
*/
|
|
1587
|
+
height: number;
|
|
1588
|
+
/**
|
|
1589
|
+
* Returns the intensity of the blur effect used in blur-type redactions within the image editor.
|
|
1590
|
+
*
|
|
1591
|
+
* @remarks
|
|
1592
|
+
* This property is specifically applicable for redactions that use the blur effect. For other redaction, the value should be null by default.
|
|
1593
|
+
* The default blur value is 20, with a permissible range from a minimum of 10 to maximum) of 50 to control the intensity of the redaction.
|
|
1594
|
+
*
|
|
1595
|
+
*/
|
|
1596
|
+
blurIntensity?: number;
|
|
1597
|
+
/**
|
|
1598
|
+
* Returns the pixel size for the pixelate-type redaction within the image editor.
|
|
1599
|
+
*
|
|
1600
|
+
* @remarks
|
|
1601
|
+
* This property is specific to redaction using the pixelate effect. For other redaction the pixel size should default to null.
|
|
1602
|
+
* The default value is 5, with a permissible range from a minimum of 1 to a maximum of 20.
|
|
1603
|
+
*
|
|
1604
|
+
* @value
|
|
1605
|
+
* An integer value representing the size of the pixels used in the pixelate redaction. This determines the granularity of the pixelation effect.
|
|
1606
|
+
*/
|
|
1607
|
+
pixelSize?: number;
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* Defines the properties related to actions performed within the Image Editor.
|
|
1611
|
+
*
|
|
1612
|
+
* This interface encapsulates the details of various actions that can be performed on an image, such as cropping, drawing annotations, applying filters, and fine-tuning. It provides a structured way to access and manage the state and data associated with these actions.
|
|
1613
|
+
*
|
|
1614
|
+
*/
|
|
1615
|
+
export interface EditCompleteEventArgs {
|
|
1616
|
+
/**
|
|
1617
|
+
* Represents an action performed within the Image Editor.
|
|
1618
|
+
*
|
|
1619
|
+
* Specifies an editing action, such as cropping, drawing annotations, applying filters, undoing or redoing changes, or any other modification made to the image.
|
|
1620
|
+
*
|
|
1621
|
+
*/
|
|
1622
|
+
action: string;
|
|
1623
|
+
/**
|
|
1624
|
+
* Represents the event arguments for actions performed in the image editor, such as applying a shape, redaction, frame, filter, fine-tuning adjustments, resizing, zooming, or cropping.
|
|
1625
|
+
*
|
|
1626
|
+
* This property provides detailed information about the specific action taken, including related details for shapes, redactions, frames, filters, fine-tuning, cropping, resizing, and zooming.
|
|
1627
|
+
*
|
|
1628
|
+
* @type {object | RotateEventArgs | FlipEventArgs | CropEventArgs | FinetuneEventArgs | FrameChangeEventArgs | ImageFilterEventArgs |
|
|
1629
|
+
* PanEventArgs | ResizeEventArgs | ShapeChangeEventArgs | ZoomEventArgs }
|
|
1630
|
+
* @default object
|
|
1631
|
+
*
|
|
1632
|
+
* @remarks
|
|
1633
|
+
* This property helps to identify and retrieve detailed information about the action performed in the image editor.
|
|
1634
|
+
*
|
|
1635
|
+
*/
|
|
1636
|
+
actionEventArgs: object | RotateEventArgs | FlipEventArgs | CropEventArgs | FinetuneEventArgs | FrameChangeEventArgs | ImageFilterEventArgs | PanEventArgs | ResizeEventArgs | ShapeChangeEventArgs | ZoomEventArgs;
|
|
1637
|
+
}
|