![]() |
L4Re Operating System Framework
Interface and Usage Documentation
|
Pixel information. More...
#include <colors>
Public Member Functions | |
Color_component const & | r () const |
Return the red color compoment of the pixel. | |
Color_component const & | g () const |
Return the green color compoment of the pixel. | |
Color_component const & | b () const |
Return the blue color compoment of the pixel. | |
Color_component const & | a () const |
Return the alpha color compoment of the pixel. | |
Color_component const | padding () const |
Compute the padding pseudo component. | |
unsigned char | bytes_per_pixel () const |
Query size of pixel in bytes. | |
unsigned char | bits_per_pixel () const |
Number of bits of the pixel. | |
bool | has_alpha () const |
Return whether the pixel has an alpha channel. | |
void | r (Color_component const &c) |
Set the red color component of the pixel. | |
void | g (Color_component const &c) |
Set the green color component of the pixel. | |
void | b (Color_component const &c) |
Set the blue color component of the pixel. | |
void | a (Color_component const &c) |
Set the alpha color component of the pixel. | |
void | bytes_per_pixel (unsigned char bpp) |
Set the size of the pixel in bytes. | |
Pixel_info () | |
Constructor. | |
Pixel_info (unsigned char bpp, char r, char rs, char g, char gs, char b, char bs, char a=0, char as=0) | |
Constructor. | |
template<typename VBI > | |
Pixel_info (VBI const *vbi) | |
Convenience constructor. | |
bool | operator== (Pixel_info const &o) const |
Compare for complete equality of the color space. | |
template<typename OUT > | |
void | dump (OUT &s) const |
Dump information on the pixel to a stream. | |
Pixel information.
This class wraps the information on a pixel, such as the size and position of each color component in the pixel.
|
inline |
Constructor.
bpp | Size of pixel in bytes. |
r | Red component size. |
rs | Red component shift. |
g | Green component size. |
gs | Green component shift. |
b | Blue component size. |
bs | Blue component shift. |
a | Alpha component size, defaults to 0. |
as | Alpha component shift, defaults to 0. |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Number of bits of the pixel.
Definition at line 156 of file colors.
References L4Re::Video::Color_component::size().
|
inline |
|
inline |
|
inline |
Dump information on the pixel to a stream.
s | Stream |
Definition at line 246 of file colors.
Referenced by L4Re::Video::View::Info::dump().
|
inline |
|
inline |
|
inline |
Return whether the pixel has an alpha channel.
Definition at line 163 of file colors.
References L4Re::Video::Color_component::size().
|
inline |
Compare for complete equality of the color space.
o | A Pixel_info to compare to. |
|
inline |
Compute the padding pseudo component.
The padding pseudo component represents the tailing bits that are reserved in RGB32 and similar pixel formats.
Definition at line 131 of file colors.
References L4Re::Video::Color_component::shift(), and L4Re::Video::Color_component::size().
|
inline |
|
inline |