CrossFramework Library
|
00001 00006 #if defined(XBASE_INCLUDED_COLOR4U8_HPP) 00007 #else 00008 #define XBASE_INCLUDED_COLOR4U8_HPP 00009 00010 //------------------------------------------------------------ 00011 #include <XBase/BuiltInTypes.hpp> 00012 #include <XBase/ShortString.hpp> 00013 00014 //------------------------------------------------------------ 00015 namespace XBase { 00016 struct Color3bPOD; 00017 struct Color4POD; 00018 } 00019 00020 //------------------------------------------------------------ 00021 namespace XBase { 00023 00024 00025 struct Color4bPOD 00026 { 00027 //============================================================ 00029 00030 static const Color4bPOD Zero(); 00031 static const Color4bPOD One(); 00032 static const Color4bPOD UnitR(); 00033 static const Color4bPOD UnitG(); 00034 static const Color4bPOD UnitB(); 00035 static const Color4bPOD UnitA(); 00036 00037 00038 //============================================================ 00040 00041 u8 r; 00042 u8 g; 00043 u8 b; 00044 u8 a; 00045 00046 00047 //============================================================ 00049 00050 const Color3bPOD toRGB()const; 00051 const Color3bPOD toRRR()const; 00052 const Color3bPOD toGGG()const; 00053 const Color3bPOD toBBB()const; 00054 const Color3bPOD toAAA()const; 00055 const Color4bPOD toRRRR()const; 00056 const Color4bPOD toGGGG()const; 00057 const Color4bPOD toBBBB()const; 00058 const Color4bPOD toAAAA()const; 00059 const Color4POD toRGBAf()const; 00061 00062 //============================================================ 00064 00065 00066 const ShortString toShortString()const; 00068 }; 00069 00071 class Color4b : public Color4bPOD 00072 { 00073 public: 00074 //============================================================ 00076 00077 Color4b(); 00078 Color4b( const Color4bPOD& aRGBA ); 00079 Color4b( u8 aR , u8 aG , u8 aB , u8 aA ); 00080 00081 }; 00083 } 00084 //------------------------------------------------------------ 00085 #endif 00086 // EOF