const Point& dst);
void (Surface::*copyTranspAddr)(Surface& dstSurface, const Rect& srcRect
const Point& dst, int transpColor);
public:
int bytesPerScanLine; // # of bytes per scan line PixelFormat format; int width; int height;
void * data; // image data
RGB * palette; // currently used palette
Rect clipRect; // area to clip
Font * curFont;
int color; // current draw color
int backColor; //current background color
int rasterOp; // current raster operation
Point org; // drawing offset 8-bit (256 colors mode) functions
int getPixe!8 (int x, int y );
void drawPixe!8 (int x, int y, int color);
void drawLine8 (int x1, int y1, int x2, int y2 );
void drawChar8 (int x, int y, int ch );
void drawString8 (int x, int y, const char * str);
void drawBar8 (int x1, int y1, int x2, int y2 );
void copy8 ( Surface& dstSurface, const Rect& srcRect,
const Point& dst); void copyTransp8 ( Surface& dstSurface, const Rect& srcRect,
const Point& dst, int transpColor);
//15/16bit functions
int getPixel16 (intx, inty);
void drawPixel16 (int x, int y, int color);
void drawLinel6 (int x1, int y1, int x2, int y2 );
void drawChar16 (intx, inty, int ch);
void drawString16 (int x, int y, const char * str);
void drawBarl6 (int x1, int y1, int x2, int y2 );
void copy 16 ( Surface& dstSurface, const Rect& srcRect,
const Point& dst); void copyTransp16 ( Surface& dstSurface, const Rect& srcRect,
const Point& dst, int transpColor);
4. Работа с основными графическими устройствам
public:
Surface (): Object () {}
Surface (int w, int h, const PixeiFormat& fmt);
virtual -Surface () {
if ( data != NULL )
free {data);
if ( palette != NULL )
delete palette;
virtual char * getClassName () const
return "Surface";
virtual int isOk () const
return data != NULL && width > 0 && height > 0;
virtual int put ( Store * ) const; virtual int get ( Store *);