get_autoScaleBackCanvas();
set_autoScaleBackCanvas(value);
Object.defineProperty('autoScaleBackCanvas');
Type | Description |
---|---|
boolean | true to automatically resize the background canvas if needed, otherwise; false. Default value is true. |
The size of a usable canvas (a canvas where every pixel is available for reading and writing) depends on a combination of the current device, browser and graphics driver. For example, some devices do not currently support creating a usable canvas greater than 2048 by 2048 pixels. The maximum size is subject to change as new updates are applied to the device, driver or operating system.
When the value of UseBackCanvas is true, then AutoScaleBackCanvas can be used to ensure that the viewer guarantees that the whole image is viewable and usable by dynamically calculating the maximum usable canvas size, and then resizing the image data before applying it into the background canvas (keeping the correct aspect ratio). The resize is performed in 1024 pixels decrements using the LTHelper.EnsureUsableCanvas method.
If resizing is performed, then BackCanvasScale will contain the scale value used and the value of ImageSize will contain the new scaled values. If not scaling is needed, the value of BackCanvasScale will be set to the default value 1.
If UseBackCanvas is set to false, then the value of AutoScaleBackCanvas is not used.