bitmap.h

来自「看到有兄弟提出的半透明算法」· C头文件 代码 · 共 40 行

H
40
字号
// Bitmap.h: interface for the CBitmap class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_BITMAP_H__5C486067_779D_4881_BF0C_021504F5A1DA__INCLUDED_)
#define AFX_BITMAP_H__5C486067_779D_4881_BF0C_021504F5A1DA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Base.h"
#include "GameApp.h"
#include "GameDoc.h"

class CBitmap : public CBase  
{
protected:
	CBitmap();
	CBitmap(IBitmap* pIBitmap);
	virtual ~CBitmap();
public:
	// 画背景
	void DrawBgBitmap(int nX, int nY, int nWidth, int nHeight, int nSrcX, int nSrcY);
	void Release();		// 释放相关数据
	int Load(int nResID);
	int BltIn(IBitmap* pDest, int xDest, int yDest, int dx, int dy, int xSrc, int ySrc, AEERasterOp rop);	
	static CBitmap* CreateInstance();
	// 重载画图,nColx和nColy是指定透明色的坐标
	int Draw(int nDrawX, int nDrawY, int dx, int dy, int xSrc, int ySrc, AEERasterOp rop = AEE_RO_TRANSPARENT);
	// 重载画图,透明效果,第一个参数表示是否透明
	int Draw(boolean bSheer, int nDrawX, int nDrawY, int ndx, int ndy, int nSrcX, int nSrcY, AEERasterOp rop = AEE_RO_TRANSPARENT);
	int GetBMPInfo(AEEBitmapInfo& bmpInfo);
	void FreeData();
public:
	IBitmap* m_pIBitmap;	// 当前共有18个资源位图
};

#endif // !defined(AFX_BITMAP_H__5C486067_779D_4881_BF0C_021504F5A1DA__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?