Definition
Namespace:Telerik.Web.UI.ImageEditor
Inheritance: Telerik.Web.UI.ImageEditor.EditableImageBaseTelerik.Web.UI.ImageEditor.EditableCanvas
Methods
Adds text to the image in the specified position
addText(Number x, Number y, Telerik.Web.UI.ImageEditor.ImageText text): void
The X coordinate of the text
yNumberThe Y coordinate of the text
textTelerik.Web.UI.ImageEditor.ImageTextThe text to add to the image.
Initiates a callback to the server and performs operations (saving image, cropping and etc.) to the image on the server.
applyChangesOnServer(Boolean saveImageServer, Object fileName, Boolean call_saveOnClient, Boolean overwrite): void
True
fileNameObjectThe filename of the image. If null then the original filename is used. If file name is not a string
call_saveOnClientBooleanTrue
overwriteBooleanTrue
Creates an image operation which is applied against the current editable image and adds the operation to the undo stack.
applyFilter(Telerik.Web.UI.ImageEditor.Filters.IPixelFilter filter, Object imgOperation): void
The filter to be applied.
imgOperationObjectThe image operation object handling the actual editing of the image.
Changes the opacity of the image.
changeOpacity(Number opacity, Object imgOperation): void
The new value of the opacity.
imgOperationObjectThe image operation object handling the actual editing of the image.
Crops the image to the given rectangle.
crop(Object rectangle): void
The rectangle defined by coordinates and dimensions to crop.
Initiates an ASP.NET client callback to the server and raises the ImageEditing server side event. The EditableImage can be retrieved from the event arguments, and edited accordingly.
doServerOperation(String commandName, String commandText, String commandArgument, Function callbackFunction): void
The command name that will be passed to the server and respective client events. It should be unique.
commandTextStringThe command text that will be used to record the operation in the Undo
commandArgumentStringThe additional command argument that will be passed to the server. By default empty string is passed.
callbackFunctionFunctionThe function that will be called after response is received from the server. Two parameters are sent to this function
Executes the provided filter against the current editable image.
executeFilter(Telerik.Web.UI.ImageEditor.Filters.IPixelFilter filter): void
The filter to be executed.
Flips the image in the specified direction.
flip(Telerik.Web.UI.ImageEditor.FlipDirection flipDirection, Boolean clearPrevFlipDirection, Object imgOperation): void
The direction of flipping.
clearPrevFlipDirectionBooleanTrue
imgOperationObjectThe image operation object handling the actual editing of the image.
Ensures that the Zoom level is applied to the image
forceCurrentZoom(): void
Gets the flip direction of the editable canvas.
get_flipDirection(): Telerik.Web.UI.ImageEditor.FlipDirection
Telerik.Web.UI.ImageEditor.FlipDirection
Enum value of the flip direction
Gets the current height of the canvas. Note that value may be different that the height of the image DOM element, for example, when zoomed.
get_height(): Number
Number
The height of the editable image
Gets the current opacity of the editable canvas.
get_opacity(): Number
Number
The opacity value of the editable canvas. Range
Gets the rotation enum value of the editable canvas.
get_rotation(): Telerik.Web.UI.ImageEditor.Rotation
Telerik.Web.UI.ImageEditor.Rotation
Enum value of the rotation.
Gets the rotation angle of the editable canvas.
get_rotationAngle(): Number
Number
The value in degrees of the image rotation.
Gets the current width of the canvas. Note that value may be different that the width of the image DOM element, for example, when zoomed.
get_width(): Number
Number
The width of the editable image
Returns the Base64 representation of the loaded image.
getBase64(String mimeType): String
The currently supported types are Image
Returns:String
The string that represents the encoded graphical data.
Gets the element, onto which the editing will be done.
getCanvas(): Object
Object
The respective DOM element. Could be an image or a canvas tag
Returns the 2d Context of the canvas element.
getCanvasContext(): Object
Object
The 2d canvas context.
Returns a URL which could be used to visualize the image directly. The image is represented in Base64 format.
getDataUrl(String mimeType): String
The currently supported types are Image
Returns:String
The string that represents an encoded URL containing the graphical data.
Returns an ImageData object containing the image data for the given rectangle of the bitmap.
getImageDataAll(): Object
Object
The ImageData object.
Inserts image (clip art) into the editable image at the specified position
insertImage(Number x, Number y, String value, Array operationsToApply): void
The X coordinate of the image
yNumberThe Y coordinate of the image
valueStringThe client URL of the image to insert.
operationsToApplyArrayArray of operations to apply to the clip art image
Gets a flag whether the image is loaded.
isImageLoaded(): Boolean
Boolean
Is the image loaded flag.
Gets a flag whether the image is loading
isImageLoading(Object image): Boolean
The image to be edited.
Returns:Boolean
Is the image loading flag
Resets the changes to the current image and reverts it to the original one
reset(Array imageUrl): void
The original image url.
Resizes the image.
resize(Number width, Number height, Object imgOperation): void
The new width of the image.
heightNumberThe new height of the image.
imgOperationObjectThe image operation object handling the actual editing of the image.
Rotates the image in the specified direction.
rotate(Telerik.Web.UI.ImageEditor.Rotation rotationDirection, Number angle, Object imgOperation): void
Enum to determine the angle value. Only orthogonal values
angleNumberThe rotation angle.
imgOperationObjectThe image operation object handling the actual editing of the image.
Saves the image on the client machine.
saveOnClient(Object fileName): void
The filename of the image. If file name is not a string
Sets the flip direction to the editable canvas.
set_flipDirection(Telerik.Web.UI.ImageEditor.FlipDirection flipDirection): void
The direction of flipping.
Zooms(scales) the image by the specified level in percents. This operation does not change the image
zoom(Number zoomLevel, Boolean forceZoom): void
The level
forceZoomBooleanBool value indicating whether the zoom should be performed even if the current zoom level is the same.