MatrixLayer::CopyRect

Description

Copy all matrix objects data inside ROI

Syntax

int CopyRect( MatrixLayer & matlayDest, const ROIInfo * proiInfo, DWORD dwCntrl = 0 )

Parameters

matlayDest
[input] destination matrix layer, NULL will crop current matrix layer, Undo is enabled
proiInfo
[input] ROI in matrix layer
dwCntrl
[input] MATSHEETCOPYTO_COPY_ACTIVE_OBJ_ONLY to copy active matrix object only

Return

0 if success

Examples

EX1

void CopyRect_ex()
{
        MatrixLayer ml = Project.ActiveLayer();
        
        //get roi on matrix layer
        ROIObject roi;
        roi = GetROI(&ml);
        
        RECT rr;
        if (roi && roi.GetRect(&rr) == 0)
        {
                ROIInfo info;
                info.pRect = &rr;
                info.uid = roi.GetUID(TRUE);
                
                //crop ml
                ml.CopyRect(NULL, &info); 
        }
}

Remark

See Also

header to Include

origin.h