1 #ifndef __drvwmf_h__
2 #define __drvwmf_h__
3 
4 /*
5    drvwmf.h : This file is part of pstoedit
6    Class declaration for the WMF output driver.
7    The implementation can be found in drvwmf.cpp
8 
9    Copyright (C) 1998 Thorsten Behrens and Bjoern Petersen
10    Copyright (C) 2000 Thorsten Behrens
11 
12     This program is free software; you can redistribute it and/or modify
13     it under the terms of the GNU General Public License as published by
14     the Free Software Foundation; either version 2 of the License, or
15     (at your option) any later version.
16 
17     This program is distributed in the hope that it will be useful,
18     but WITHOUT ANY WARRANTY; without even the implied warranty of
19     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20     GNU General Public License for more details.
21 
22     You should have received a copy of the GNU General Public License
23     along with this program; if not, write to the Free Software
24     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 
26 */
27 
28 
29 #include <windows.h>
30 #undef min		// is declared inline in drvbase... (sigh)
31 #undef max
32 
33 #include "drvbase.h"
34 
35 
36 struct WmfPrivate; // forward to the internal data
37 
38 
39 class drvWMF : public drvbase {
40 
41 public:
42 
43 	derivedConstructor(drvWMF);		// Constructor
44 
45 	~drvWMF();						// Destructor
46 
47 #include "drvfuncs.h"
48 
49 	virtual void show_image(const Image & imageinfo);
50 
51 private:
52 
53 	enum polyType {TYPE_FILL,TYPE_LINES};
54 
55 	void	drawPoly			(POINT*, int*, polyType type);
56 
57 	void	setDrawAttr			();
58 
59 	int		fetchFont			(const TextInfo & textinfo, short int, short int);
60 
61 
62 // This contains all private data of drvwmf.
63 
64 	HDC				metaDC;
65 	HDC				desktopDC;
66 
67 	LOGPEN			penData;
68 	HPEN			coloredPen;
69 	HPEN			oldColoredPen;
70 
71 	LOGBRUSH		brushData;
72 	HBRUSH			coloredBrush;
73 	HBRUSH			oldColoredBrush;
74 
75 	LOGFONT			theFontRec;
76 	HFONT			myFont;
77 	HFONT			oldFont;
78 
79 	long			fontsHeight, fontsWidth;
80 
81 	long			showFontList;
82 	WORD			cntPalEntries;
83 
84 	long			maxX, maxY;
85 	long			minX, minY;
86 	long			maxStatus, minStatus;
87 
88 	bool			enhanced;
89 	bool			mapToArial;
90 	bool			emulateNarrowFonts;
91 	bool			drawBoundingBox;
92 	bool			pruneLineEnds;
93 	char*			tempName;
94 	FILE*			outFile;
95 };
96 
97 #endif /* #ifndef __drvwmf_h__ */
98 
99 
100