📄 colorpixel.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 + -