2.2.4.29.7 MatrixPage::SetViewMode

Description

Set the view mode for the matrix page.

Syntax

BOOL SetViewMode( BOOL bViewImage, BOOL bSetAllLayers = FALSE, int nLayerIndex = -1 )

Parameters

bViewImage
[input]View matrix as image or data.
bSetAllLayers
[input]Set all the layers in the matrix or a single layer.
nLayerIndex
[input]Index of layer to set view mode. This parameter is ignored if bSetAllLayers is TRUE.

Return

Returns TRUE on success and FALSE on failure.

Examples

EX1

// Set the active layer of the active MatrixPage to image view.
void MatrixPage_SetViewMode_ex1()
{
    MatrixPage pg = Project.Pages(); // get active page
    if( pg )
    {
        BOOL bViewImage = TRUE; // set view mode to image
        BOOL bSetAllLayers = FALSE; // set view mode of a single layer
        int nLayerIndex = -1; // set view mode of active layer

        pg.SetViewMode(bViewImage, bSetAllLayers, nLayerIndex);
    }
    else
        printf("Active page is not a matrix\n");
}

EX2

// Set all the layers of the active MatrixPage to image view.
void MatrixPage_SetViewMode_ex2()
{
    MatrixPage pg = Project.Pages(); // get active page
    if( pg )
    {
        
        BOOL bViewImage = TRUE; // set view mode to image
        BOOL bSetAllLayers = TRUE; // set view mode of a single layer
        // When bSetAllLayers is TRUE the nLayerIndex parameter is ignored.

        pg.SetViewMode(bViewImage, bSetAllLayers);
    }
    else
        printf("Active page is not a matrix\n");
}

Remark

See Also

MatrixLayer::SetViewImage

Header to Include

origin.h