Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

blitter Class Reference

class for handling blitting on a frame buffer More...

#include <blitter.h>

Collaboration diagram for blitter:

Collaboration graph
[legend]
List of all members.

Public Methods

 blitter (char *buffer, const point &dstsize, const rect &src) throw ()
 constructor

virtual ~blitter ()
void blit (char *, unsigned int) throw (std::exception)
 This method allows to blit directly some data from a buffer.

void blit (chunck &, unsigned int) throw (std::exception)
 This method allows to blit directly some data from a chunck.

void put (char) throw (std::exception)
 This method allows to blit one byte.

void put (char, unsigned int) throw (std::exception)
 This method allows to blit one byte several times.

void advance (int=1, int=0) throw ()
 This method allows to advance the current position in the blitter.

void advance_block (int=1, int=0) throw ()
 This method allows to advance the current position in the blitter in terms of blocks.

void put_block (unsigned int) throw (std::exception)
 This method allows to blit one block from an int value repeated 4 time.

void put_block (chunck &) throw (std::exception)
 This method allows to blit one block directly read from a chunck.

void put_block (unsigned char *) throw (std::exception)
 This method allows to blit one block directly from a buffer.

void put_block (unsigned int, unsigned int, unsigned int, unsigned int) throw (std::exception)
 This method allows to blit one block from a 4 int value.

void block_copy (int)
 This method allows to copy one block from another separated by the given offset.


Private Attributes

char * _ptr
 This is the pointer to the start of the frame buffer.

char * _offset
 This is the current pointer in the frame buffer.

point _clip
 This is the size of the frame buffer (width/height).

rect _src
 This is the size and position of the destination rectangle.

point _cur
 This is the current position in the destination rectangle.

bool _outside
 flag that is set to true when the blitter reach the end of the destination rectangle


Detailed Description

class for handling blitting on a frame buffer

This class allows to perform secure blitting to a frame buffer in several ways. This means that clipping is performed, so that only the part that you want to modify can be modified.

Definition at line 46 of file blitter.h.


Constructor & Destructor Documentation

blitter::blitter char *    buffer,
const point   dstsize,
const rect   src
throw ()
 

constructor

Parameters:
buffer  the frame buffer to blit to
dstsize  the size of the frame buffer
src  the rectangle to blit to

Definition at line 31 of file blitter.cpp.

blitter::~blitter   [virtual]
 

Definition at line 50 of file blitter.cpp.


Member Function Documentation

void blitter::advance int    = 1,
int    = 0
throw ()
 

This method allows to advance the current position in the blitter.

Definition at line 58 of file blitter.cpp.

Referenced by codec37_decoder::proc1(), codec37_decoder::proc3_with_fdfe(), codec37_decoder::proc3_without_fdfe(), and codec37_decoder::proc4().

void blitter::advance_block int    = 1,
int    = 0
throw ()
 

This method allows to advance the current position in the blitter in terms of blocks.

Definition at line 75 of file blitter.cpp.

Referenced by block_copy().

void blitter::blit chunck  ,
unsigned    int
throw (std::exception)
 

This method allows to blit directly some data from a chunck.

Definition at line 131 of file blitter.cpp.

void blitter::blit char *   ,
unsigned    int
throw (std::exception)
 

This method allows to blit directly some data from a buffer.

Definition at line 115 of file blitter.cpp.

Referenced by codec37_decoder::decode(), and codec37_decoder::proc2().

void blitter::block_copy int   
 

This method allows to copy one block from another separated by the given offset.

Definition at line 220 of file blitter.cpp.

References _clip, _cur, _offset, _src, advance_block(), rect::bottom(), point::get_x(), point::get_y(), and rect::right().

Referenced by codec37_decoder::proc1(), codec37_decoder::proc3_with_fdfe(), codec37_decoder::proc3_without_fdfe(), and codec37_decoder::proc4().

void blitter::put char   ,
unsigned    int
throw (std::exception)
 

This method allows to blit one byte several times.

Definition at line 100 of file blitter.cpp.

void blitter::put char    throw (std::exception)
 

This method allows to blit one byte.

Definition at line 90 of file blitter.cpp.

Referenced by codec37_decoder::proc2().

void blitter::put_block unsigned    int,
unsigned    int,
unsigned    int,
unsigned    int
throw (std::exception)
 

This method allows to blit one block from a 4 int value.

Definition at line 164 of file blitter.cpp.

void blitter::put_block unsigned char *    throw (std::exception)
 

This method allows to blit one block directly from a buffer.

Definition at line 182 of file blitter.cpp.

void blitter::put_block chunck   throw (std::exception)
 

This method allows to blit one block directly read from a chunck.

Definition at line 201 of file blitter.cpp.

void blitter::put_block unsigned    int throw (std::exception)
 

This method allows to blit one block from an int value repeated 4 time.

Definition at line 146 of file blitter.cpp.

Referenced by codec37_decoder::proc1(), codec37_decoder::proc3_with_fdfe(), codec37_decoder::proc3_without_fdfe(), and codec37_decoder::proc4().


Member Data Documentation

point blitter::_clip [private]
 

This is the size of the frame buffer (width/height).

Definition at line 50 of file blitter.h.

Referenced by block_copy().

point blitter::_cur [private]
 

This is the current position in the destination rectangle.

Definition at line 52 of file blitter.h.

Referenced by block_copy().

char* blitter::_offset [private]
 

This is the current pointer in the frame buffer.

Definition at line 49 of file blitter.h.

Referenced by block_copy().

bool blitter::_outside [private]
 

flag that is set to true when the blitter reach the end of the destination rectangle

Definition at line 53 of file blitter.h.

char* blitter::_ptr [private]
 

This is the pointer to the start of the frame buffer.

Definition at line 48 of file blitter.h.

rect blitter::_src [private]
 

This is the size and position of the destination rectangle.

Definition at line 51 of file blitter.h.

Referenced by block_copy().


The documentation for this class was generated from the following files:
Generated on Fri Aug 9 22:54:30 2002 for san_player by doxygen1.2.16