Move a MatrixObject to replace another one.
Move a MatrixObject to end of a specified MatrixLayer
bool matobj_move( MatrixObject & moSrc, MatrixObject & moDest )
bool matobj_move( MatrixObject & moSrc, MatrixLayer & mlDest )
return true on success, else return false
EX1
void matobj_move_ex1() { //make sure an active matrixlayer with two matrixobject exists before run this code MatrixLayer ml = Project.ActiveLayer(); if ( ml ) { MatrixObject moSrc(ml, 0); MatrixObject moDest(ml, 1); if ( matobj_move(moSrc, moDest) ) printf("Move MatrixObject successfully!"); else printf("Fail to move MatrixObject!"); } }
EX2
void matobj_move_ex2() { //make sure the is active matrixpage with at least two layers exists in current project MatrixLayer ml = Project.ActiveLayer(); if ( ml ) { MatrixPage mp(ml.GetPage()); MatrixLayer ml1 = mp.Layers(0); MatrixLayer ml2 = mp.Layers(1); if ( ml1 && ml2 ) { MatrixObject moSrc(ml1, 0); if ( matobj_move(moSrc, ml2) ) printf("Move MatrixObject to another layer successfully!"); else printf("Fail to move MatrixObject"); } } }
origin.h