#include <pixelbuf.h>
Public Member Functions |
|
PixelBufT (int width) | |
~PixelBufT () | |
T * | Ptr () |
T & | operator[] (int i) |
int | Fill (int start, int count, T color) |
PixelBufT | ( | int | width | ) | [inline] |
{ buf = (T *)MAX_calloc(width,sizeof(T)); this->width=width; };
~PixelBufT | ( | ) | [inline] |
{ if(buf) MAX_free(buf); };
T* Ptr | ( | ) | [inline] |
T& operator[] | ( | int | i | ) | [inline] |
{ return buf[i]; }
int Fill | ( | int | start, |
int | count, | ||
T | color | ||
) | [inline] |
{ int ix,jx=start+count; if(jx > width) // MAB - 07/15/03 - changed from >= return 0; for(ix=start; ix<jx; buf[ix++]=color); return 1; };