mgcolor.h

来自「monqueror一个很具有参考价值的源玛」· C头文件 代码 · 共 46 行

H
46
字号
#ifndef		_MGCOLOR_H_#define		_MGCOLOR_H_#define		COLOR_NAME_LEN	20class MGColor{public:	MGColor();#if( _CURRENT_PLATFORM == _PLATFORM_MINIGUI )	MGColor( gal_pixel, const char* name );#endif	MGColor( const char* p );	MGColor( int r, int g, int b );	~MGColor();		MGColor& operator=( const MGColor& c );	bool operator==( const MGColor& c ) const;	bool operator!=( const MGColor& c ) const;	bool isValid() const;	int red() const;	int green() const;	int blue() const;	MGString name() const;	void setRgb (int r, int g, int b );#if( _CURRENT_PLATFORM == _PLATFORM_MINIGUI )	inline void setPixel (gal_pixel pixel) {pixVal = pixel;};    inline gal_pixel getPixel () const {return pixVal;}	static gal_pixel Rgb2Pixel ( const HDC&, const MGColor& c, bool force = false );#endif	// dataprotected:	char m_name[COLOR_NAME_LEN];	friend class MGPainter;#if( _CURRENT_PLATFORM == _PLATFORM_MINIGUI )	RGB rgbVal;	gal_pixel pixVal;#endif};#endif

⌨️ 快捷键说明

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