|
Claw 1.7.3
|
RGB pixel. More...
#include <pixel.hpp>
Public Types | |
| typedef unsigned char | component_type |
| The type of the components of the color. | |
Public Member Functions | |
| rgb_pixel () | |
| Default constructor. | |
| rgb_pixel (component_type r, component_type g, component_type b) | |
| Constructor. | |
| rgb_pixel (const rgba_pixel &p) | |
| Constructor. | |
| rgb_pixel (const std::string &c) | |
| Constructor from a color name or code. | |
| bool | operator== (const rgb_pixel &that) const |
| Compare to a pixel. | |
| bool | operator== (const rgba_pixel &that) const |
| Compare to a pixel. | |
| bool | operator!= (const rgb_pixel &that) const |
| Compare to a pixel. | |
| bool | operator!= (const rgba_pixel &that) const |
| Compare to a pixel. | |
Public Attributes | ||
| struct { | ||
| component_type red | ||
| Red component. More... | ||
| component_type green | ||
| Green component. More... | ||
| component_type blue | ||
| Blue component. More... | ||
| } | components | |
| Component by component representation. | ||
| typedef unsigned char claw::graphic::rgb_pixel::component_type |
| claw::graphic::rgb_pixel::rgb_pixel | ( | ) |
| claw::graphic::rgb_pixel::rgb_pixel | ( | component_type | r, |
| component_type | g, | ||
| component_type | b | ||
| ) |
| claw::graphic::rgb_pixel::rgb_pixel | ( | const rgba_pixel & | p | ) |
Constructor.
| p | An RGBA pixel. |
Definition at line 113 of file pixel.cpp.
References claw::graphic::rgba_pixel::blue, claw::graphic::rgba_pixel::components, claw::graphic::rgba_pixel::green, and claw::graphic::rgba_pixel::red.
|
explicit |
| bool claw::graphic::rgb_pixel::operator!= | ( | const rgb_pixel & | that | ) | const |
| bool claw::graphic::rgb_pixel::operator!= | ( | const rgba_pixel & | that | ) | const |
| bool claw::graphic::rgb_pixel::operator== | ( | const rgb_pixel & | that | ) | const |
| bool claw::graphic::rgb_pixel::operator== | ( | const rgba_pixel & | that | ) | const |
| component_type claw::graphic::rgb_pixel::blue |
Blue component.
Definition at line 59 of file pixel.hpp.
Referenced by claw::graphic::rgba_pixel::operator=(), operator==(), and claw::graphic::rgba_pixel::rgba_pixel().
| component_type claw::graphic::rgb_pixel::green |
Green component.
Definition at line 56 of file pixel.hpp.
Referenced by claw::graphic::rgba_pixel::operator=(), operator==(), and claw::graphic::rgba_pixel::rgba_pixel().
| component_type claw::graphic::rgb_pixel::red |
Red component.
Definition at line 53 of file pixel.hpp.
Referenced by claw::graphic::rgba_pixel::operator=(), operator==(), and claw::graphic::rgba_pixel::rgba_pixel().