Syndicate::Data::Block< T, depth, alpha > Class Template Reference

#include <Syndicate/Data/Block.h>

List of all members.

Public Member Functions

template<typename TColors>
void pixel (unsigned i, TColors *pix, const TColors *colors=Colors< TColors >::_default) const

Static Public Attributes

static const unsigned _width = sizeof(T) * 8

Private Attributes

_bits [alpha+depth]


Detailed Description

template<typename T, unsigned depth, unsigned alpha>
class Syndicate::Data::Block< T, depth, alpha >

It is a block of pixels. There are many way to pack the data that we can specify with templates parameters.

If there is an alpha channel the data are packed like this : | alpha | bit0 | bit1 | bit2 | bit3 |


Member Function Documentation

template<typename T, unsigned depth, unsigned alpha>
template<typename TColors>
void Syndicate::Data::Block< T, depth, alpha >::pixel ( unsigned  i,
TColors *  pix,
const TColors *  colors = Colors< TColors >::_default 
) const [inline]

Fill the pixel byte with the color of the ith pixel of this block.

Parameters:
[in] i the index of the pixel in the range [0;_width]
[out] pix the pointer to the byte where the color must be wrote


Member Data Documentation

template<typename T, unsigned depth, unsigned alpha>
T Syndicate::Data::Block< T, depth, alpha >::_bits[alpha+depth] [private]

template<typename T, unsigned depth, unsigned alpha>
const unsigned Syndicate::Data::Block< T, depth, alpha >::_width = sizeof(T) * 8 [static]

The width in pixels


The documentation for this class was generated from the following file:
Generated on Sun Sep 30 13:08:36 2007 for libSyndicate by  doxygen 1.5.2