www.pudn.com > pdf417.rar > BmpObject.h


// BmpObject.h: interface for the CBmpObject class. 
// 
////////////////////////////////////////////////////////////////////// 
 
#if !defined(AFX_BMPOBJECT_H__0B7C4203_13EC_11D5_AB0D_8D2AF7F5CA43__INCLUDED_) 
#define AFX_BMPOBJECT_H__0B7C4203_13EC_11D5_AB0D_8D2AF7F5CA43__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
 
typedef struct _UPOINT{ 
	UINT x; 
	UINT y; 
}UPOINT; 
 
typedef struct _Region{ 
	char RegionType;	//用于判断该区域数据的类型 
	UPOINT Left;	//左点坐标 
	UPOINT Top;	//上点坐标 
	UPOINT Right;	//右点坐标 
	UPOINT Root;	//下点坐标 
}Region; 
 
typedef struct _CellItem{ 
	UINT	x; 
	UINT	y; 
}CellItem; 
 
typedef struct _Cell{ 
	CellItem* CellArray;			//Cell数组 
	UINT CellItemCount;				//此Cell集中包括的Cell数目 
}Cell; 
 
class CBmpObject   
{ 
public: 
	UINT dImageWidth,dImageHeight;	//图像宽度,高度 
	UINT dBitCounts;				//每位所占位数 
	UCHAR* lpFileBuffer;				//文件指针 
	UCHAR* lpBmpData;				//文件数据区域 
	RGBQUAD* lpColorData;			//文件所用颜色数据指针 
	UINT dBytesPerLine;				//第一行的字节数 
	BITMAPINFOHEADER* bi;			//文件信息头指针 
 
public: 
	BOOL IsBlack(UINT x,UINT y);	//判断点(x,y)是否为BLACK 
	BYTE GetPointValue(UINT x,UINT y);	//得到一点的数据 
	void BmpDataReverse();	//把BMP图像数据反转 
 
public: 
	BOOL ReadBmpFile(CString& BmpFileName); 
	CBmpObject(); 
	virtual ~CBmpObject(); 
}; 
 
#endif // !defined(AFX_BMPOBJECT_H__0B7C4203_13EC_11D5_AB0D_8D2AF7F5CA43__INCLUDED_)