CBasePixel.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:1k
- //
- // CBasePixel.h
- //
- #ifndef __CBasePixel_h__
- #define __CBasePixel_h__
- class CBasePixel
- {
- protected:
- unsigned char m_TargetR; // Target RGB
- unsigned char m_TargetG;
- unsigned char m_TargetB;
- unsigned char m_PixelSize; // Bytes per pixel
- public:
- CBasePixel();
- ~CBasePixel();
- public:
- void SetTargetColor(unsigned char inR, unsigned char inG, unsigned char inB);
- void SetPixelSize(int inSize);
- int GetPixelSize(void) {return m_PixelSize;}
- virtual void ConvertByCover(unsigned char * inPixel);
- // Using reverse operation, make converted pixel outstanding anyway
- virtual void ConvertByReverse(unsigned char * inPixel);
- unsigned char * NextPixel(unsigned char * inCurrent); // Point to the next pixel
- unsigned char * NextNPixel(unsigned char * inCurrent, int inCount);
- protected:
- virtual void SideEffectColorChanged(void);
- };
- #endif // __CBasePixel_h__