00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __RE_NTdibSection_h__
00027 #define __RE_NTdibSection_h__
00028
00029 #include "RE_API.h"
00030 #ifdef WIN32
00031
00032 #include <windows.h>
00033 #include <UT/UT_Defines.h>
00034
00035 class RE_API RE_DIBSection
00036 {
00037 public:
00038 RE_DIBSection();
00039 virtual ~RE_DIBSection();
00040
00041
00042 UT_Bool create(int widthPixels, int heightPixels, int bitCount );
00043
00044
00045 void draw(HDC dest, int x, int y, int rasterOp = SRCCOPY);
00046
00047
00048 void copyFrom(HDC source, int width, int height,
00049 int rasterOP = SRCCOPY,
00050 int srcX = 0, int srcY = 0, int targetX = 0, int targetY = 0);
00051
00052
00053 void setPalette(HPALETTE palette) ;
00054
00055 HDC getDC() { return myMemDC; }
00056 HBITMAP getBitmap() { return myBitmap; }
00057 SIZE getSize() { return mySizeDIB; }
00058
00059 protected:
00060 HBITMAP myBitmap;
00061 HBITMAP myBitmapOld;
00062 void* myBits;
00063 BITMAPV5HEADER myBih;
00064 SIZE mySizeDIB;
00065 HDC myMemDC;
00066
00067 void destroy() ;
00068 };
00069
00070 #endif // ifdef WIN32
00071
00072 #endif // __RE_NTdibSection_h__