SetViewMode
Set the view mode for the matrix page.
BOOL SetViewMode( BOOL bViewImage, BOOL bSetAllLayers = FALSE, int nLayerIndex = -1 )
Returns TRUE on success and FALSE on failure.
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"); }
MatrixLayer::SetViewImage
origin.h