FreeHandShear Example for C++ 5.0 and later

ILEADRasterProcess* m_pRasterProc= NULL;
CoCreateInstance(CLSID_LEADRasterProcess, NULL, CLSCTX_ALL, IID_ILEADRasterProcess, (void**)&m_pRasterProc);

int nMax=0;

m_pRasterProc->AmplitudesCount(4);

m_pRasterProc->PutUserLUTCurveX(0,0);
m_pRasterProc->PutUserLUTCurveY(0,0);

m_pRasterProc->PutUserLUTCurveX(1,3);
m_pRasterProc->PutUserLUTCurveY(1,10);

m_pRasterProc->PutUserLUTCurveX(2,9);
m_pRasterProc->PutUserLUTCurveY(2,-10);

m_pRasterProc->PutUserLUTCurveX(3,12);
m_pRasterProc->PutUserLUTCurveY(3,0);

m_pRasterProc->GetCurvePoints(GUB_LINEAR);

for(int i = 0; i < m_pRasterProc->AmplitudesCount; i++)
   if(nMax <m_pRasterProc->GetCurve (i))
      nMax = m_pRasterProc->GetCurve(i);

if(nMax)
   for(i = 0; i <m_pRasterProc->AmplitudesCount; i++)
      m_pRasterProc->PutCurve(i,(1000 * m_pRasterProc->GetCurve(i)/ abs(nMax) )) ;

m_pRasterProc->FreeHandShear(m_LeadRasterView.GetRaster(),100,RGB(0,0,0), FILL_RPT | SHR_HORZ); 

m_pRasterProc->Release();