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

  1. // bitmap class definition
  2.  
  3. // Copyright (C) Joel Barnum, Descriptor Systems, 1993
  4.  
  5. #ifndef _BITMAP_HPP_
  6. #define _BITMAP_HPP_
  7.  
  8. class bitmap
  9. {
  10. private:
  11.     ULONG        cx;                // width
  12.     ULONG        cy;                // height
  13.     HBITMAP        hbm;            // bitmap handle
  14.     ULONG        ulbpp;            // bits per pel
  15.     LONG        lRop;            // current raster operation
  16.     ULONG        cColors;        // number of colors
  17.     PRGB2        aRGB2Colors;    // color table pointer
  18.     HPS            hps;            // bitmap presentation space
  19.     HDC            hdc;            // bitmap device context
  20.     RECTL        rcl;            // amount of bitmap to draw
  21.  
  22.     void        initialize ( HAB hab );    // called by constructors
  23.  
  24.  
  25. public:
  26.  
  27. //*********** CONSTRUCTORS **************************************
  28.  
  29.   // create a bitmap from a resource file
  30.     bitmap ( HDC hdc, HMODULE hmod, ULONG id );
  31.  
  32.   // create a bitmap from bytes in memory
  33.       bitmap ( HDC hdc, ULONG cxIn, ULONG cyIn, ULONG ulbppIn
  34.            , PRGB2 pColorTable, PBYTE ab );
  35.  
  36.   // create a bitmap from bytes in memory, given a
  37.   // PM bitmap info structure
  38.       bitmap ( HDC, PBITMAPINFO2 pbmp2, PBYTE ab );
  39.  
  40. //*********** DESTRUCTOR ****************************************
  41.  
  42.     ~bitmap ( void );
  43.  
  44.  
  45. //*********** MEMBER FUNCTIONS **********************************
  46.  
  47.     BOOL draw ( HPS hpsTarget, RECTL  & rclTarg );
  48.     BOOL draw ( HPS hpsTarget, POINTL & ptlLowerLeft );
  49.  
  50. };
  51.  
  52.  
  53. #endif
  54.