MatrixObject copy function
bool matobj_copy( MatrixObject & moDest, const MatrixObject & moSrc, bool bUseROI = true, vector<point> * pROI = NULL, bool bAllAttr = true )
return true on success, else return false.
EX1
void matobj_copy_ex1() { //make sure there is a matrixpage name MBook1 with two layers exists before run this code //you may import two different images into each layer. MatrixPage mp(Project.FindPage("MBook1", EXIST_MATRIX)); if ( mp ) { MatrixLayer ml1 = mp.Layers(0); MatrixLayer ml2 = mp.Layers(1); if ( ml1 && ml2 ) { MatrixObject moSrc(ml1, 0); MatrixObject moDest(ml2, 0); if ( moSrc && moDest ) { bool bRet = matobj_copy(moDest, moSrc, true, NULL, true); if ( bRet ) printf("Copy MatrixObject successfully!"); else printf("Fail to copy MatrixObject!"); } } } }
origin.h