get_useBackCanvas();
set_useBackCanvas(value);
Object.defineProperty('useBackCanvas');
Type | Description |
---|---|
boolean | true to use the backrgound canvas to store the image data, otherwise; false. Default value is true. |
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.