home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2002 May / Game.EXE_05_2002.iso / Alawar / Lib / Format / PictureFormat.h next >
Encoding:
C/C++ Source or Header  |  2002-04-03  |  401 b   |  24 lines

  1. #ifndef PICTUREFORMAT_H
  2. #define PICTUREFORMAT_H
  3.  
  4. class Color;
  5.  
  6. class PictureFormat
  7. {
  8. public:
  9.     PictureFormat()
  10.     {}
  11.     virtual ~PictureFormat()
  12.     {}
  13.     virtual int width()const =0;
  14.     virtual int height()const =0;
  15.     virtual int alpha_bits()const =0;
  16.     virtual const Color * colors()const =0;
  17.     
  18.     int get_shift(int x, int y )const
  19.     {
  20.         return x + y * width();
  21.     }
  22. };
  23.  
  24. #endif //PICTUREFORMAT_H