LineRemove example for C++ 5.0 and later
void CTutorDlg::OnLineremove()
{
//Line Remove
//This examples removes vertical lines that are at least 200 pixels in length
//and no more than 5 pixels in width
//The lines can have gaps up to two pixels in length
//The LineRemove Event is used to display information about each line removed
//The following is declared and created in in the CTutorDlg class constructor
// ILEADRasterProcess *m_pRasterProc=NULL;
// hr = CoCreateInstance(
// CLSID_LEADRasterProcess,
// NULL,
// CLSCTX_ALL,
// IID_ILEADRasterProcess,
// (void**)&m_pRasterProc);
int nRet;
m_LEADRasterView1.GetRaster().UnlockSupport(L_SUPPORT_DOCUMENT, L_KEY_DOCUMENT);
m_pRasterProc->EnableMethodErrors = FALSE;
m_pRasterProc->EnableDocCleanEvents = TRUE;
nRet = m_pRasterProc->LineRemove(
m_LEADRasterView1.GetRaster(),
LINE_USE_GAP,
200,
5,
7,
10,
2,
0,
LINEREMOVE_HORIZONTAL);
}
void CRasterProcSink::OnLineRemove(
float fStartRow,
float fStartCol,
float fLength,
long hRgnLine)
{
CString strMsg;
strMsg.Format(TEXT("Line at [R,C] [%0.0f,%0.0f] Length[%0.0f]\n"),
fStartRow,
fStartCol,
fLength);
OutputDebugString(strMsg);
}