StuBS
Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE > Class Template Reference

Pixel component. More...

#include <framebuffer.h>

Public Member Functions

 PixelComponent (unsigned value)
 Constructor.
 
template<unsigned BITS>
void set (const struct SpritePixelComponent< BITS > &other)
 Assign component value (from a SpritePixelComponent with different bit mask size)
 
void set (const struct SpritePixelComponent< SIZE > &other)
 Assign component value (from a SpritePixelComponent with same bit mask size)
 
void set (unsigned value)
 Assign component value (from an integer)
 
template<unsigned BITS>
void blend (const struct SpritePixelComponent< BITS > &other, const struct SpritePixelComponent< BITS > &alpha)
 Alpha blend component value (from a SpritePixelComponent with different bit mask size)
 
void blend (const struct SpritePixelComponent< SIZE > &other, const struct SpritePixelComponent< SIZE > &alpha)
 Alpha blend component value (from a SpritePixelComponent with same bit mask size)
 

Private Attributes

unsigned __pad0__: OFFSET
 Reserved space for offset.
 
unsigned value: SIZE
 Value.
 

Detailed Description

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
class Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >

Pixel component.

Template Parameters
OFFSETBit position of mask
BITSSize of mask

Constructor & Destructor Documentation

◆ PixelComponent()

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >::PixelComponent ( unsigned  value)
inlineexplicit

Constructor.

Parameters
valueInitial component value

Member Function Documentation

◆ blend() [1/2]

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
template<unsigned BITS>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >::blend ( const struct SpritePixelComponent< BITS > &  other,
const struct SpritePixelComponent< BITS > &  alpha 
)
inline

Alpha blend component value (from a SpritePixelComponent with different bit mask size)

Template Parameters
BITSSize of bit mask
Parameters
othercomponent value to blend
alphatransparency used for blending

◆ blend() [2/2]

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >::blend ( const struct SpritePixelComponent< SIZE > &  other,
const struct SpritePixelComponent< SIZE > &  alpha 
)
inline

Alpha blend component value (from a SpritePixelComponent with same bit mask size)

Parameters
othercomponent value to blend
alphatransparency used for blending

◆ set() [1/3]

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
template<unsigned BITS>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >::set ( const struct SpritePixelComponent< BITS > &  other)
inline

Assign component value (from a SpritePixelComponent with different bit mask size)

Template Parameters
BITSSize of bit mask
Parameters
othernew component value

◆ set() [2/3]

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >::set ( const struct SpritePixelComponent< SIZE > &  other)
inline

Assign component value (from a SpritePixelComponent with same bit mask size)

Parameters
othernew component value

◆ set() [3/3]

template<unsigned char COLORDEPTH, unsigned char OFFSET_RED, unsigned char OFFSET_GREEN, unsigned char OFFSET_BLUE, unsigned char BITS_RED, unsigned char BITS_GREEN, unsigned char BITS_BLUE>
template<unsigned OFFSET, unsigned SIZE>
void Framebuffer< COLORDEPTH, OFFSET_RED, OFFSET_GREEN, OFFSET_BLUE, BITS_RED, BITS_GREEN, BITS_BLUE >::PixelComponent< OFFSET, SIZE >::set ( unsigned  value)
inline

Assign component value (from an integer)

Parameters
valuenew component value

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