L4Re Operating System Framework – Interface and Usage Documentation
Loading...
Searching...
No Matches
L4Re::Video::Color_component Class Reference

A color component. More...

#include <colors>

+ Collaboration diagram for L4Re::Video::Color_component:

Public Member Functions

 Color_component ()
 Constructor.
 
 Color_component (unsigned char bits, unsigned char shift)
 Constructor.
 
unsigned char size () const
 Return the number of bits used by the component.
 
unsigned char shift () const
 Return the position of the component in the pixel.
 
bool operator== (Color_component const &o) const
 Compare for equality.
 
int get (unsigned long v) const
 Get component from value (normalized to 16bits).
 
long unsigned set (int v) const
 Transform 16bit normalized value to the component in the color space.
 
template<typename OUT >
void dump (OUT &s) const
 Dump information on the view information to a stream.
 

Detailed Description

A color component.

Definition at line 32 of file colors.

Constructor & Destructor Documentation

◆ Color_component()

L4Re::Video::Color_component::Color_component ( unsigned char  bits,
unsigned char  shift 
)
inline

Constructor.

Parameters
bitsNumber of bits used by the component
shiftPosition in bits of the component in the pixel

Definition at line 47 of file colors.

Member Function Documentation

◆ dump()

template<typename OUT >
void L4Re::Video::Color_component::dump ( OUT &  s) const
inline

Dump information on the view information to a stream.

Parameters
sStream
Returns
The stream

Definition at line 94 of file colors.

◆ get()

int L4Re::Video::Color_component::get ( unsigned long  v) const
inline

Get component from value (normalized to 16bits).

Parameters
vValue
Returns
Converted value

Definition at line 74 of file colors.

◆ operator==()

bool L4Re::Video::Color_component::operator== ( Color_component const &  o) const
inline

Compare for equality.

Returns
True if the same components are described, false if not.

Definition at line 66 of file colors.

◆ set()

long unsigned L4Re::Video::Color_component::set ( int  v) const
inline

Transform 16bit normalized value to the component in the color space.

Parameters
vValue return Converted value.

Definition at line 85 of file colors.

◆ shift()

unsigned char L4Re::Video::Color_component::shift ( ) const
inline

Return the position of the component in the pixel.

Returns
Position in bits of the component in the pixel

Definition at line 60 of file colors.

Referenced by L4Re::Video::Pixel_info::padding().

+ Here is the caller graph for this function:

◆ size()

unsigned char L4Re::Video::Color_component::size ( ) const
inline

Return the number of bits used by the component.

Returns
Number of bits used by the component

Definition at line 54 of file colors.

Referenced by L4Re::Video::Pixel_info::bits_per_pixel(), L4Re::Video::Pixel_info::has_alpha(), and L4Re::Video::Pixel_info::padding().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: