7 #include <TbPixelCaps.h> 23 Index = Red = Green = Blue = Alpha = 0;
50 TbColour(UBYTE r, UBYTE g, UBYTE b)
55 TbColour(UBYTE r, UBYTE g, UBYTE b, UBYTE Pal) : Red(r), Green(g), Blue(b), Index(Pal), Alpha(0xff)
61 inline void Set(UBYTE r, UBYTE g, UBYTE b, UBYTE a = 0xff);
64 inline ULONG Get32bitValue()
const;
67 inline ULONG GetFormattedValue(
const TbPixelCaps& pixcaps)
const;
68 inline ULONG GetFormattedValue(
const TbPixFormat& pixformat)
const;
89 inline void TbColour::Set(UBYTE r, UBYTE g, UBYTE b, UBYTE a)
101 inline ULONG TbColour::Get32bitValue()
const 103 ULONG RetVal = (Red << 16) | (Green << 8) | (Blue) | (Alpha << 24);
108 inline ULONG TbColour::GetFormattedValue(
const TbPixelCaps& pixcaps)
const 110 return ((((Packed) >> pixcaps.mRed.ShiftRight) << pixcaps.mRed.ShiftLeft) & pixcaps.mRed.Mask)
111 | ((((Packed) >> pixcaps.mGreen.ShiftRight) << pixcaps.mGreen.ShiftLeft) & pixcaps.mGreen.Mask)
112 | ((((Packed) >> pixcaps.mBlue.ShiftRight) << pixcaps.mBlue.ShiftLeft) & pixcaps.mBlue.Mask)
113 | ((((Packed) >> pixcaps.mAlpha.ShiftRight) << pixcaps.mAlpha.ShiftLeft) & pixcaps.mAlpha.Mask);
117 inline ULONG TbColour::GetFormattedValue(
const TbPixFormat& pixformat)
const 120 pixcaps.Set(pixformat);
121 return GetFormattedValue(pixcaps);
LB_API_VAR_IMPORT TbPalette _lbGlobalPalette