@syncfusion/ej2-image-editor 20.4.51 → 21.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +1 -0
- package/CHANGELOG.md +55 -5
- 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 +20032 -11350
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +20027 -11313
- 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/package.json +12 -12
- package/src/image-editor/action/crop.d.ts +36 -0
- package/src/image-editor/action/crop.js +829 -0
- package/src/image-editor/action/draw.d.ts +125 -0
- package/src/image-editor/action/draw.js +3263 -0
- package/src/image-editor/action/export.d.ts +23 -0
- package/src/image-editor/action/export.js +364 -0
- package/src/image-editor/action/filter.d.ts +35 -0
- package/src/image-editor/action/filter.js +699 -0
- package/src/image-editor/action/freehand-draw.d.ts +61 -0
- package/src/image-editor/action/freehand-draw.js +1015 -0
- package/src/image-editor/action/index.d.ts +9 -0
- package/src/image-editor/action/index.js +9 -0
- package/src/image-editor/action/selection.d.ts +139 -0
- package/src/image-editor/action/selection.js +4518 -0
- package/src/image-editor/action/shape.d.ts +94 -0
- package/src/image-editor/action/shape.js +2745 -0
- package/src/image-editor/action/transform.d.ts +67 -0
- package/src/image-editor/action/transform.js +1859 -0
- package/src/image-editor/action/undo-redo.d.ts +43 -0
- package/src/image-editor/action/undo-redo.js +800 -0
- package/src/image-editor/base/enum.d.ts +189 -0
- package/src/image-editor/base/enum.js +198 -0
- package/src/image-editor/base/image-editor-model.d.ts +626 -0
- package/src/image-editor/base/image-editor.d.ts +1300 -0
- package/src/image-editor/base/image-editor.js +2270 -0
- package/src/image-editor/base/index.d.ts +4 -0
- package/src/image-editor/base/index.js +2 -0
- package/src/image-editor/base/interface.d.ts +1128 -0
- package/src/image-editor/base/interface.js +1 -0
- package/src/image-editor/index.d.ts +3 -5
- package/src/image-editor/index.js +3 -4
- package/src/image-editor/renderer/index.d.ts +1 -0
- package/src/image-editor/renderer/index.js +1 -0
- package/src/image-editor/renderer/toolbar.d.ts +105 -0
- package/src/image-editor/renderer/toolbar.js +3018 -0
- package/styles/bootstrap-dark.css +79 -8
- package/styles/bootstrap.css +79 -8
- package/styles/bootstrap4.css +79 -8
- package/styles/bootstrap5-dark.css +81 -11
- package/styles/bootstrap5.css +81 -11
- package/styles/fabric-dark.css +79 -8
- package/styles/fabric.css +79 -8
- package/styles/fluent-dark.css +79 -8
- package/styles/fluent.css +79 -8
- package/styles/highcontrast-light.css +81 -10
- package/styles/highcontrast.css +82 -10
- package/styles/image-editor/_highcontrast-definition.scss +1 -1
- package/styles/image-editor/_highcontrast-light-definition.scss +1 -1
- package/styles/image-editor/_layout.scss +28 -18
- package/styles/image-editor/_material3-dark-definition.scss +1 -0
- package/styles/image-editor/_material3-definition.scss +10 -10
- package/styles/image-editor/_theme.scss +11 -6
- package/styles/image-editor/bootstrap-dark.css +79 -8
- package/styles/image-editor/bootstrap.css +79 -8
- package/styles/image-editor/bootstrap4.css +79 -8
- package/styles/image-editor/bootstrap5-dark.css +81 -11
- package/styles/image-editor/bootstrap5.css +81 -11
- package/styles/image-editor/fabric-dark.css +79 -8
- package/styles/image-editor/fabric.css +79 -8
- package/styles/image-editor/fluent-dark.css +79 -8
- package/styles/image-editor/fluent.css +79 -8
- package/styles/image-editor/highcontrast-light.css +81 -10
- package/styles/image-editor/highcontrast.css +82 -10
- package/styles/image-editor/icons/_bootstrap-dark.scss +132 -0
- package/styles/image-editor/icons/_bootstrap.scss +132 -0
- package/styles/image-editor/icons/_bootstrap4.scss +132 -0
- package/styles/image-editor/icons/_bootstrap5.scss +132 -0
- package/styles/image-editor/icons/_fabric-dark.scss +132 -0
- package/styles/image-editor/icons/_fabric.scss +132 -0
- package/styles/image-editor/icons/_fluent.scss +132 -0
- package/styles/image-editor/icons/_fusionnew.scss +132 -0
- package/styles/image-editor/icons/_highcontrast-light.scss +132 -0
- package/styles/image-editor/icons/_highcontrast.scss +132 -0
- package/styles/image-editor/icons/_material-dark.scss +132 -0
- package/styles/image-editor/icons/_material.scss +132 -0
- package/styles/image-editor/icons/_material3-dark.scss +1 -0
- package/styles/image-editor/icons/_material3.scss +133 -1
- package/styles/image-editor/icons/_tailwind.scss +132 -0
- package/styles/image-editor/material-dark.css +79 -16
- package/styles/image-editor/material.css +79 -11
- package/styles/image-editor/material3-dark.css +453 -0
- package/styles/image-editor/material3-dark.scss +14 -0
- package/styles/image-editor/material3.css +509 -0
- package/styles/image-editor/material3.scss +14 -0
- package/styles/image-editor/tailwind-dark.css +79 -8
- package/styles/image-editor/tailwind.css +79 -8
- package/styles/material-dark.css +79 -16
- package/styles/material.css +79 -11
- package/styles/material3-dark.css +453 -0
- package/styles/material3-dark.scss +3 -0
- package/styles/material3.css +509 -0
- package/styles/material3.scss +3 -0
- package/styles/tailwind-dark.css +79 -8
- package/styles/tailwind.css +79 -8
- package/GitLeaksReport.json +0 -1
- package/gitleaks-ci/gitleaks +0 -0
- package/gitleaks-ci.tar.gz +0 -0
- package/src/image-editor/image-editor-model.d.ts +0 -331
- package/src/image-editor/image-editor.d.ts +0 -1428
- package/src/image-editor/image-editor.js +0 -12849
|
@@ -0,0 +1,1300 @@
|
|
|
1
|
+
import { Component, INotifyPropertyChanged, ModuleDeclaration, BlazorDotnetObject } from '@syncfusion/ej2-base';
|
|
2
|
+
import { EmitType } from '@syncfusion/ej2-base';
|
|
3
|
+
import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';
|
|
4
|
+
import { ChildProperty } from '@syncfusion/ej2-base';
|
|
5
|
+
import { ImageEditorModel, FinetuneSettingsModel, ZoomSettingsModel, SelectionSettingsModel } from './image-editor-model';
|
|
6
|
+
import { SelectionChangeEventArgs, Transition, ArrowheadType } from './../index';
|
|
7
|
+
import { ZoomEventArgs, PanEventArgs, CropEventArgs, RotateEventArgs, FlipEventArgs, ShapeChangeEventArgs } from './../index';
|
|
8
|
+
import { ToolbarEventArgs, OpenEventArgs, SaveEventArgs, BeforeSaveEventArgs, Point, ShapeSettings, ImageFilterEventArgs } from './../index';
|
|
9
|
+
import { FinetuneEventArgs, QuickAccessToolbarEventArgs, CurrentObject, ImageDimension, TransformValue, PanPoint } from './../index';
|
|
10
|
+
import { Interaction, SelectionPoint, ImageFinetuneValue, Dimension, ActivePoint, ImageEditorClickEventArgs } from './../index';
|
|
11
|
+
import { Direction, ZoomTrigger, Theme, ImageEditorCommand, ImageFilterOption, ImageFinetuneOption } from './../index';
|
|
12
|
+
import { ItemModel as DropDownButtonItemModel } from '@syncfusion/ej2-splitbuttons';
|
|
13
|
+
/**
|
|
14
|
+
* 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.
|
|
15
|
+
*/
|
|
16
|
+
export declare class FinetuneSettings extends ChildProperty<FinetuneSettings> {
|
|
17
|
+
/**
|
|
18
|
+
* Represents a finetune setting for adjusting the brightness of an image.
|
|
19
|
+
*
|
|
20
|
+
* @type {ImageFinetuneValue}
|
|
21
|
+
*
|
|
22
|
+
* @property {number} value - The brightness level of the image, from -100 to 100.
|
|
23
|
+
* @property {number} min - The minimum brightness value allowed, typically -100.
|
|
24
|
+
* @property {number} max - The maximum brightness value allowed, typically 100.
|
|
25
|
+
* @default null
|
|
26
|
+
*/
|
|
27
|
+
brightness: ImageFinetuneValue;
|
|
28
|
+
/**
|
|
29
|
+
* Represents a finetune setting for adjusting the contrast of an image.
|
|
30
|
+
*
|
|
31
|
+
* @type {ImageFinetuneValue}
|
|
32
|
+
*
|
|
33
|
+
* @property {number} value - The contrast level of the image, from -100 to 100.
|
|
34
|
+
* @property {number} min - The minimum contrast value allowed, typically -100.
|
|
35
|
+
* @property {number} max - The maximum contrast value allowed, typically 100.
|
|
36
|
+
* @default null
|
|
37
|
+
*/
|
|
38
|
+
contrast: ImageFinetuneValue;
|
|
39
|
+
/**
|
|
40
|
+
* Represents a finetune setting for adjusting the hue of an image.
|
|
41
|
+
*
|
|
42
|
+
* @type {ImageFinetuneValue}
|
|
43
|
+
*
|
|
44
|
+
* @property {number} value - The hue level of the image, from 0 to 100.
|
|
45
|
+
* @property {number} min - The minimum hue value allowed, typically 0.
|
|
46
|
+
* @property {number} max - The maximum hue value allowed, typically 100.
|
|
47
|
+
* @default null
|
|
48
|
+
*/
|
|
49
|
+
hue: ImageFinetuneValue;
|
|
50
|
+
/**
|
|
51
|
+
* Represents a finetune setting for adjusting the saturation of an image.
|
|
52
|
+
*
|
|
53
|
+
* @type {ImageFinetuneValue}
|
|
54
|
+
*
|
|
55
|
+
* @property {number} value - The saturation level of the image, from -100 to 100.
|
|
56
|
+
* @property {number} min - The minimum saturation value allowed, typically -100.
|
|
57
|
+
* @property {number} max - The maximum saturation value allowed, typically 100.
|
|
58
|
+
* @default null
|
|
59
|
+
*/
|
|
60
|
+
saturation: ImageFinetuneValue;
|
|
61
|
+
/**
|
|
62
|
+
* Represents a finetune setting for adjusting the exposure of an image.
|
|
63
|
+
*
|
|
64
|
+
* @type {ImageFinetuneValue}
|
|
65
|
+
*
|
|
66
|
+
* @property {number} value - The exposure level of the image, from -100 to 100.
|
|
67
|
+
* @property {number} min - The minimum exposure value allowed, typically -100.
|
|
68
|
+
* @property {number} max - The maximum exposure value allowed, typically 100.
|
|
69
|
+
* @default null
|
|
70
|
+
*/
|
|
71
|
+
exposure: ImageFinetuneValue;
|
|
72
|
+
/**
|
|
73
|
+
* Represents a finetune setting for adjusting the opacity of an image.
|
|
74
|
+
*
|
|
75
|
+
* @type {ImageFinetuneValue}
|
|
76
|
+
*
|
|
77
|
+
* @property {number} value - The opacity level of the image, from 0 to 100.
|
|
78
|
+
* @property {number} min - The minimum opacity value allowed, typically 0.
|
|
79
|
+
* @property {number} max - The maximum opacity value allowed, typically 100.
|
|
80
|
+
* @default null
|
|
81
|
+
*/
|
|
82
|
+
opacity: ImageFinetuneValue;
|
|
83
|
+
/**
|
|
84
|
+
* Represents a finetune setting for adjusting the blur of an image.
|
|
85
|
+
*
|
|
86
|
+
* @type {ImageFinetuneValue}
|
|
87
|
+
*
|
|
88
|
+
* @property {number} value - The blur level of the image, from 0 to 100.
|
|
89
|
+
* @property {number} min - The minimum blur value allowed, typically 0.
|
|
90
|
+
* @property {number} max - The maximum blur value allowed, typically 100.
|
|
91
|
+
* @default null
|
|
92
|
+
*/
|
|
93
|
+
blur: ImageFinetuneValue;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* 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.
|
|
97
|
+
*/
|
|
98
|
+
export declare class ZoomSettings extends ChildProperty<ZoomSettings> {
|
|
99
|
+
/**
|
|
100
|
+
* Specifies the available options for zooming in an image editor control.
|
|
101
|
+
*
|
|
102
|
+
* @remarks
|
|
103
|
+
* Use this property to enable or disable specific types of zooming in the image editor. The following zooming options are available:
|
|
104
|
+
* MouseWheel: Zooming is performed by scrolling the mouse wheel up and down.
|
|
105
|
+
* Pinch: Zooming is performed using pinch gestures on touch-enabled devices.
|
|
106
|
+
* Commands: Zooming is performed by clicking the CTRL key and either the plus (+) or minus (-) buttons on the keyboard.
|
|
107
|
+
* Toolbar: Zooming is performed using toolbar buttons.
|
|
108
|
+
*
|
|
109
|
+
* By default, this property is set to `null`, which enables all types of zooming.
|
|
110
|
+
*
|
|
111
|
+
* @default null
|
|
112
|
+
* @aspNumberEnum
|
|
113
|
+
*/
|
|
114
|
+
zoomTrigger: ZoomTrigger;
|
|
115
|
+
/**
|
|
116
|
+
* Specifies the minimum zooming level to limit the zooming.
|
|
117
|
+
* An integer value that specifies the minimum zooming level. And the default value is 1 (100%).
|
|
118
|
+
*
|
|
119
|
+
* @remarks
|
|
120
|
+
* The given value is considered as percentage.
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
minZoomFactor: number;
|
|
124
|
+
/**
|
|
125
|
+
* Specifies the maximum zooming level to limit the zooming.
|
|
126
|
+
* An integer value that specifies the maximum zooming level. And the default value is 10 (1000 percent).
|
|
127
|
+
*
|
|
128
|
+
* @remarks
|
|
129
|
+
* The given value is considered as percentage.
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
maxZoomFactor: number;
|
|
133
|
+
/**
|
|
134
|
+
* Specifies the default zoom factor to be applied on initial loading of image.
|
|
135
|
+
* An integer value that specifies the current zooming level. And the default value is 1 (100 percent).
|
|
136
|
+
*
|
|
137
|
+
* @remarks
|
|
138
|
+
* The given value is considered as percentage.
|
|
139
|
+
*
|
|
140
|
+
*/
|
|
141
|
+
zoomFactor: number;
|
|
142
|
+
/**
|
|
143
|
+
* Specifies the point in which the zooming has been performed in the image editor.
|
|
144
|
+
* A point value that specifies the current zooming point.
|
|
145
|
+
* And the default value is null, and it can be considered as center point of the image editor.
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* The given value is a point object which has x and y coordinates.
|
|
149
|
+
*
|
|
150
|
+
*/
|
|
151
|
+
zoomPoint: Point;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* This interface is used to specify settings for selection operations on images, including visibility, stroke color and fill color.
|
|
155
|
+
*/
|
|
156
|
+
export declare class SelectionSettings extends ChildProperty<SelectionSettings> {
|
|
157
|
+
/**
|
|
158
|
+
* Specifies a boolean value whether to show circle on selection in the image editor.
|
|
159
|
+
*
|
|
160
|
+
* @type {boolean}
|
|
161
|
+
*
|
|
162
|
+
* @default true
|
|
163
|
+
*/
|
|
164
|
+
showCircle: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Represents stroke color of circle selection in the image editor.
|
|
167
|
+
*
|
|
168
|
+
* @type {string}
|
|
169
|
+
*
|
|
170
|
+
* @default null
|
|
171
|
+
*/
|
|
172
|
+
strokeColor: string;
|
|
173
|
+
/**
|
|
174
|
+
* Represents fill color of circle selection in the image editor.
|
|
175
|
+
*
|
|
176
|
+
* @type {string}
|
|
177
|
+
*
|
|
178
|
+
* @default null
|
|
179
|
+
*/
|
|
180
|
+
fillColor: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The Image Editor is a graphical user interface for editing images.
|
|
184
|
+
*
|
|
185
|
+
* {% codeBlock src='image-editor/default/index.md' %}{% endcodeBlock %}
|
|
186
|
+
*
|
|
187
|
+
* @remarks
|
|
188
|
+
* 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.
|
|
189
|
+
*
|
|
190
|
+
*/
|
|
191
|
+
export declare class ImageEditor extends Component<HTMLDivElement> implements INotifyPropertyChanged {
|
|
192
|
+
/**
|
|
193
|
+
*
|
|
194
|
+
* Image Editor Private Properties
|
|
195
|
+
*/
|
|
196
|
+
/** @hidden */
|
|
197
|
+
isImageLoaded: boolean;
|
|
198
|
+
/** @hidden */
|
|
199
|
+
baseImg: HTMLImageElement;
|
|
200
|
+
/** @hidden */
|
|
201
|
+
lowerCanvas: HTMLCanvasElement;
|
|
202
|
+
/** @hidden */
|
|
203
|
+
upperCanvas: HTMLCanvasElement;
|
|
204
|
+
/** @hidden */
|
|
205
|
+
inMemoryCanvas: HTMLCanvasElement;
|
|
206
|
+
/** @hidden */
|
|
207
|
+
textArea: HTMLInputElement;
|
|
208
|
+
/** @hidden */
|
|
209
|
+
activeObj: SelectionPoint;
|
|
210
|
+
/** @hidden */
|
|
211
|
+
currObjType: Interaction;
|
|
212
|
+
/** @hidden */
|
|
213
|
+
objColl: SelectionPoint[];
|
|
214
|
+
/** @hidden */
|
|
215
|
+
pointColl: any;
|
|
216
|
+
/** @hidden */
|
|
217
|
+
freehandCounter: number;
|
|
218
|
+
/** @hidden */
|
|
219
|
+
points: Point[];
|
|
220
|
+
/** @hidden */
|
|
221
|
+
togglePen: boolean;
|
|
222
|
+
/** @hidden */
|
|
223
|
+
togglePan: boolean;
|
|
224
|
+
/** @hidden */
|
|
225
|
+
img: ImageDimension;
|
|
226
|
+
/** @hidden */
|
|
227
|
+
themeColl: Object;
|
|
228
|
+
/** @hidden */
|
|
229
|
+
rotateFlipColl: any;
|
|
230
|
+
/** @hidden */
|
|
231
|
+
cropObj: CurrentObject;
|
|
232
|
+
/** @hidden */
|
|
233
|
+
afterCropActions: string[];
|
|
234
|
+
/** @hidden */
|
|
235
|
+
currSelectionPoint: SelectionPoint;
|
|
236
|
+
/** @hidden */
|
|
237
|
+
transform: TransformValue;
|
|
238
|
+
/** @hidden */
|
|
239
|
+
panPoint: PanPoint;
|
|
240
|
+
/** @hidden */
|
|
241
|
+
isUndoRedo: boolean;
|
|
242
|
+
/** @hidden */
|
|
243
|
+
isCropTab: boolean;
|
|
244
|
+
/** @hidden */
|
|
245
|
+
isCircleCrop: boolean;
|
|
246
|
+
/** @hidden */
|
|
247
|
+
fontSizeColl: DropDownButtonItemModel[];
|
|
248
|
+
/** @hidden */
|
|
249
|
+
initialAdjustmentValue: string;
|
|
250
|
+
/** @hidden */
|
|
251
|
+
currentFilter: string;
|
|
252
|
+
/** @hidden */
|
|
253
|
+
canvasFilter: string;
|
|
254
|
+
/** @hidden */
|
|
255
|
+
dotNetRef: BlazorDotnetObject;
|
|
256
|
+
/** @hidden */
|
|
257
|
+
toolbarHeight: number;
|
|
258
|
+
/** @hidden */
|
|
259
|
+
events: any;
|
|
260
|
+
/** @hidden */
|
|
261
|
+
isPublicMethod: boolean;
|
|
262
|
+
/** @hidden */
|
|
263
|
+
cancelCropSelection: Transition;
|
|
264
|
+
/** @hidden */
|
|
265
|
+
isCropToolbar: boolean;
|
|
266
|
+
/** @hidden */
|
|
267
|
+
prevCurrSelectionPoint: SelectionPoint;
|
|
268
|
+
/** @hidden */
|
|
269
|
+
cursor: string;
|
|
270
|
+
/** @hidden */
|
|
271
|
+
eventType: string;
|
|
272
|
+
/** @hidden */
|
|
273
|
+
panEventArgs: PanEventArgs;
|
|
274
|
+
private lowerContext;
|
|
275
|
+
private upperContext;
|
|
276
|
+
private inMemoryContext;
|
|
277
|
+
private toolbarFn;
|
|
278
|
+
private qatFn;
|
|
279
|
+
/**
|
|
280
|
+
* Defines one or more CSS classes that can be used to customize the appearance of an Image Editor component.
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* 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.
|
|
284
|
+
*
|
|
285
|
+
* @default ''
|
|
286
|
+
*
|
|
287
|
+
*/
|
|
288
|
+
cssClass: string;
|
|
289
|
+
/**
|
|
290
|
+
* Defines whether an Image Editor component is enabled or disabled.
|
|
291
|
+
*
|
|
292
|
+
* @remarks
|
|
293
|
+
* 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.
|
|
294
|
+
*
|
|
295
|
+
* @default false
|
|
296
|
+
*/
|
|
297
|
+
disabled: boolean;
|
|
298
|
+
/**
|
|
299
|
+
* Specifies the height of the Image Editor.
|
|
300
|
+
*
|
|
301
|
+
* @remarks
|
|
302
|
+
* The value of height is specified either as a percentage (e.g. '100%') or as a fixed pixel value (e.g. '100px').
|
|
303
|
+
*
|
|
304
|
+
* @default '100%'
|
|
305
|
+
*/
|
|
306
|
+
height: string;
|
|
307
|
+
/**
|
|
308
|
+
* Specifies the theme of the Image Editor. The appearance of the shape selection in Image Editor is determined by this property.
|
|
309
|
+
*
|
|
310
|
+
* @remarks
|
|
311
|
+
* The `theme` property supports all the built-in themes of Syncfusion, including:
|
|
312
|
+
* - `Bootstrap5`
|
|
313
|
+
* - `Fluent`
|
|
314
|
+
* - `Tailwind`
|
|
315
|
+
* - `Bootstrap4`
|
|
316
|
+
* - `Material`
|
|
317
|
+
* - `Fabric`
|
|
318
|
+
* - `HighContrast`
|
|
319
|
+
* - `Bootstrap5Dark`
|
|
320
|
+
* - `Bootstrap4Dark`
|
|
321
|
+
* - `MaterialDark`
|
|
322
|
+
* - `FabricDark`
|
|
323
|
+
* - `HighContrastDark`
|
|
324
|
+
*
|
|
325
|
+
* The default value is set to `Theme.Bootstrap5`.
|
|
326
|
+
*
|
|
327
|
+
* @isenumeration true
|
|
328
|
+
* @default Theme.Bootstrap5
|
|
329
|
+
* @asptype Theme
|
|
330
|
+
*
|
|
331
|
+
*/
|
|
332
|
+
theme: string | Theme;
|
|
333
|
+
/**
|
|
334
|
+
* Specifies the toolbar items to perform UI interactions.
|
|
335
|
+
* It accepts both string[] and ItemModel[] to configure its toolbar items. The default value is null.
|
|
336
|
+
* If the property is not defined in the control, the default toolbar will be rendered with preconfigured toolbar commands.
|
|
337
|
+
* If the property is defined as empty collection, the toolbar will not be rendered.
|
|
338
|
+
* The preconfigured toolbar commands are
|
|
339
|
+
* - Crop: helps to crop an image as ellipse, square, various ratio aspects, custom selection with resize, drag and drop.
|
|
340
|
+
* - Annotate: help to insert a shape on image that supports rectangle, ellipse, line, arrow, path, text and freehand drawing with resize, drag and drop, and customize its appearance.
|
|
341
|
+
* - Transform: helps to rotate and flip an image.
|
|
342
|
+
* - Finetunes: helps to perform adjustments on an image.
|
|
343
|
+
* - Filters: helps to perform predefined color filters.
|
|
344
|
+
* - ZoomIn: performs zoom-in an image.
|
|
345
|
+
* - ZoomOut: performs zoom-out an image.
|
|
346
|
+
* - Save: save the modified image.
|
|
347
|
+
* - Open: open an image to perform editing.
|
|
348
|
+
* - Reset: reset the modification and restore the original image.
|
|
349
|
+
*
|
|
350
|
+
* {% codeBlock src='image-editor/toolbar/index.md' %}{% endcodeBlock %}
|
|
351
|
+
*
|
|
352
|
+
* @remarks
|
|
353
|
+
* If the toolbarTemplate property is defined in the control, the toolbar will be rendered based on the toolbarTemplate property.
|
|
354
|
+
* @default null
|
|
355
|
+
*
|
|
356
|
+
*/
|
|
357
|
+
toolbar: (string | ImageEditorCommand | ItemModel)[];
|
|
358
|
+
/**
|
|
359
|
+
* Specifies a custom template for the toolbar of an image editor control.
|
|
360
|
+
* 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.
|
|
361
|
+
*
|
|
362
|
+
* {% codeBlock src='image-editor/toolbarTemplate/index.md' %}{% endcodeBlock %}
|
|
363
|
+
*
|
|
364
|
+
* @remarks
|
|
365
|
+
* 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.
|
|
366
|
+
*
|
|
367
|
+
* @default null
|
|
368
|
+
* @aspType string
|
|
369
|
+
*
|
|
370
|
+
*
|
|
371
|
+
*/
|
|
372
|
+
toolbarTemplate: string | Function;
|
|
373
|
+
/**
|
|
374
|
+
* Specifies the width of an Image Editor.
|
|
375
|
+
*
|
|
376
|
+
* @remarks
|
|
377
|
+
* The value of width is specified either as a percentage (e.g. '100%') or as a fixed pixel value (e.g. '100px').
|
|
378
|
+
*
|
|
379
|
+
* @default '100%'
|
|
380
|
+
*/
|
|
381
|
+
width: string;
|
|
382
|
+
/**
|
|
383
|
+
* Specifies a boolean value whether enable undo/redo operations in the image editor.
|
|
384
|
+
*
|
|
385
|
+
* @remarks
|
|
386
|
+
* If this property is true, the undo redo options will be enabled in toolbar and can also be accessed via keyboard shortcuts.
|
|
387
|
+
* If set to false, both options will be disabled.
|
|
388
|
+
* 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.
|
|
389
|
+
*
|
|
390
|
+
* @default true
|
|
391
|
+
*
|
|
392
|
+
*/
|
|
393
|
+
allowUndoRedo: boolean;
|
|
394
|
+
/**
|
|
395
|
+
* Specifies whether to show/hide the quick access toolbar.
|
|
396
|
+
*
|
|
397
|
+
* @default true
|
|
398
|
+
*
|
|
399
|
+
* @remarks
|
|
400
|
+
* Set this property to true to show the quick access toolbar, and false to hide it.
|
|
401
|
+
* ```html
|
|
402
|
+
* <div id='imageeditor'></div>
|
|
403
|
+
* ```
|
|
404
|
+
* ```typescript
|
|
405
|
+
* <script>
|
|
406
|
+
* var imageObj = new ImageEditor({
|
|
407
|
+
* showQuickAccessToolbar : true
|
|
408
|
+
* });
|
|
409
|
+
* imageObj.appendTo("#imageeditor");
|
|
410
|
+
* </script>
|
|
411
|
+
* ```
|
|
412
|
+
*/
|
|
413
|
+
showQuickAccessToolbar: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* Specifies a template for the quick access toolbar.
|
|
416
|
+
* Use this property to customize the quick access toolbar.
|
|
417
|
+
*
|
|
418
|
+
* @default null
|
|
419
|
+
* @aspType string
|
|
420
|
+
*
|
|
421
|
+
* @remarks
|
|
422
|
+
* This property only works if the "showQuickToolbar" property is set to true.
|
|
423
|
+
* ```html
|
|
424
|
+
* <div id='imageeditor'></div>
|
|
425
|
+
* ```
|
|
426
|
+
* ```typescript
|
|
427
|
+
* <script>
|
|
428
|
+
* var imageObj = new ImageEditor({
|
|
429
|
+
* showQuickAccessToolbar : true,
|
|
430
|
+
* quickAccessToolbarTemplate: '#toolbarTemplate'
|
|
431
|
+
* });
|
|
432
|
+
* imageObj.appendTo("#imageeditor");
|
|
433
|
+
* </script>
|
|
434
|
+
* <script id="toolbarTemplate" type="text/x-template">
|
|
435
|
+
* <div class = 'e-toolbar'>
|
|
436
|
+
* <button id= 'dltbtn'></button>
|
|
437
|
+
* </div>
|
|
438
|
+
* </script>
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
quickAccessToolbarTemplate: string | Function;
|
|
442
|
+
/**
|
|
443
|
+
* Specifies whether to prevent user interaction with the image editor control.
|
|
444
|
+
* A boolean that specifies whether to prevent the interaction in image editor control. The default value is false.
|
|
445
|
+
*
|
|
446
|
+
* @remarks
|
|
447
|
+
* If the property is true, the image editor control becomes read-only, and the user interaction will be prevented.
|
|
448
|
+
*
|
|
449
|
+
* @default false
|
|
450
|
+
* @private
|
|
451
|
+
*/
|
|
452
|
+
isReadOnly: boolean;
|
|
453
|
+
/**
|
|
454
|
+
* Specifies whether to enable RTL mode in image editor control that displays the content in the right-to-left direction.
|
|
455
|
+
* A boolean that specifies whether to enable RTL mode in image editor control. The default value is false.
|
|
456
|
+
*
|
|
457
|
+
* @default false
|
|
458
|
+
* @private
|
|
459
|
+
*/
|
|
460
|
+
enableRtl: boolean;
|
|
461
|
+
/**
|
|
462
|
+
* Specifies a bool value whether enable or disable persist component's state between page reloads. The default value is false.
|
|
463
|
+
*
|
|
464
|
+
* @remarks
|
|
465
|
+
* If this property is true, the controls's state persistence will be enabled.
|
|
466
|
+
* Control's property will be stored in browser local storage to persist control's state when page reloads.
|
|
467
|
+
*
|
|
468
|
+
* @default false
|
|
469
|
+
* @private
|
|
470
|
+
*/
|
|
471
|
+
enablePersistence: boolean;
|
|
472
|
+
/**
|
|
473
|
+
* Specifies the finetune settings option which can be used to perform color adjustments in the image editor control.
|
|
474
|
+
*
|
|
475
|
+
* {% codeBlock src='image-editor/finetuneSettings/index.md' %}{% endcodeBlock %}
|
|
476
|
+
*
|
|
477
|
+
* @remarks
|
|
478
|
+
* A 'FinetuneSettingsModel' value that specifies the the finetune options which are enabled in image editor control.
|
|
479
|
+
* If the property is not specified, then the default values will be applied for minimum, maximum, and value properties for all finetune options.
|
|
480
|
+
*
|
|
481
|
+
* The possible values are:
|
|
482
|
+
* - 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.
|
|
483
|
+
* - 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.
|
|
484
|
+
* - 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.
|
|
485
|
+
* - 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.
|
|
486
|
+
* - Exposure: If exposure increases, intensity of light appears brighter. As exposure decreases, intensity of light decreases. Exposure can be controlled by brightness property.
|
|
487
|
+
* - 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.
|
|
488
|
+
* - Blur : Adjusting the blur can make an image unfocused or unclear. Blur can be controlled by blur property.
|
|
489
|
+
*
|
|
490
|
+
*/
|
|
491
|
+
finetuneSettings: FinetuneSettingsModel;
|
|
492
|
+
/**
|
|
493
|
+
* Specifies the zoom settings to perform zooming action.
|
|
494
|
+
* A 'ZoomSettingsModel' value that specifies the the zoom related options which are enabled in image editor control. The default value is null.
|
|
495
|
+
*
|
|
496
|
+
* {% codeBlock src='image-editor/zoomSettings/index.md' %}{% endcodeBlock %}
|
|
497
|
+
*
|
|
498
|
+
* @remarks
|
|
499
|
+
* If the property is not specified, then the default settings will be applied for all the properties available in zoom settings.
|
|
500
|
+
*
|
|
501
|
+
* The following options are available in `zoomSettings`.
|
|
502
|
+
* - minZoomFactor: Specifies the minimum zoom factor level to control the zoom.
|
|
503
|
+
* - maxZoomFactor: Specifies the maximum zoom factor level to control the zoom.
|
|
504
|
+
* - zoomFactor: Specifies the zoom factor to be applied to the image.
|
|
505
|
+
* - zoomTrigger: Specifies the types of zooming to be supported in the image editor.
|
|
506
|
+
* - zoomPoint: Specifies the x and y coordinates in which the zooming performed on initial load.
|
|
507
|
+
*
|
|
508
|
+
*/
|
|
509
|
+
zoomSettings: ZoomSettingsModel;
|
|
510
|
+
/**
|
|
511
|
+
* Specifies the selection settings to customize selection.
|
|
512
|
+
* A 'SelectionSettingsModel' value that specifies the the customization related options which are enabled in image editor control. The default value is null.
|
|
513
|
+
*
|
|
514
|
+
* @remarks
|
|
515
|
+
* If the property is not specified, then the default settings will be applied for all the properties available in selection settings.
|
|
516
|
+
*
|
|
517
|
+
* The following options are available in `selectionSettings`.
|
|
518
|
+
* - showCircle: Specifies whether to show / hide circles on selection.
|
|
519
|
+
* - strokeColor: Specifies the stroke color of circle selection.
|
|
520
|
+
* - fillColor: Specifies the fill color of circle selection.
|
|
521
|
+
*
|
|
522
|
+
*/
|
|
523
|
+
selectionSettings: SelectionSettingsModel;
|
|
524
|
+
/**
|
|
525
|
+
* Event callback that is raised before an image is saved.
|
|
526
|
+
*
|
|
527
|
+
* @event beforeSave
|
|
528
|
+
*/
|
|
529
|
+
beforeSave: EmitType<BeforeSaveEventArgs>;
|
|
530
|
+
/**
|
|
531
|
+
* Event callback that is raised after rendering the Image Editor component.
|
|
532
|
+
*
|
|
533
|
+
* @event created
|
|
534
|
+
*/
|
|
535
|
+
created: EmitType<Event>;
|
|
536
|
+
/**
|
|
537
|
+
* Event callback that is raised once the component is destroyed with its elements and bound events.
|
|
538
|
+
*
|
|
539
|
+
* @event destroyed
|
|
540
|
+
*/
|
|
541
|
+
destroyed: EmitType<Event>;
|
|
542
|
+
/**
|
|
543
|
+
* Event callback that is raised while zooming an image.
|
|
544
|
+
*
|
|
545
|
+
* @event zooming
|
|
546
|
+
*/
|
|
547
|
+
zooming: EmitType<ZoomEventArgs>;
|
|
548
|
+
/**
|
|
549
|
+
* Event callback that is raised while panning an image.
|
|
550
|
+
*
|
|
551
|
+
* @event panning
|
|
552
|
+
*/
|
|
553
|
+
panning: EmitType<PanEventArgs>;
|
|
554
|
+
/**
|
|
555
|
+
* Event callback that is raised while cropping an image.
|
|
556
|
+
*
|
|
557
|
+
* @event cropping
|
|
558
|
+
*/
|
|
559
|
+
cropping: EmitType<CropEventArgs>;
|
|
560
|
+
/**
|
|
561
|
+
* Event callback that is raised while rotating an image.
|
|
562
|
+
*
|
|
563
|
+
* @event rotating
|
|
564
|
+
*/
|
|
565
|
+
rotating: EmitType<RotateEventArgs>;
|
|
566
|
+
/**
|
|
567
|
+
* Event callback that is raised while flipping an image.
|
|
568
|
+
*
|
|
569
|
+
* @event flipping
|
|
570
|
+
*/
|
|
571
|
+
flipping: EmitType<FlipEventArgs>;
|
|
572
|
+
/**
|
|
573
|
+
* Event callback that is raised while changing shapes in an Image Editor.
|
|
574
|
+
*
|
|
575
|
+
* @event shapeChanging
|
|
576
|
+
*/
|
|
577
|
+
shapeChanging: EmitType<ShapeChangeEventArgs>;
|
|
578
|
+
/**
|
|
579
|
+
* Event callback that is raised while changing selection in an Image Editor.
|
|
580
|
+
*
|
|
581
|
+
* @event selectionChanging
|
|
582
|
+
*/
|
|
583
|
+
selectionChanging: EmitType<SelectionChangeEventArgs>;
|
|
584
|
+
/**
|
|
585
|
+
* Event callback that is raised once an image is opened in an Image Editor.
|
|
586
|
+
*
|
|
587
|
+
* @event fileOpened
|
|
588
|
+
*/
|
|
589
|
+
fileOpened: EmitType<OpenEventArgs>;
|
|
590
|
+
/**
|
|
591
|
+
* Event callback that is raised once an image is saved.
|
|
592
|
+
*
|
|
593
|
+
* @event saved
|
|
594
|
+
*/
|
|
595
|
+
saved: EmitType<SaveEventArgs>;
|
|
596
|
+
/**
|
|
597
|
+
* Event callback that is raised once the toolbar is created.
|
|
598
|
+
*
|
|
599
|
+
* @event toolbarCreated
|
|
600
|
+
*/
|
|
601
|
+
toolbarCreated: EmitType<ToolbarEventArgs>;
|
|
602
|
+
/**
|
|
603
|
+
* Event callback that is raised while updating/refreshing the toolbar
|
|
604
|
+
*
|
|
605
|
+
* {% codeBlock src='image-editor/toolbarUpdating/index.md' %}{% endcodeBlock %}
|
|
606
|
+
*
|
|
607
|
+
* @event toolbarUpdating
|
|
608
|
+
*
|
|
609
|
+
*/
|
|
610
|
+
toolbarUpdating: EmitType<ToolbarEventArgs>;
|
|
611
|
+
/**
|
|
612
|
+
* Event callback that is raised once the toolbar item is clicked.
|
|
613
|
+
*
|
|
614
|
+
* @event toolbarItemClicked
|
|
615
|
+
*/
|
|
616
|
+
toolbarItemClicked: EmitType<ClickEventArgs>;
|
|
617
|
+
/**
|
|
618
|
+
* Event callback that is raised when applying filter to an image.
|
|
619
|
+
*
|
|
620
|
+
* @event imageFiltering
|
|
621
|
+
*/
|
|
622
|
+
imageFiltering: EmitType<ImageFilterEventArgs>;
|
|
623
|
+
/**
|
|
624
|
+
* Event callback that is raised when applying fine tune to an image.
|
|
625
|
+
*
|
|
626
|
+
* @event finetuneValueChanging
|
|
627
|
+
*/
|
|
628
|
+
finetuneValueChanging: EmitType<FinetuneEventArgs>;
|
|
629
|
+
/**
|
|
630
|
+
* Event callback that is raised while clicking on an image in the Image Editor.
|
|
631
|
+
*
|
|
632
|
+
* @event click
|
|
633
|
+
*/
|
|
634
|
+
click: EmitType<ImageEditorClickEventArgs>;
|
|
635
|
+
/**
|
|
636
|
+
* Event callback that is raised when opening the quick access toolbar.
|
|
637
|
+
*
|
|
638
|
+
* @event quickAccessToolbarOpen
|
|
639
|
+
*
|
|
640
|
+
* @remarks
|
|
641
|
+
* Use this event to customize the toolbar items that appear in the quick access toolbar.
|
|
642
|
+
* To customize the toolbar items, modify the "toolbarItems" collection property of the event arguments.
|
|
643
|
+
* The "toolbarItems" collection contains string and ItemModel values.
|
|
644
|
+
* The string values representing the names of the built-in toolbar items to display.
|
|
645
|
+
* The ItemModel values representing the ItemModel of custom toolbar items to display.
|
|
646
|
+
*
|
|
647
|
+
* ```html
|
|
648
|
+
* <div id='imageeditor'></div>
|
|
649
|
+
* ```
|
|
650
|
+
* ```typescript
|
|
651
|
+
* <script>
|
|
652
|
+
* var imageObj = new ImageEditor({
|
|
653
|
+
* showQuickAccessToolbar : true,
|
|
654
|
+
* quickAccessToolbarOpen: (args: QuickAccessToolbarEventArgs)=> {
|
|
655
|
+
* args.toolbarItems = [“Delete”, {text: “custom”}];
|
|
656
|
+
* }
|
|
657
|
+
*
|
|
658
|
+
* });
|
|
659
|
+
* imageObj.appendTo("#imageeditor");
|
|
660
|
+
* </script>
|
|
661
|
+
*/
|
|
662
|
+
quickAccessToolbarOpen: EmitType<QuickAccessToolbarEventArgs>;
|
|
663
|
+
/**
|
|
664
|
+
* Event callback that is raised once the quick access toolbar item is clicked.
|
|
665
|
+
*
|
|
666
|
+
* @event quickAccessToolbarItemClick
|
|
667
|
+
*
|
|
668
|
+
*/
|
|
669
|
+
quickAccessToolbarItemClick: EmitType<ClickEventArgs>;
|
|
670
|
+
/**
|
|
671
|
+
*
|
|
672
|
+
* Constructor for creating the widget
|
|
673
|
+
*
|
|
674
|
+
* @param {ImageEditorModel} options - Specifies the image editor model
|
|
675
|
+
* @param {string|HTMLDivElement} element - Specifies the target element
|
|
676
|
+
*/
|
|
677
|
+
constructor(options?: ImageEditorModel, element?: string | HTMLDivElement);
|
|
678
|
+
/**
|
|
679
|
+
* To provide the array of modules needed for component rendering.
|
|
680
|
+
*
|
|
681
|
+
* @returns {ModuleDeclaration[]} - To provide the array of modules needed for component rendering.
|
|
682
|
+
* @hidden
|
|
683
|
+
*/
|
|
684
|
+
requiredModules(): ModuleDeclaration[];
|
|
685
|
+
protected preRender(): void;
|
|
686
|
+
/**
|
|
687
|
+
*
|
|
688
|
+
* To Initialize the component rendering
|
|
689
|
+
*
|
|
690
|
+
* @private
|
|
691
|
+
* @returns {void}
|
|
692
|
+
*/
|
|
693
|
+
protected render(): void;
|
|
694
|
+
/**
|
|
695
|
+
* To get component name.
|
|
696
|
+
*
|
|
697
|
+
* @returns {string} - Module Name
|
|
698
|
+
* @private
|
|
699
|
+
*/
|
|
700
|
+
getModuleName(): string;
|
|
701
|
+
/**
|
|
702
|
+
*
|
|
703
|
+
* To get the properties to be maintained in the persisted state.
|
|
704
|
+
*
|
|
705
|
+
* @returns {string} - Persist data
|
|
706
|
+
* @private
|
|
707
|
+
*/
|
|
708
|
+
getPersistData(): string;
|
|
709
|
+
/**
|
|
710
|
+
*
|
|
711
|
+
* Called internally if any of the property value changed.
|
|
712
|
+
*
|
|
713
|
+
* @param {ImageEditorModel} newProperties - Specifies new properties
|
|
714
|
+
* @param {ImageEditorModel} oldProperties - Specifies old properties
|
|
715
|
+
* @returns {void}
|
|
716
|
+
* @private
|
|
717
|
+
*/
|
|
718
|
+
onPropertyChanged(newProperties: ImageEditorModel, oldProperties?: ImageEditorModel): void;
|
|
719
|
+
destroy(): void;
|
|
720
|
+
initialize(): void;
|
|
721
|
+
/**
|
|
722
|
+
*
|
|
723
|
+
* This Method will add events to component (element, event, method, current reference)
|
|
724
|
+
*
|
|
725
|
+
* @returns {void}.
|
|
726
|
+
*/
|
|
727
|
+
private wireEvent;
|
|
728
|
+
/**
|
|
729
|
+
*
|
|
730
|
+
* This Method will remove events from component
|
|
731
|
+
*
|
|
732
|
+
* @returns {void}.
|
|
733
|
+
*/
|
|
734
|
+
private unwireEvent;
|
|
735
|
+
private createCanvas;
|
|
736
|
+
private touchStartHandler;
|
|
737
|
+
private mouseDownEventHandler;
|
|
738
|
+
private mouseMoveEventHandler;
|
|
739
|
+
private mouseUpEventHandler;
|
|
740
|
+
private keyDownEventHandler;
|
|
741
|
+
private keyUpEventHandler;
|
|
742
|
+
private canvasMouseDownHandler;
|
|
743
|
+
private canvasMouseMoveHandler;
|
|
744
|
+
private canvasMouseUpHandler;
|
|
745
|
+
private handleScroll;
|
|
746
|
+
private adjustToScreen;
|
|
747
|
+
private screenOrientation;
|
|
748
|
+
private windowResizeHandler;
|
|
749
|
+
private notifyResetForAllModules;
|
|
750
|
+
private allowShape;
|
|
751
|
+
/**
|
|
752
|
+
* Clears the current selection performed in the image editor.
|
|
753
|
+
*
|
|
754
|
+
* @returns {void}.
|
|
755
|
+
*/
|
|
756
|
+
clearSelection(): void;
|
|
757
|
+
/**
|
|
758
|
+
* Crops an image based on the selection done in the image editor.
|
|
759
|
+
*
|
|
760
|
+
* {% codeBlock src='image-editor/crop/index.md' %}{% endcodeBlock %}
|
|
761
|
+
*
|
|
762
|
+
* @remarks
|
|
763
|
+
* The selection can be done through programmatically using the 'select' method or through UI interactions.
|
|
764
|
+
*
|
|
765
|
+
* @returns {boolean}.
|
|
766
|
+
*
|
|
767
|
+
*/
|
|
768
|
+
crop(): boolean;
|
|
769
|
+
/**
|
|
770
|
+
* Flips an image by horizontally or vertically in the image editor.
|
|
771
|
+
*
|
|
772
|
+
* {% codeBlock src='image-editor/zoom/index.md' %}{% endcodeBlock %}
|
|
773
|
+
*
|
|
774
|
+
* @param { Direction } direction - Specifies the direction to flip the image.
|
|
775
|
+
* A horizontal direction for horizontal flipping and vertical direction for vertical flipping.
|
|
776
|
+
*
|
|
777
|
+
* @remarks
|
|
778
|
+
* It flips the shapes including rectangle, circle, line, text, and freehand drawings.
|
|
779
|
+
*
|
|
780
|
+
* @returns {void}.
|
|
781
|
+
*
|
|
782
|
+
*/
|
|
783
|
+
flip(direction: Direction): void;
|
|
784
|
+
/**
|
|
785
|
+
* Returns an image as ImageData to load it in to a canvas.
|
|
786
|
+
*
|
|
787
|
+
* @remarks
|
|
788
|
+
* The data returned from this method is directly drawn in a canvas using 'putImageData' method.
|
|
789
|
+
* And then the user can get the base64 string from the canvas using toDataURL method.
|
|
790
|
+
*
|
|
791
|
+
* @returns {ImageData}.
|
|
792
|
+
*/
|
|
793
|
+
getImageData(): ImageData;
|
|
794
|
+
/**
|
|
795
|
+
* Opens an image as URL or ImageData for editing in an image editor.
|
|
796
|
+
*
|
|
797
|
+
* @param {string | ImageData } data - Specifies url of the image or image data.
|
|
798
|
+
*
|
|
799
|
+
* @remarks
|
|
800
|
+
* The supported file types are JPG, JPEG, PNG, and SVG.
|
|
801
|
+
*
|
|
802
|
+
* @returns {void}.
|
|
803
|
+
*/
|
|
804
|
+
open(data: string | ImageData): void;
|
|
805
|
+
/**
|
|
806
|
+
* Reset all the changes done in an image editor and revert to original image.
|
|
807
|
+
*
|
|
808
|
+
* @remarks
|
|
809
|
+
* The undo redo collection also cleared while resetting the image editor.
|
|
810
|
+
*
|
|
811
|
+
* @returns {void}.
|
|
812
|
+
*/
|
|
813
|
+
reset(): void;
|
|
814
|
+
/**
|
|
815
|
+
* Rotate an image to clockwise and anti-clockwise.
|
|
816
|
+
*
|
|
817
|
+
* {% codeBlock src='image-editor/rotate/index.md' %}{% endcodeBlock %}
|
|
818
|
+
*
|
|
819
|
+
* @param {number} degree - Specifies a degree to rotate an image.
|
|
820
|
+
* A positive integer value for clockwise and negative integer value for anti-clockwise rotation.
|
|
821
|
+
*
|
|
822
|
+
* @remarks
|
|
823
|
+
* It rotated the shapes including rectangle, circle, line, text, and freehand drawings.
|
|
824
|
+
*
|
|
825
|
+
* @returns {boolean}.
|
|
826
|
+
*
|
|
827
|
+
*/
|
|
828
|
+
rotate(degree: number): boolean;
|
|
829
|
+
/**
|
|
830
|
+
* Export an image using the specified file name and the extension.
|
|
831
|
+
*
|
|
832
|
+
* @param {string} type - Specifies a format of image to be saved.
|
|
833
|
+
* @param {string} fileName – Specifies a file name to be saved
|
|
834
|
+
*
|
|
835
|
+
* @remarks
|
|
836
|
+
* The supported file types are JPG, JPEG, PNG, and SVG.
|
|
837
|
+
*
|
|
838
|
+
* @returns {void}.
|
|
839
|
+
*/
|
|
840
|
+
export(type?: string, fileName?: string): void;
|
|
841
|
+
/**
|
|
842
|
+
* Perform selection in an image editor. The selection helps to crop an image.
|
|
843
|
+
*
|
|
844
|
+
* {% codeBlock src='image-editor/select/index.md' %}{% endcodeBlock %}
|
|
845
|
+
*
|
|
846
|
+
* @param {string} type - Specifies the shape - circle / square / custom selection / pre-defined ratios.
|
|
847
|
+
* @param {number} startX – Specifies the start x-coordinate point of the selection.
|
|
848
|
+
* @param {number} startY – Specifies the start y-coordinate point of the selection.
|
|
849
|
+
* @param {number} width - Specifies the width of the selection area.
|
|
850
|
+
* @param {number} height - Specifies the height of the selection area.
|
|
851
|
+
*
|
|
852
|
+
* @remarks
|
|
853
|
+
* The selection UI is based on the 'theme' property.
|
|
854
|
+
*
|
|
855
|
+
* @returns {void}.
|
|
856
|
+
*
|
|
857
|
+
*/
|
|
858
|
+
select(type: string, startX?: number, startY?: number, width?: number, height?: number): void;
|
|
859
|
+
/**
|
|
860
|
+
* Enable or disable a freehand drawing option in an Image Editor.
|
|
861
|
+
*
|
|
862
|
+
* @param {boolean} value - Specifies a value whether to enable or disable freehand drawing.
|
|
863
|
+
*
|
|
864
|
+
* @returns {void}.
|
|
865
|
+
* @private
|
|
866
|
+
*/
|
|
867
|
+
freeHandDraw(value: boolean): void;
|
|
868
|
+
/**
|
|
869
|
+
* Enable or disable a freehand drawing in an Image Editor.
|
|
870
|
+
*
|
|
871
|
+
* @param {boolean} value - Specifies a value whether to enable or disable freehand drawing.
|
|
872
|
+
*
|
|
873
|
+
* @remarks
|
|
874
|
+
* User can directly drawing on a canvas after enabling this option.
|
|
875
|
+
*
|
|
876
|
+
* @returns {void}.
|
|
877
|
+
*/
|
|
878
|
+
freehandDraw(value: boolean): void;
|
|
879
|
+
/**
|
|
880
|
+
* Enable or disable a panning on the Image Editor.
|
|
881
|
+
*
|
|
882
|
+
* @param {boolean} value - Specifies a value whether enable or disable panning.
|
|
883
|
+
*
|
|
884
|
+
* @remarks
|
|
885
|
+
* This option will take into effect once the image's visibility is hidden when zooming an image or selection has been performed.
|
|
886
|
+
*
|
|
887
|
+
* @returns {void}.
|
|
888
|
+
*/
|
|
889
|
+
pan(value: boolean): void;
|
|
890
|
+
/**
|
|
891
|
+
* Zoom in or out on a point in the image editor.
|
|
892
|
+
*
|
|
893
|
+
* @param {number} zoomFactor - The percentage-based zoom factor to use (e.g. 20 for 2x zoom).
|
|
894
|
+
* @param {Point} zoomPoint - The point in the image editor to zoom in/out on.
|
|
895
|
+
*
|
|
896
|
+
* @remarks
|
|
897
|
+
* Zooming directly enables the panning option when the image's visibility is hidden.
|
|
898
|
+
* User can disable it by using 'Pan' method.
|
|
899
|
+
* @returns {void}
|
|
900
|
+
*
|
|
901
|
+
*/
|
|
902
|
+
zoom(zoomFactor: number, zoomPoint?: Point): void;
|
|
903
|
+
/**
|
|
904
|
+
* Draw ellipse on an image.
|
|
905
|
+
*
|
|
906
|
+
* {% codeBlock src='image-editor/ellipse/index.md' %}{% endcodeBlock %}
|
|
907
|
+
*
|
|
908
|
+
* @param {number} x - Specifies x-coordinate of ellipse.
|
|
909
|
+
* @param {number} y - Specifies y-coordinate of ellipse.
|
|
910
|
+
* @param {number} radiusX - Specifies the radius x point for the ellipse.
|
|
911
|
+
* @param {number} radiusY - Specifies the radius y point for the ellipse.
|
|
912
|
+
* @param {number} strokeWidth - Specifies the stroke width of ellipse.
|
|
913
|
+
* @param {string} strokeColor - Specifies the stroke color of ellipse.
|
|
914
|
+
* @param {string} fillColor - Specifies the fill color of the ellipse.
|
|
915
|
+
* @returns {boolean}.
|
|
916
|
+
*
|
|
917
|
+
*/
|
|
918
|
+
drawEllipse(x?: number, y?: number, radiusX?: number, radiusY?: number, strokeWidth?: number, strokeColor?: string, fillColor?: string): boolean;
|
|
919
|
+
/**
|
|
920
|
+
* Draw line on an image.
|
|
921
|
+
*
|
|
922
|
+
* @param {number} startX – Specifies start point x-coordinate of line.
|
|
923
|
+
* @param {number} startY – Specifies start point y-coordinate of line.
|
|
924
|
+
* @param {number} endX - Specifies end point x-coordinates of line.
|
|
925
|
+
* @param {number} endY - Specifies end point y-coordinates of the line.
|
|
926
|
+
* @param {number} strokeWidth - Specifies the stroke width of line.
|
|
927
|
+
* @param {string} strokeColor - Specifies the stroke color of line.
|
|
928
|
+
* @returns {boolean}.
|
|
929
|
+
*/
|
|
930
|
+
drawLine(startX?: number, startY?: number, endX?: number, endY?: number, strokeWidth?: number, strokeColor?: string): boolean;
|
|
931
|
+
/**
|
|
932
|
+
* Draw arrow on an image.
|
|
933
|
+
*
|
|
934
|
+
* @param {number} startX – Specifies start point x-coordinate of arrow.
|
|
935
|
+
* @param {number} startY – Specifies start point y-coordinate of arrow.
|
|
936
|
+
* @param {number} endX - Specifies end point x-coordinates of arrow.
|
|
937
|
+
* @param {number} endY - Specifies end point y-coordinates of the arrow.
|
|
938
|
+
* @param {number} strokeWidth - Specifies the stroke width of arrow.
|
|
939
|
+
* @param {string} strokeColor - Specifies the stroke color of arrow.
|
|
940
|
+
* @param {ArrowheadType} arrowStart – Specifies the type of arrowhead for start position. The default value is ‘None’.
|
|
941
|
+
* @param {ArrowheadType} arrowEnd – Specifies the type of arrowhead for end position. The default value is ‘SolidArrow’.
|
|
942
|
+
* @returns {boolean}.
|
|
943
|
+
*/
|
|
944
|
+
drawArrow(startX?: number, startY?: number, endX?: number, endY?: number, strokeWidth?: number, strokeColor?: string, arrowStart?: ArrowheadType, arrowEnd?: ArrowheadType): boolean;
|
|
945
|
+
/**
|
|
946
|
+
* Draw path on an image.
|
|
947
|
+
*
|
|
948
|
+
* @param {Point[]} pointColl – Specifies collection of start and end x, y-coordinates of path.
|
|
949
|
+
* @param {number} strokeWidth - Specifies the stroke width of path.
|
|
950
|
+
* @param {string} strokeColor - Specifies the stroke color of path.
|
|
951
|
+
* @returns {boolean}.
|
|
952
|
+
*/
|
|
953
|
+
drawPath(pointColl: Point[], strokeWidth?: number, strokeColor?: string): boolean;
|
|
954
|
+
/**
|
|
955
|
+
* Draw a rectangle on an image.
|
|
956
|
+
*
|
|
957
|
+
* @param {number} x - Specifies x-coordinate of rectangle.
|
|
958
|
+
* @param {number} y - Specifies y-coordinate of rectangle.
|
|
959
|
+
* @param {number} width - Specifies the width of the rectangle.
|
|
960
|
+
* @param {number} height - Specifies the height of the rectangle.
|
|
961
|
+
* @param {number} strokeWidth - Specifies the stroke width of rectangle.
|
|
962
|
+
* @param {string} strokeColor - Specifies the stroke color of rectangle.
|
|
963
|
+
* @param {string} fillColor - Specifies the fill color of the rectangle.
|
|
964
|
+
* @returns {boolean}.
|
|
965
|
+
*/
|
|
966
|
+
drawRectangle(x?: number, y?: number, width?: number, height?: number, strokeWidth?: number, strokeColor?: string, fillColor?: string): boolean;
|
|
967
|
+
/**
|
|
968
|
+
* Draw a text on an image.
|
|
969
|
+
*
|
|
970
|
+
* {% codeBlock src='image-editor/text/index.md' %}{% endcodeBlock %}
|
|
971
|
+
*
|
|
972
|
+
* @param {number} x - Specifies x-coordinate of text.
|
|
973
|
+
* @param {number} y - Specifies y-coordinate of text.
|
|
974
|
+
* @param {string} text - Specifies the text to add on an image.
|
|
975
|
+
* @param {string} fontFamily - Specifies the font family of the text.
|
|
976
|
+
* @param {number} fontSize - Specifies the font size of the text.
|
|
977
|
+
* @param {boolean} bold - Specifies whether the text is bold or not.
|
|
978
|
+
* @param {boolean} italic - Specifies whether the text is italic or not.
|
|
979
|
+
* @param {string} color - Specifies font color of the text.
|
|
980
|
+
* @returns {boolean}.
|
|
981
|
+
*
|
|
982
|
+
*/
|
|
983
|
+
drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string): boolean;
|
|
984
|
+
/**
|
|
985
|
+
* Select a shape based on the given shape id.
|
|
986
|
+
* Use 'getShapeSettings' method to get the shape id which is then passed to perform selection.
|
|
987
|
+
*
|
|
988
|
+
* {% codeBlock src='image-editor/selectShape/index.md' %}{% endcodeBlock %}
|
|
989
|
+
*
|
|
990
|
+
* @param {string} id - Specifies the shape id to select a shape on an image.
|
|
991
|
+
* @returns {boolean}.
|
|
992
|
+
*
|
|
993
|
+
*/
|
|
994
|
+
selectShape(id: string): boolean;
|
|
995
|
+
/**
|
|
996
|
+
* Deletes a shape based on the given shape id.
|
|
997
|
+
* Use 'getShapeSettings' method to get the shape id which is then passed to perform selection.
|
|
998
|
+
*
|
|
999
|
+
* {% codeBlock src='image-editor/deleteShape/index.md' %}{% endcodeBlock %}
|
|
1000
|
+
*
|
|
1001
|
+
* @param {string} id - Specifies the shape id to delete the shape on an image.
|
|
1002
|
+
* @returns {void}.
|
|
1003
|
+
*
|
|
1004
|
+
*/
|
|
1005
|
+
deleteShape(id: string): void;
|
|
1006
|
+
/**
|
|
1007
|
+
* Get particular shapes details based on id of the shape which is drawn on an image editor.
|
|
1008
|
+
*
|
|
1009
|
+
* {% codeBlock src='image-editor/getShapeSetting/index.md' %}{% endcodeBlock %}
|
|
1010
|
+
*
|
|
1011
|
+
* @param {string} id - Specifies the shape id on an image.
|
|
1012
|
+
* @returns {ShapeSettings}.
|
|
1013
|
+
*
|
|
1014
|
+
*/
|
|
1015
|
+
getShapeSetting(id: string): ShapeSettings;
|
|
1016
|
+
/**
|
|
1017
|
+
* Get all the shapes details which is drawn on an image editor.
|
|
1018
|
+
*
|
|
1019
|
+
* @returns {ShapeSettings[]}.
|
|
1020
|
+
*/
|
|
1021
|
+
getShapeSettings(): ShapeSettings[];
|
|
1022
|
+
/**
|
|
1023
|
+
* To refresh the Canvas Wrapper.
|
|
1024
|
+
*
|
|
1025
|
+
* @returns {void}.
|
|
1026
|
+
*/
|
|
1027
|
+
update(): void;
|
|
1028
|
+
/**
|
|
1029
|
+
* Finetuning an image with the given type of finetune and its value in the image editor.
|
|
1030
|
+
*
|
|
1031
|
+
* @param {ImageFinetuneOption } finetuneOption - Specifies the finetune options to be performed in the image.
|
|
1032
|
+
* @param {number } value - Specifies the value for finetuning the image.
|
|
1033
|
+
*
|
|
1034
|
+
* @remarks
|
|
1035
|
+
* The finetuning will not affect the shapes background and border color.
|
|
1036
|
+
*
|
|
1037
|
+
* @returns {void}.
|
|
1038
|
+
*
|
|
1039
|
+
*/
|
|
1040
|
+
finetuneImage(finetuneOption: ImageFinetuneOption, value: number): void;
|
|
1041
|
+
/**
|
|
1042
|
+
* Filtering an image with the given type of filters.
|
|
1043
|
+
*
|
|
1044
|
+
* @param {ImageFilterOption } filterOption - Specifies the filter options to the image.
|
|
1045
|
+
*
|
|
1046
|
+
* @remarks
|
|
1047
|
+
* The filtering will not affect the shape's background and border color.
|
|
1048
|
+
* @returns {void}.
|
|
1049
|
+
*/
|
|
1050
|
+
applyImageFilter(filterOption: ImageFilterOption): void;
|
|
1051
|
+
/**
|
|
1052
|
+
* Reverse the last action which performed by the user in the Image Editor.
|
|
1053
|
+
*
|
|
1054
|
+
* @remarks
|
|
1055
|
+
* This method will take into effect once the 'allowUndoRedo' property is enabled.
|
|
1056
|
+
*
|
|
1057
|
+
* @returns {void}.
|
|
1058
|
+
*/
|
|
1059
|
+
undo(): void;
|
|
1060
|
+
/**
|
|
1061
|
+
* Redo the last user action that was undone by the user or `undo` method.
|
|
1062
|
+
*
|
|
1063
|
+
* @remarks
|
|
1064
|
+
* This method will take into effect once the 'allowUndoRedo' property is enabled.
|
|
1065
|
+
* @returns {void}.
|
|
1066
|
+
*/
|
|
1067
|
+
redo(): void;
|
|
1068
|
+
/**
|
|
1069
|
+
* Get the dimension of an image in the image editor such as x, y, width, and height.
|
|
1070
|
+
* The method helps to get dimension after cropped an image.
|
|
1071
|
+
*
|
|
1072
|
+
* @returns {Dimension}.
|
|
1073
|
+
* A Dimension object containing the x, y, width, and height of an image.
|
|
1074
|
+
*/
|
|
1075
|
+
getImageDimension(): Dimension;
|
|
1076
|
+
private toolbarTemplateFn;
|
|
1077
|
+
private quickAccessToolbarTemplateFn;
|
|
1078
|
+
private templateParser;
|
|
1079
|
+
private getTextFromId;
|
|
1080
|
+
private getFinetuneOption;
|
|
1081
|
+
private setPenStroke;
|
|
1082
|
+
private updateFreehandDrawColorChange;
|
|
1083
|
+
private setInitialZoomState;
|
|
1084
|
+
/**
|
|
1085
|
+
* Set the old item Transform item state.
|
|
1086
|
+
*
|
|
1087
|
+
* @hidden
|
|
1088
|
+
* @returns {void}.
|
|
1089
|
+
*/
|
|
1090
|
+
updateCropTransformItems(): void;
|
|
1091
|
+
/**
|
|
1092
|
+
* Get the pascal case.
|
|
1093
|
+
*
|
|
1094
|
+
* @param { string } str - Specifies the string to convert to pascal case.
|
|
1095
|
+
* @param { Object } obj - Specifies the string to convert to pascal case.
|
|
1096
|
+
* @hidden
|
|
1097
|
+
* @returns {string}.
|
|
1098
|
+
* A pascal case string.
|
|
1099
|
+
*/
|
|
1100
|
+
toPascalCase(str: string, obj?: Object): string;
|
|
1101
|
+
/**
|
|
1102
|
+
* Get the font sizes.
|
|
1103
|
+
*
|
|
1104
|
+
* @hidden
|
|
1105
|
+
* @returns {DropDownButtonItemModel[]}.
|
|
1106
|
+
* A font size collections.
|
|
1107
|
+
*/
|
|
1108
|
+
getFontSizes(): DropDownButtonItemModel[];
|
|
1109
|
+
/**
|
|
1110
|
+
* Handles the OK button operation
|
|
1111
|
+
*
|
|
1112
|
+
* @param { boolean } isMouseDown - Specifies whether it is a mouse down.
|
|
1113
|
+
* @hidden
|
|
1114
|
+
* @returns {void}.
|
|
1115
|
+
*/
|
|
1116
|
+
okBtn(isMouseDown?: boolean): void;
|
|
1117
|
+
/**
|
|
1118
|
+
* Set the temporary filter properties.
|
|
1119
|
+
*
|
|
1120
|
+
* @hidden
|
|
1121
|
+
* @returns {void}.
|
|
1122
|
+
*/
|
|
1123
|
+
setTempFilterProperties(): void;
|
|
1124
|
+
/**
|
|
1125
|
+
* To crop the selection.
|
|
1126
|
+
*
|
|
1127
|
+
* @hidden
|
|
1128
|
+
* @returns {void}.
|
|
1129
|
+
*/
|
|
1130
|
+
cropSelectedState(): void;
|
|
1131
|
+
/**
|
|
1132
|
+
* Get the current canvas data.
|
|
1133
|
+
*
|
|
1134
|
+
* @hidden
|
|
1135
|
+
* @returns {ImageData}.
|
|
1136
|
+
* An ImageData returns the current canvas image data object.
|
|
1137
|
+
*/
|
|
1138
|
+
getCurrentCanvasData(): ImageData;
|
|
1139
|
+
/**
|
|
1140
|
+
* To set current adjustment value
|
|
1141
|
+
*
|
|
1142
|
+
* @param { string } type - Specifies the type of adjustment.
|
|
1143
|
+
* @param { number } value - Specifies the value to adjust.
|
|
1144
|
+
* @hidden
|
|
1145
|
+
* @returns {void}.
|
|
1146
|
+
*/
|
|
1147
|
+
setCurrAdjustmentValue(type: string, value: number): void;
|
|
1148
|
+
/**
|
|
1149
|
+
* Get the square point for path.
|
|
1150
|
+
*
|
|
1151
|
+
* @param { SelectionPoint } obj - Specifies the points of path.
|
|
1152
|
+
* @hidden
|
|
1153
|
+
* @returns {ActivePoint}.
|
|
1154
|
+
* An ActivePoint object which returns the square point.
|
|
1155
|
+
*/
|
|
1156
|
+
getSquarePointForPath(obj: SelectionPoint): ActivePoint;
|
|
1157
|
+
/**
|
|
1158
|
+
* Get the SelectionType.
|
|
1159
|
+
*
|
|
1160
|
+
* @param { string } type - Specifies the SelectionType.
|
|
1161
|
+
* @hidden
|
|
1162
|
+
* @returns {string}.
|
|
1163
|
+
* An string which returns the SelectionType.
|
|
1164
|
+
*/
|
|
1165
|
+
getSelectionType(type: string): string;
|
|
1166
|
+
/** Clears the context.
|
|
1167
|
+
*
|
|
1168
|
+
* @param { CanvasRenderingContext2D } ctx - Specifies the canvas context.
|
|
1169
|
+
* @hidden
|
|
1170
|
+
* @returns {void}.
|
|
1171
|
+
*/
|
|
1172
|
+
clearContext(ctx: CanvasRenderingContext2D): void;
|
|
1173
|
+
/**
|
|
1174
|
+
* Apply Arrow for start and end.
|
|
1175
|
+
*
|
|
1176
|
+
* @param { string } type - Specifies the start arrow or end arrow.
|
|
1177
|
+
* @param { string } id - Specifies the start arrow or end arrow item id.
|
|
1178
|
+
* @hidden
|
|
1179
|
+
* @returns {void}.
|
|
1180
|
+
*/
|
|
1181
|
+
updateArrow(type: string, id: string): void;
|
|
1182
|
+
/**
|
|
1183
|
+
* Apply Font style for text.
|
|
1184
|
+
*
|
|
1185
|
+
* @param { string } id - Specifies the selected item id.
|
|
1186
|
+
* @hidden
|
|
1187
|
+
* @returns {void}.
|
|
1188
|
+
*/
|
|
1189
|
+
updateFontFamily(id: string): void;
|
|
1190
|
+
/**
|
|
1191
|
+
* Apply Font size for text.
|
|
1192
|
+
*
|
|
1193
|
+
* @param { string } text - Specifies the selected item text.
|
|
1194
|
+
* @hidden
|
|
1195
|
+
* @returns {void}.
|
|
1196
|
+
*/
|
|
1197
|
+
updateFontSize(text: string): void;
|
|
1198
|
+
/**
|
|
1199
|
+
* Apply Font color for text.
|
|
1200
|
+
*
|
|
1201
|
+
* @param { string } value - Specifies the selected color item value.
|
|
1202
|
+
* @hidden
|
|
1203
|
+
* @returns {void}.
|
|
1204
|
+
*/
|
|
1205
|
+
updateFontColor(value: string): void;
|
|
1206
|
+
/**
|
|
1207
|
+
* Apply Pen stroke width.
|
|
1208
|
+
*
|
|
1209
|
+
* @param { string } id - Specifies the selected item id.
|
|
1210
|
+
* @hidden
|
|
1211
|
+
* @returns {void}.
|
|
1212
|
+
*/
|
|
1213
|
+
updatePenStrokeWidth(id: string): void;
|
|
1214
|
+
/**
|
|
1215
|
+
* Apply Pen stroke color.
|
|
1216
|
+
*
|
|
1217
|
+
* @param { string } value - Specifies the selected color item value.
|
|
1218
|
+
* @hidden
|
|
1219
|
+
* @returns {void}.
|
|
1220
|
+
*/
|
|
1221
|
+
updatePenStrokeColor(value: string): void;
|
|
1222
|
+
/**
|
|
1223
|
+
* Apply Shape stroke width.
|
|
1224
|
+
*
|
|
1225
|
+
* @param { string } id - Specifies the selected item id.
|
|
1226
|
+
* @hidden
|
|
1227
|
+
* @returns {void}.
|
|
1228
|
+
*/
|
|
1229
|
+
updateStrokeWidth(id: string): void;
|
|
1230
|
+
/**
|
|
1231
|
+
* Apply Shape stroke color.
|
|
1232
|
+
*
|
|
1233
|
+
* @param { string } value - Specifies the selected color item value.
|
|
1234
|
+
* @hidden
|
|
1235
|
+
* @returns {void}.
|
|
1236
|
+
*/
|
|
1237
|
+
updateStrokeColor(value: string): void;
|
|
1238
|
+
/**
|
|
1239
|
+
* Apply Shape fill color.
|
|
1240
|
+
*
|
|
1241
|
+
* @param { string } value - Specifies the selected color item value.
|
|
1242
|
+
* @hidden
|
|
1243
|
+
* @returns {void}.
|
|
1244
|
+
*/
|
|
1245
|
+
updateFillColor(value: string): void;
|
|
1246
|
+
/**
|
|
1247
|
+
* Get pascalToSplitWords from string.
|
|
1248
|
+
*
|
|
1249
|
+
* @param { string } str - Specifies the word.
|
|
1250
|
+
* @hidden
|
|
1251
|
+
* @returns {string}.
|
|
1252
|
+
*/
|
|
1253
|
+
pascalToSplitWords(str: string): string;
|
|
1254
|
+
/**
|
|
1255
|
+
* Get Slider Value.
|
|
1256
|
+
*
|
|
1257
|
+
* @param { string } type - Finetune type.
|
|
1258
|
+
* @hidden
|
|
1259
|
+
* @returns {number}.
|
|
1260
|
+
*/
|
|
1261
|
+
getCurrAdjustmentValue(type: string): number;
|
|
1262
|
+
/**
|
|
1263
|
+
* Apply transformSelect.
|
|
1264
|
+
*
|
|
1265
|
+
* @param { string } type - Specifies the selected item text.
|
|
1266
|
+
* @hidden
|
|
1267
|
+
* @returns {void}.
|
|
1268
|
+
*/
|
|
1269
|
+
transformSelect(type: string): void;
|
|
1270
|
+
/**
|
|
1271
|
+
* Returns default filter.
|
|
1272
|
+
*
|
|
1273
|
+
* @hidden
|
|
1274
|
+
* @returns {string}.
|
|
1275
|
+
*/
|
|
1276
|
+
getDefaultFilter(): string;
|
|
1277
|
+
/**
|
|
1278
|
+
* To Initialize the component rendering
|
|
1279
|
+
*
|
|
1280
|
+
* @private
|
|
1281
|
+
* @param {HTMLCanvasElement} element - Specifies the canvas element.
|
|
1282
|
+
* @param {BlazorDotnetObject} dotnetRef - Specifies for blazor client to server communication.
|
|
1283
|
+
* @returns {void}
|
|
1284
|
+
*/
|
|
1285
|
+
initializeImageEditor(element: HTMLDivElement, dotnetRef?: BlazorDotnetObject): void;
|
|
1286
|
+
private prerender;
|
|
1287
|
+
private initializeZoomSettings;
|
|
1288
|
+
private initializeThemeColl;
|
|
1289
|
+
/**
|
|
1290
|
+
* Get the square point for path.
|
|
1291
|
+
*
|
|
1292
|
+
* @param { HTMLDivElement } element - Specifies element.
|
|
1293
|
+
* @param { string } type - Specifies the type.
|
|
1294
|
+
* @param { string } value - Specifies the value.
|
|
1295
|
+
* @hidden
|
|
1296
|
+
* @private
|
|
1297
|
+
* @returns {void}.
|
|
1298
|
+
*/
|
|
1299
|
+
updateToolbar(element: HTMLDivElement, type: string, value?: string): void;
|
|
1300
|
+
}
|