#ifndef _PERSPECTIVEWARP_HPP_ #define _PERSPECTIVEWARP_HPP_ #include class PerspectiveWarp { public: enum Type{Incremental,None}; enum Operation{Add,Subtract,Multiply,Divide}; PerspectiveWarp(WORD width,WORD height,UHUGE *hpImageInvert, double wRow,double wCol); PerspectiveWarp(WORD width,WORD height, double wRow,double wCol, Operation colOp,double colIncr, Operation rowOp,double rowIncr,UHUGE *hpImageInvert); ~PerspectiveWarp(); HGLOBAL performPerspectiveWarp(void); void cancelThread(void); WORD isCancelled(void)const; private: HGLOBAL incrementalWarp(void); HGLOBAL nonIncrementalWarp(void); WORD yieldTask(void)const; WORD emergencyCleanup(HGLOBAL hGlobalSource,HGLOBAL hGlobal)const; double mwRow, mwCol; double mRowIncr, mColIncr; Operation mRowOp, mColOp; WORD mWidth, mHeight; WORD mIsInThread; Type mWarpType; UHUGE *mhpImageInvert; }; inline void PerspectiveWarp::cancelThread(void) { mIsInThread=FALSE; } inline WORD PerspectiveWarp::isCancelled(void)const { return !mIsInThread; } #endif