50 std::numeric_limits<rgba_pixel::component_type>::max());
52 white_pixel(std::numeric_limits<rgba_pixel::component_type>::max(),
53 std::numeric_limits<rgba_pixel::component_type>::max(),
54 std::numeric_limits<rgba_pixel::component_type>::max(),
55 std::numeric_limits<rgba_pixel::component_type>::max());
59 std::numeric_limits<rgba_pixel::component_type>::max(),
60 std::numeric_limits<rgba_pixel::component_type>::max());
62 green_pixel(0, std::numeric_limits<rgba_pixel::component_type>::max(),
63 0, std::numeric_limits<rgba_pixel::component_type>::max());
65 red_pixel(std::numeric_limits<rgba_pixel::component_type>::max(), 0, 0,
66 std::numeric_limits<rgba_pixel::component_type>::max());
69 yellow_pixel(std::numeric_limits<rgba_pixel::component_type>::max(),
70 std::numeric_limits<rgba_pixel::component_type>::max(), 0,
71 std::numeric_limits<rgba_pixel::component_type>::max());
73 magenta_pixel(std::numeric_limits<rgba_pixel::component_type>::max(),
75 std::numeric_limits<rgba_pixel::component_type>::max(),
76 std::numeric_limits<rgba_pixel::component_type>::max());
78 cyan_pixel(0, std::numeric_limits<rgba_pixel::component_type>::max(),
79 std::numeric_limits<rgba_pixel::component_type>::max(),
80 std::numeric_limits<rgba_pixel::component_type>::max());
124 std::istringstream iss(c);
130 if(!(iss >> std::hex >> color))
131 throw std::invalid_argument(c);
133 components.red = (color & 0xFF0000) >> (CHAR_BIT * 2);
134 components.green = (color & 0x00FF00) >> CHAR_BIT;
164 return !(*
this == that);
173 return !(*
this == that);
217 std::istringstream iss(c);
224 has_alpha = c.length() > 7;
227 has_alpha = c.length() > 6;
229 if(!((iss >> std::hex >> color) && (iss.rdbuf()->in_avail() == 0)))
230 throw std::invalid_argument(c);
233 components.alpha = (color & 0xFF000000) >> (CHAR_BIT * 3);
235 components.alpha = std::numeric_limits<component_type>::max();
237 components.red = (color & 0xFF0000) >> (CHAR_BIT * 2);
238 components.green = (color & 0x00FF00) >> CHAR_BIT;
rgba_pixel cyan_pixel
The cyan color.
rgba_pixel green_pixel
The green color.
rgba_pixel transparent_pixel
A transparent color.
rgba_pixel red_pixel
The red color.
rgba_pixel white_pixel
The white color.
rgba_pixel black_pixel
The black color.
rgba_pixel yellow_pixel
The yellow color.
rgba_pixel magenta_pixel
The magenta color.
rgba_pixel blue_pixel
The blue color.
Everything about image structures and processing.
This is the main namespace.
unsigned_integer_of_size< 32 >::type u_int_32
An unsigned integer on 32 bits.
Representation of a pixel in image processing.
struct claw::graphic::rgb_pixel::@217001364276256254254300335037210026331301104326 components
Component by component representation.
component_type red
Red component.
component_type blue
Blue component.
bool operator==(const rgb_pixel &that) const
Compare to a pixel.
unsigned char component_type
The type of the components of the color.
component_type green
Green component.
bool operator!=(const rgb_pixel &that) const
Compare to a pixel.
rgb_pixel()
Default constructor.
unsigned char component_type
The type of the components of the color.
rgba_pixel & operator=(const rgb_pixel &that)
Assignement operator.
component_type red
Red component.
component_type luminosity() const
Get the luminosity of the pixel.
struct claw::graphic::rgba_pixel::@243011111317154221214371326113376113353054140240::@062221254366262347154034240363361326201063204322 components
Component by component representation.
bool operator!=(const rgba_pixel &that) const
Tell if two pixels are different.
bool operator==(const rgba_pixel &that) const
Tell if two pixels are equal.
component_type green
Green component.
component_type blue
Blue component.
unsigned int pixel
Compressed representation.
rgba_pixel()
Default constructor.
Some classes for the raw manipulation of the base types.