38 *
this =
parse(_value);
57 return ! (*
this == _value);
60 void Colour::set(
float _red,
float _green,
float _blue,
float _alpha)
75 std::ostringstream stream;
86 std::istringstream stream(_value.substr(1));
88 stream >> std::hex >> result;
91 return Colour( (
unsigned char)( result >> 16 ) / 256.0f, (
unsigned char)( result >> 8 ) / 256.0f, (
unsigned char)( result ) / 256.0f );
97 std::istringstream stream(_value);
113 _stream << _value.
red <<
" " << _value.
green <<
" " << _value.
blue <<
" " << _value.
alpha;
129 _value =
parse(value);
133 std::istringstream stream(value);
134 stream >> _value.
red;
141 _stream >> _value.
alpha;
bool operator!=(Colour const &_value) const
std::string print() const
static Colour parse(const std::string &_value)
static const Colour Green
static std::istream & operatorShiftRight(std::istream &_stream, Colour &_value)
void set(float _red, float _green, float _blue, float _alpha=1)
static const Colour White
static std::ostream & operatorShiftLeft(std::ostream &_stream, const Colour &_value)
bool operator==(Colour const &_value) const
static const Colour Black
Colour & operator=(Colour const &_value)