home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / bitmap1.zip / BITFILE.HPP < prev    next >
Text File  |  1993-12-02  |  1KB  |  43 lines

  1. // bitmap file class definition
  2.  
  3. // Copyright (C) Joel Barnum, Descriptor Systems, 1993
  4.  
  5. #ifndef _BITMAPFILE_HPP_
  6. #define _BITMAPFILE_HPP_
  7.  
  8. typedef enum IMAGETYPE { BITMAP, ICON, POINTER, UNKNOWN, ERROR };
  9.  
  10. class    bitmapfile
  11. {
  12. private:
  13.     PSZ                    pszFname;    // bitmap file name
  14.     IMAGETYPE            type;        // bitmap, icon or pointer
  15.     PBITMAPINFO2        pbmp2;        // bitmap info pointer
  16.     PBYTE                pbits;        // bitmap bits pointer
  17.     PBYTE                pfile;        // file data
  18.  
  19.     PRGB2                pcolor2x;    // 2.x style color table pointer
  20.  
  21.  
  22. public:
  23. //********** CONSTRUCTORS *********************************
  24.     bitmapfile ( PSZ pszFnameIn );
  25.  
  26. //********** DESTRUCTOR ***********************************
  27.     ~bitmapfile ( void );
  28.  
  29. //********** GET/SET MEMBER FUNCTIONS *********************
  30.  
  31.     void            getfname ( PSZ pszOut );
  32.     IMAGETYPE        gettype  ( void );
  33.  
  34.     int            getbitsperpel ( void );    // number of bits/pel
  35.     int            getwidth  ( void );        // bitmap width
  36.     int            getheight (    void );        // bitmap height
  37.     PRGB2        getcolortable ( void );    // bitmap color table
  38.     PBYTE        getbitmapbits ( void );    // bitmap data
  39.     PBITMAPINFO2 getbitmapinfo ( void ); // bitmap info structure
  40.  
  41. };
  42. #endif
  43.