![]() |
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. |
Definition at line 212 of file colors.
References a(), b(), g(), and r().
|
inlineexplicit |
Convenience constructor.
vbi | Suitable information structure. Convenience constructor to create the pixel info from a VESA Framebuffer Info. |
Definition at line 224 of file colors.
References bits_per_pixel().
|
inline |
Return the alpha color compoment of the pixel.
Definition at line 123 of file colors.
Referenced by dump(), and Pixel_info().
|
inline |
|
inline |
Return the blue color compoment of the pixel.
Definition at line 117 of file colors.
Referenced by dump(), and Pixel_info().
|
inline |
|
inline |
Number of bits of the pixel.
Definition at line 156 of file colors.
Referenced by Pixel_info().
|
inline |
|
inline |
|
inline |
|
inline |
Return the green color compoment of the pixel.
Definition at line 111 of file colors.
Referenced by dump(), and Pixel_info().
|
inline |
|
inline |
|
inline |
Compare for complete equality of the color space.
o | A Pixel_info to compare to. |
Definition at line 236 of file colors.
References Pixel_info().
|
inline |
|
inline |
Return the red color compoment of the pixel.
Definition at line 105 of file colors.
Referenced by dump(), and Pixel_info().
|
inline |