⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dib.h

📁 虚拟打印机
💻 H
字号:
/* * * dib.h *   Copyright (C) 2006 Michael H. Overlin   This program is free software; you can redistribute it and/or modify   it under the terms of the GNU General Public License as published by   the Free Software Foundation; either version 2 of the License, or   (at your option) any later version.   This program is distributed in the hope that it will be useful,   but WITHOUT ANY WARRANTY; without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the   GNU General Public License for more details.   You should have received a copy of the GNU General Public License   along with this program; if not, write to the Free Software   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      Contact at poster_printer@yahoo.com */#ifndef DIBSECTION_H#define DIBSECTION_H#include "myfilemap.h"class DibFromMemory {public:	DibFromMemory(void) ;	~DibFromMemory() ;	BOOL Init(const void *pMemImage, DWORD dwImageSize) ;	int StretchDIBits(HDC hdc, const RECT& rDest, const RECT& rSrc, DWORD dwRop) const ;	int StretchDIBits(		HDC hdc, int xDest, int yDest, int cxDest, int cyDest, 		int xSrc, int ySrc, int cxSrc, int cySrc, DWORD dwRop	) const ;	const POINTD& GetLogPix(void) const ;	const SIZED& GetSize_Inches(void) const ;	const SIZE& GetSize_Pixels(void) const ;protected:		BOOL m_bInited;	const BITMAPINFO* m_pbi;	const void *m_pBits;	SIZE m_sz_Pixels;	SIZED m_szd_Inches;	POINTD m_ptdLogPix;};// CURRENTLY USED TO READ A BITMAP FILE FROM DISKclass DibFromFileMap : public DibFromMemory {public:	DibFromFileMap(void) ;	~DibFromFileMap() ;	BOOL Open(const tstring& tstrFileName) ;	void Close(void) ;	BOOL IsOpen(void) const { return m_mfm.IsOpen(); }private:	::MyFileMap m_mfm;};// CURRENTLY USED TO CREATE A BITMAP FILE ON DISKclass My24BPPDIBSection {public:	My24BPPDIBSection(void) ;	~My24BPPDIBSection() ;	HBITMAP Create(IN HDC hdc, IN const tstring& tstrFileName, 					IN const SIZED& szd_Inches, IN const POINTD& ptdLogPix);	void Close(void) ;	BOOL IsOpen(void) const ;	const POINTD& GetLogPix(void) const;	const SIZED& GetSize_Inches(void) const;	const SIZE& GetSize_Pixels(void) const;		static BOOL TheirCalculateFileSize(		OUT DWORD& dwFileSize,		OUT SIZE& szImage_Pixels, 		IN const SIZED& szd_Inches, 		IN const POINTD& ptdLogPix		);	static BOOL TheirCalculateSizes(		OUT DWORD& dwFileSize,		OUT DWORD& dwPixelDataOffset, 		OUT DWORD& dwImagePixelDataBytes,		OUT SIZE& szImage_Pixels,		IN const SIZED& szd_Inches, 		IN const POINTD& ptdLogPix		) ;private:	::MyFileReadWriteMap m_mfm;	HBITMAP m_hbmp;	POINTD m_ptdLogPix;	SIZED m_szd_Inches;	SIZE m_sz_Pixels;};#endif

⌨️ 快捷键说明

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