Boost.UI
User Interface Boost library
|
Go to the documentation of this file.
8 #ifndef BOOST_UI_COLOR_IO_HPP
9 #define BOOST_UI_COLOR_IO_HPP
13 #ifdef BOOST_HAS_PRAGMA_ONCE
27 template <
class CharT,
class Traits>
28 std::basic_ostream<CharT, Traits>&
31 const bool is_transparent = c.
alpha255() != 255;
32 os <<
'r' <<
'g' <<
'b';
35 os << '(' << static_cast<int>(c.
red255());
36 os << ',' << static_cast<int>(c.
green255());
37 os << ',' << static_cast<int>(c.
blue255());
39 os << ',' << static_cast<int>(c.
alpha255());
47 #endif // BOOST_UI_COLOR_IO_HPP
channel255_type alpha255() const noexcept
Returns color value in [0, 255] range.
Definition: color.hpp:53
channel255_type green255() const noexcept
Returns color value in [0, 255] range.
Definition: color.hpp:51
Boost C++ libraries namespace.
Definition: window.hpp:19
std::basic_ostream< char, Traits > & operator<<(std::basic_ostream< char, Traits > &os, const uistring &str)
Writes string into the stream.
Definition: string_io.hpp:31
channel255_type red255() const noexcept
Returns color value in [0, 255] range.
Definition: color.hpp:50
Color class.
Definition: color.hpp:31
channel255_type blue255() const noexcept
Returns color value in [0, 255] range.
Definition: color.hpp:52