swap()

Description

Switches two images of specified indices in the buffer.

Syntax

ImageViewerObject.image.swap(firstIndex, secondIndex);

Parameters

<int> firstIndex: specifies the 1st index of the images to be switched. The index is 0-based.
<int> secondIndex: specifies the 2nd index of the images to be switched. The index is 0-based.

Return value

bool

true indicates success. false indicates failure.

When false is returned, check getErrorCode() or getErrorString() for error information.

Example

             var imageviewer = DCSObject.getImageViewer("ImageViewerContainer");  // Get a specified image viewer
             imageviewer.image.swap(0,1); 
      
Is this page helpful?

Leave a Reply

Your email address will not be published.