//
//	Copyright © 2005 Nemetschek North America 
//	All Rights Reserved.
//
// Created by Vladislav Stanev

#pragma once

namespace VWFC
{
	namespace Tools
	{
		class CRGBColor : public RGBColor
		{
		public:
						CRGBColor();
						CRGBColor(UInt8 r, UInt8 g, UInt8 b);
						CRGBColor(ColorRef colorIndex);
						CRGBColor(const RGBColor& clr);
						CRGBColor(const CRGBColor& clr);
						// create gradient color from 'leftColor' to 'rightColor' using percentage
						// 0% = leftColor; 100% = rightColor
						CRGBColor(const CRGBColor& leftColor, const CRGBColor& rightColor, double dPercent);
			virtual		~CRGBColor();

			CRGBColor&	operator=(const RGBColor& clr);
			CRGBColor&	operator=(const CRGBColor& clr);

			bool		operator==(const CRGBColor& clr) const;
			bool		operator!=(const CRGBColor& clr) const;

			UInt8		GetRed() const;
			UInt8		GetGreen() const;
			UInt8		GetBlue() const;

			void		SetRed(UInt8 red);
			void		SetGreen(UInt8 green);
			void		SetBlue(UInt8 blue);

			void		GetColor(UInt8& r, UInt8& g, UInt8& b) const;
			void		SetColor(UInt8 r, UInt8 g, UInt8 b);

			void		SetColor(ColorRef colorIndex);
			ColorRef	GetColorIndex(bool bMatchBlackBkgr = true) const;
		};
	}
}