LEADTOOLS JavaScript (Leadtools.Controls)

UseBackCanvas Property

Show in webframe
Gets or sets a value that indicates whether to use the backrgound canvas to store the image data.
Syntax
get_useBackCanvas();
set_useBackCanvas(value);
Object.defineProperty('useBackCanvas');

Property Value

TypeDescription
booleantrue to use the backrgound canvas to store the image data, otherwise; false. Default value is true.
Remarks

When a new value is set in the ImageUrl property, the viewer will create a new Image element with its src set to the value of ImageUrl. Upon completion of the load operation, one of the following actions is performed:

If the value of UseBackCanvas is set to false: The created image element is set into the BackImage property. Rendering will be performed by drawing this image into the foreground canvas. In this mode, the value of BackCanvas will always be null and the user cannot perform actions such as owner drawing or changing the current image data.

Use this mode when no owner drawing or changing of the original image data is required after the URL is set.

If the value of UseBackCanvas is set to true (the default value): The BackCanvas canvas element is created and the image element is rendered (and potentially resized) into this background canvas and then deleted. Rendering will be performed by drawing this canvas into the foreground canvas. In this mode, the value of BackImage will always be null.

Use this mode when owner drawing or changing to the original image data is required. The LEADTOOLS HTML 5 Annotations demo uses this mode to burn the annotations into the surface of the original image and to perform redact and encrypt actions. The LEADTOOLS HTML 5 Medical Viewer Demo uses this mode as well to perform owner drawing of multiple frames of an image into the same viewer.

Note that when performing owner drawing by setting a value directly into ImageSize, the background canvas is always created and the value of UseBackCanvas is ignored and treated as if it was set to true.

When using a background canvas, the value of AutoScaleBackCanvas can be used to ensure that the whole image is viewable by potentially resizing the background canvas.

See Also

Reference

ImageViewer Object
ImageViewer Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.