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 21 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 36 of file colors.

References shift().

Here is the call graph for this function:

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

Definition at line 81 of file colors.

References shift(), and size().

Here is the call graph for this function:

◆ 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 63 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 55 of file colors.

References Color_component().

Here is the call graph for this function:

◆ 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 73 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 49 of file colors.

Referenced by Color_component(), and dump().

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 43 of file colors.

Referenced by dump().

Here is the caller graph for this function:

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