soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
gdialpha.h
1#ifndef __GDIALPHA__H__
2#define __GDIALPHA__H__
3#ifdef _WIN32
4
5#include "utilities-def.h"
6#include <windows.h>
7
8SNSBEGIN
9
10#define MAX_ALPHABUF 1<<16
11
12typedef struct tagALPHAINFO
13{
14 BITMAP bm;
15 LPBYTE lpBuf;
16 RECT rc;
17 tagALPHAINFO()
18 {
19 lpBuf=NULL;
20 rc.left=rc.top=rc.right=rc.bottom=0;
21 }
22} ALPHAINFO,* LPALPHAINFO;
23
24class UTILITIES_API CGdiAlpha
25{
26private:
27 static BYTE s_byAlphaBack[MAX_ALPHABUF];
28
29 static LPBYTE ALPHABACKUP(BITMAP *pBitmap,int x,int y,int cx,int cy);
30 //恢复位图的Alpha通道
31 static void ALPHARESTORE(BITMAP *pBitmap,int x,int y,int cx,int cy,LPBYTE lpAlpha);
32public:
33
34 static BOOL AlphaBackup(HDC hdc,LPCRECT pRect,ALPHAINFO &alphaInfo);
35
36 static void AlphaRestore(ALPHAINFO &alphaInfo);
37};
38
39SNSEND
40
41#endif //_WIN32
42#endif // __GDIALPHA__H__