⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 colorpixel.cpp

📁 刚上传内容的相关CODEC不能单独上传。于是
💻 CPP
字号:
// ColorPixel.cpp: implementation of the CColorPixel class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "ColorPixel.h"

#include <math.h>
#include <conio.h>

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

#define PI	3.14159265358979
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CColorPixel::CColorPixel()
{
	r = g = b = 0;
}

CColorPixel::~CColorPixel()
{

}

void CColorPixel::operator = (COLORREF& pixel)
{
	r = (BYTE)(pixel&0x000000FF);
	g = (BYTE)((pixel&0x0000FF00)>>8);
	b = (BYTE)((pixel&0x00FF0000)>>16);
}

void CColorPixel::operator = (int& pixel)
{
	r = (BYTE)(pixel&0x000000FF);
	g = (BYTE)((pixel&0x0000FF00)>>8);
	b = (BYTE)((pixel&0x00FF0000)>>16);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -