#include #include #include #include HGLOBAL Shear::performShear(WORD &width,WORD &height,double hFraction,double gFraction,UHUGE *lpImage) { POINT workPoint; HGLOBAL hGlobalImage; HGLOBAL hGlobalSource; UHUGE *ptrSource; UHUGE *ptrImage; double tempxPoint; double tempyPoint; double tempFraction; mSourceWidth=width; mSourceHeight=height; mxSourceHalf=mSourceWidth/2; mySourceHalf=mSourceHeight/2; calculateDimensions(width,height,hFraction,gFraction); hGlobalSource=Main::upsideDown(width,height,lpImage); ptrSource=(UHUGE*)::GlobalLock(hGlobalSource); hGlobalImage=::GlobalAlloc(GMEM_FIXED,(LONG)mDestWidth*(LONG)mDestHeight); ptrImage=(UHUGE *)::GlobalLock(hGlobalImage); Main::hmemset(ptrImage,0,(LONG)mDestWidth*(LONG)mDestHeight); for(int row=0;row