getFitToWindowType()

Description

Gets how the image is/should be resized to fit to the width or height of the viewer.

Syntax

ImageViewerObject.ui.getFitToWindowType();

Return value

<EnumFitToWindowType>

Remarks

Before change the value of fitToWindowType, make sure you have set the view mode to -1 by -1 using .ui.setImageViewMode().

Allowed Values Fit To Window Type
EnumFitToWindowType.FitToWindow(default) Fit the image to both the width and height of the viewer

EnumFitToWindowType.None Don’t fit to the viewer, zoomable

When an error occurs, check getErrorCode() or getErrorString() for error information.

Example

             var imageviewer = DCSObject.getImageViewer("ImageViewerContainer");  // Get a specified image viewer
             imageviewer.ui.setImageViewMode(-1, -1);  // Set the view mode to -1 by -1
             imageviewer.ui.getFitToWindowType();  
      

See also

.ui.setImageViewMode()

.ui.setFitToWindowType()