CBasePixel.h
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:1k
源码类别:

DirextX编程

开发平台:

Visual C++

  1. //
  2. // CBasePixel.h
  3. //
  4. #ifndef __CBasePixel_h__
  5. #define __CBasePixel_h__
  6. class CBasePixel
  7. {
  8. protected:
  9. unsigned char    m_TargetR;      // Target RGB
  10. unsigned char    m_TargetG;
  11. unsigned char    m_TargetB;
  12. unsigned char    m_PixelSize;    // Bytes per pixel
  13. public:
  14. CBasePixel();
  15. ~CBasePixel();
  16. public:
  17. void SetTargetColor(unsigned char inR, unsigned char inG, unsigned char inB);
  18. void SetPixelSize(int inSize);
  19. int  GetPixelSize(void) {return m_PixelSize;}
  20. virtual void ConvertByCover(unsigned char * inPixel);
  21. // Using reverse operation, make converted pixel outstanding anyway
  22. virtual void ConvertByReverse(unsigned char * inPixel);
  23. unsigned char * NextPixel(unsigned char * inCurrent);  // Point to the next pixel
  24. unsigned char * NextNPixel(unsigned char * inCurrent, int inCount); 
  25. protected:
  26. virtual void SideEffectColorChanged(void);
  27. };
  28. #endif // __CBasePixel_h__