home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
bitmap1.zip
/
BITMAP.HPP
< prev
next >
Wrap
Text File
|
1993-12-02
|
1KB
|
54 lines
// bitmap class definition
// Copyright (C) Joel Barnum, Descriptor Systems, 1993
#ifndef _BITMAP_HPP_
#define _BITMAP_HPP_
class bitmap
{
private:
ULONG cx; // width
ULONG cy; // height
HBITMAP hbm; // bitmap handle
ULONG ulbpp; // bits per pel
LONG lRop; // current raster operation
ULONG cColors; // number of colors
PRGB2 aRGB2Colors; // color table pointer
HPS hps; // bitmap presentation space
HDC hdc; // bitmap device context
RECTL rcl; // amount of bitmap to draw
void initialize ( HAB hab ); // called by constructors
public:
//*********** CONSTRUCTORS **************************************
// create a bitmap from a resource file
bitmap ( HDC hdc, HMODULE hmod, ULONG id );
// create a bitmap from bytes in memory
bitmap ( HDC hdc, ULONG cxIn, ULONG cyIn, ULONG ulbppIn
, PRGB2 pColorTable, PBYTE ab );
// create a bitmap from bytes in memory, given a
// PM bitmap info structure
bitmap ( HDC, PBITMAPINFO2 pbmp2, PBYTE ab );
//*********** DESTRUCTOR ****************************************
~bitmap ( void );
//*********** MEMBER FUNCTIONS **********************************
BOOL draw ( HPS hpsTarget, RECTL & rclTarg );
BOOL draw ( HPS hpsTarget, POINTL & ptlLowerLeft );
};
#endif