00001
00041 #ifndef _PICCROPPERBASE_H
00042 #define _PICCROPPERBASE_H
00043
00044 #pragma once
00045
00046
00047
00048
00049
00050
00051 class PicCropperBase
00052 {
00053 public:
00054
00055 PicCropperBase(void) {_widthOut = 0; _heightOut = 0; _widthIn = 0; _heightIn = 0; _byX1 = 0; _byX2 = 0; _byY1 = 0; _byY2 = 0; }
00056 PicCropperBase(int widthOut, int heightOut, int widthIn, int heightIn, int left, int right, int top, int bottom)
00057 { _widthOut = widthOut; _heightOut = heightOut; _widthIn = widthIn; _heightIn = heightIn; _byX1 = left; _byX2 = right; _byY2 = top; _byY1 = bottom; }
00058 virtual ~PicCropperBase(void) {}
00059
00060
00061 virtual int Crop(void* pInImg, void* pImg) = 0;
00062
00063
00064 int GetOutWidth(void) { return(_widthOut); }
00065 int GetOutHeight(void) { return(_heightOut); }
00066 int GetInWidth(void) { return(_widthIn); }
00067 int GetInHeight(void) { return(_heightIn); }
00068 int GetCropLeft(void) { return(_byX1); }
00069 int GetCropRight(void) { return(_byX2); }
00070 int GetCropBottom(void) { return(_byY1); }
00071 int GetCropTop(void) { return(_byY2); }
00072
00073 void SetOutDimensions(int widthOut, int heightOut) {_widthOut = widthOut; _heightOut = heightOut; }
00074 void SetInDimensions(int widthIn, int heightIn) {_widthIn = widthIn; _heightIn = heightIn; }
00075 void SetCrop(int left, int right, int top, int bottom) {_byX1 = left; _byX2 = right; _byY2 = top; _byY1 = bottom; }
00076
00077 protected:
00078
00079 int _widthOut;
00080 int _heightOut;
00081 int _widthIn;
00082 int _heightIn;
00083 int _byX1;
00084 int _byX2;
00085 int _byY1;
00086 int _byY2;
00087
00088 };
00089
00090 #endif // _PICCROPPERBASE_H