39 #ifndef OME_XML_MODEL_PRIMITIVES_COLOR_H
40 #define OME_XML_MODEL_PRIMITIVES_COLOR_H
47 #pragma push_macro("min")
49 #pragma push_macro("max")
154 Color (
const std::string& str,
181 this->
value &= ~(0xFFU << 24U);
204 this->
value &= ~(0xffU << 16U);
227 this->
value &= ~(0xffU << 8U);
250 this->
value &= ~(0xffU << 0);
461 template<
class charT,
class traits>
462 inline std::basic_ostream<charT,traits>&
463 operator<< (std::basic_ostream<charT,traits>& os,
466 return os << static_cast<Color::signed_type>(color);
476 template<
class charT,
class traits>
477 inline std::basic_istream<charT,traits>&
493 #pragma pop_macro("min")
494 #pragma pop_macro("max")
497 #endif // OME_XML_MODEL_PRIMITIVES_COLOR_H
uint8_t component_type
The type of an individual color component (R, G, B, A).
Definition: Color.h:87
void setAlpha(component_type alpha)
Set the alpha component of this color.
Definition: Color.h:248
bool operator!=(const Color &lhs, const Color &rhs)
Compare two Color objects for non-equality.
Definition: Color.h:392
int32_t signed_type
The type of all components composed as a single RGBA value (signed).
Definition: Color.h:91
Color(signed_type value)
Construct a Color from a signed integer value.
Definition: Color.h:119
void setValue(composed_type value)
Set the integer value of this color from an unsigned integer.
Definition: Color.h:271
component_type getGreen() const
Get the green component of this color.
Definition: Color.h:191
void setValue(signed_type value)
Set the integer value of this color from a signed integer.
Definition: Color.h:282
Color(composed_type value)
Construct a Color from an unsigned integer value.
Definition: Color.h:108
Color(component_type r, component_type g, component_type b, component_type a=std::numeric_limits< component_type >::max())
Construct a Color from separate red, green, blue and alpha components.
Definition: Color.h:134
signed_type getValue() const
Get the signed integer value of this color.
Definition: Color.h:260
void setGreen(component_type green)
Set the green component of this color.
Definition: Color.h:202
bool operator==(const Color &lhs, const Color &rhs)
Compare two Color objects for equality.
Definition: Color.h:322
void setBlue(component_type blue)
Set the blue component of this color.
Definition: Color.h:225
uint32_t composed_type
The type of all components composed as a single RGBA value (unsigned).
Definition: Color.h:89
Color()
Construct a Color.
Definition: Color.h:97
component_type getBlue() const
Get the blue component of this color.
Definition: Color.h:214
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &is, Color &color)
Set Color from input stream.
Definition: Color.h:478
component_type getAlpha() const
Get the alpha component of this color.
Definition: Color.h:237
An RGBA color value.
Definition: Color.h:83
component_type getRed() const
Get the red component of this color.
Definition: Color.h:168
void setRed(component_type red)
Set the red component of this color.
Definition: Color.h:179
composed_type value
The color value.
Definition: Color.h:311