Lines Matching full:rgba
38 class RGBA
57 RGBA (void) { m_value = 0; }
59 RGBA (int r, int g, int b, int a)
68 explicit RGBA (deUint32 val)
73 explicit RGBA (const Vec4& v);
85 bool isBelowThreshold (RGBA thr) const { return (getRed() <= thr.getRed()) && (getGreen() <= thr.getGreen()) && (getBlue() <= thr.getBlue()) && (getAlpha() <= thr.getAlpha()); }
87 static RGBA fromBytes (const deUint8* bytes) { return RGBA(bytes[0], bytes[1], bytes[2], bytes[3]); }
92 bool operator== (const RGBA& v) const { return (m_value == v.m_value); }
93 bool operator!= (const RGBA& v) const { return (m_value != v.m_value); }
96 static inline const RGBA red (void) { return RGBA(0xFF, 0x0, 0x0, 0xFF); }
97 static inline const RGBA green (void) { return RGBA(0x0, 0xFF, 0x0, 0xFF); }
98 static inline const RGBA blue (void) { return RGBA(0x0, 0x0, 0xFF, 0xFF); }
99 static inline const RGBA gray (void) { return RGBA(0x80, 0x80, 0x80, 0xFF); }
100 static inline const RGBA white (void) { return RGBA(0xFF, 0xFF, 0xFF, 0xFF); }
101 static inline const RGBA black (void) { return RGBA(0x0, 0x0, 0x0, 0xFF); }
107 inline bool compareEqualMasked (RGBA a, RGBA b, deUint32 cmpMask)
109 RGBA mask((cmpMask&RGBA::RED_MASK)?0xFF:0, (cmpMask&RGBA::GREEN_MASK)?0xFF:0, (cmpMask&RGBA::BLUE_MASK)?0xFF:0, (cmpMask&RGBA::ALPHA_MASK)?0xFF:0);
116 inline RGBA computeAbsDiff (RGBA a, RGBA b)
118 return RGBA(
125 inline RGBA blend (RGBA a, RGBA b, float t)
130 return RGBA(
137 inline bool compareThreshold (RGBA a, RGBA b, RGBA threshold)
143 inline RGBA max (RGBA a, RGBA b)
145 return RGBA(deMax32(a.getRed(), b.getRed()),
151 RGBA computeAbsDiffMasked (RGBA a, RGBA b, deUint32 cmpMask);
152 bool compareThresholdMasked (RGBA a, RGBA b, RGBA threshold, deUint32 cmpMask);
156 inline RGBA operator+ (const RGBA& a, const RGBA& b)
158 return RGBA(deClamp32(a.getRed() + b.getRed(), 0, 255),
164 inline RGBA operator- (const RGBA& a, const RGBA& b)
166 return RGBA(deClamp32(a.getRed() - b.getRed(), 0, 255),
172 inline RGBA operator* (const RGBA& a, const int b)
174 return RGBA(deClamp32(a.getRed() * b, 0, 255),
180 inline std::ostream& operator<< (std::ostream& stream, RGBA c)
182 return stream << "RGBA(" << c.getRed() << ", " << c.getGreen() << ", " << c.getBlue() << ", " << c.getAlpha() << ")";