RGB pixel.
More...
#include <pixel.hpp>
List of all members.
Public Types |
|
typedef unsigned char | component_type |
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.
|
| component_type green |
| | Green component.
|
| component_type blue |
| | Blue component.
|
| } | components |
Detailed Description
RGB pixel.
Definition at line 44 of file pixel.hpp.
Constructor & Destructor Documentation
| claw::graphic::rgb_pixel::rgb_pixel |
( |
component_type |
r, |
|
|
component_type |
g, |
|
|
component_type |
b |
|
) |
| |
Constructor.
- Parameters:
-
| r | The value of the red field. |
| g | The value of the green field. |
| b | The value of the blue field. |
Definition at line 96 of file pixel.cpp.
| claw::graphic::rgb_pixel::rgb_pixel |
( |
const rgba_pixel & |
p | ) |
|
Constructor.
- Parameters:
-
Definition at line 108 of file pixel.cpp.
| claw::graphic::rgb_pixel::rgb_pixel |
( |
const std::string & |
c | ) |
[explicit] |
Constructor from a color name or code.
- Parameters:
-
Definition at line 120 of file pixel.cpp.
Member Function Documentation
| bool claw::graphic::rgb_pixel::operator!= |
( |
const rgb_pixel & |
that | ) |
const |
Compare to a pixel.
- Parameters:
-
| that | The pixel to compare to. |
Definition at line 163 of file pixel.cpp.
| bool claw::graphic::rgb_pixel::operator!= |
( |
const rgba_pixel & |
that | ) |
const |
Compare to a pixel.
- Parameters:
-
| that | The pixel to compare to. |
Definition at line 173 of file pixel.cpp.
| bool claw::graphic::rgb_pixel::operator== |
( |
const rgb_pixel & |
that | ) |
const |
Compare to a pixel.
- Parameters:
-
| that | The pixel to compare to. |
Definition at line 141 of file pixel.cpp.
References blue, green, and red.
| bool claw::graphic::rgb_pixel::operator== |
( |
const rgba_pixel & |
that | ) |
const |
Compare to a pixel.
- Parameters:
-
| that | The pixel to compare to. |
Definition at line 153 of file pixel.cpp.
The documentation for this struct was generated from the following files: