www.pudn.com > aa.rar > CBasePixel.cpp


// 
// 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) 
{ 
}