CBasePixel.cpp
上传用户:hhs829
上传日期:2022-06-17
资源大小:586k
文件大小:1k
- //
- // CBasePixel.cpp
- //
- #include "CBasePixel.h"
- ///////////////////////////////////////////////////////////////////////
- CBasePixel::CBasePixel()
- {
- m_TargetR = 0;
- m_TargetG = 0;
- m_TargetB = 0;
- m_PixelSize = 1;
- }
- CBasePixel::~CBasePixel()
- {
- }
- void CBasePixel::SetTargetColor(unsigned char inR, unsigned char inG, unsigned char inB)
- {
- m_TargetR = inR;
- m_TargetG = inG;
- m_TargetB = inB;
- SideEffectColorChanged();
- }
- void CBasePixel::SetPixelSize(int inSize)
- {
- m_PixelSize = inSize;
- }
- unsigned char * CBasePixel::NextPixel(unsigned char * inCurrent)
- {
- return (inCurrent + m_PixelSize);
- }
- unsigned char * CBasePixel::NextNPixel(unsigned char * inCurrent, int inCount)
- {
- return (inCurrent + inCount * m_PixelSize);
- }
- void CBasePixel::ConvertByCover(unsigned char * inPixel)
- {
- }
- void CBasePixel::ConvertByReverse(unsigned char * inPixel)
- {
- for (int i = 0; i < m_PixelSize; i++)
- {
- *inPixel = ~*inPixel;
- // *inPixel = *inPixel ^ 0xff;
- inPixel++;
- }
- }
- void CBasePixel::SideEffectColorChanged(void)
- {
- }