1 /* libwmf ("metadefs.h"): library for wmf conversion
2    Copyright (C) 2000-2002 - various; see CREDITS, ChangeLog, and sources
3 
4    The libwmf Library is free software; you can redistribute it and/or
5    modify it under the terms of the GNU Library General Public License as
6    published by the Free Software Foundation; either version 2 of the
7    License, or (at your option) any later version.
8 
9    The libwmf Library is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    Library General Public License for more details.
13 
14    You should have received a copy of the GNU Library General Public
15    License along with the libwmf Library; see the file COPYING.  If not,
16    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17    Boston, MA 02111-1307, USA.  */
18 
19 
20 #ifndef WMFMETADEFS_H
21 #define WMFMETADEFS_H
22 
23 /* Modes for WmfSetMapMode
24  */
25 #define MM_TEXT        1
26 #define MM_LOMETRIC    2
27 #define MM_HIMETRIC    3
28 #define MM_LOENGLISH   4
29 #define MM_HIENGLISH   5
30 #define MM_TWIPS       6
31 #define MM_ISOTROPIC   7
32 #define MM_ANISOTROPIC 8
33 #define MM_DPI         9
34 
35 /* meta file api defs
36  */
37 #define META_SAVEDC			0x001E	/*i dont think ive saved everything ?*/
38 #define META_REALIZEPALETTE		0x0035	/*safely ignored methinks*/
39 #define META_SETPALENTRIES		0x0037	/*safely ignored methinks*/
40 #define META_CREATEPALETTE		0x00f7	/*not implemented yet*/
41 #define META_SETBKMODE			0x0102	/*working on it*/
42 #define META_SETMAPMODE			0x0103	/*more or less implemented*/
43 #define META_SETROP2			0x0104	/*maybe it works maybe it doesnt*/
44 #define META_SETPOLYFILLMODE		0x0106
45 #define META_SETSTRETCHBLTMODE		0x0107	/*dont know yet*/
46 #define META_SETTEXTCHAREXTRA		0x0108	/*extra space after each character*/
47 #define META_RESTOREDC			0x0127	/*i dont think ive restored everything ?*/
48 #define META_INVERTREGION		0x012A	/*invert the select region*/
49 #define META_PAINTREGION		0x012B	/*paint the selected region*/
50 #define META_SELECTCLIPREGION		0x012C	/*set a region to be the clipping region*/
51 #define META_SELECTOBJECT		0x012D	/*select what object to draw with*/
52 #define META_SETTEXTALIGN		0x012E	/*working on it, vertial done for X*/
53 #define META_DIBCREATEPATTERNBRUSH	0x0142	/*implemented fully i think*/
54 #define META_DELETEOBJECT		0x01f0	/*delete an object, deleting selected object makes
55 						  you fall back to the previous selected object ?*/
56 #define META_SETBKCOLOR			0x0201
57 #define META_SETTEXTCOLOR		0x0209	/*text color, stored*/
58 #define META_SETTEXTJUSTIFICATION	0x020A	/*amount of extra space to add to each space i believe*/
59 #define META_SETWINDOWORG 		0x020B	/*defines the origin of the coordinate system that the wmf
60 						  functions are against*/
61 #define META_SETWINDOWEXT		0x020C	/*defines the width and height of the coord-system*/
62 #define META_SETVIEWPORTORG 		0x020D
63 #define META_SETVIEWPORTEXT		0x020E	/*only makes a difference in those MM_ISOTROPIC and MM_ANISOTROPIC modes*/
64 #define META_OFFSETWINDOWORG		0x020F	/*changes the origin of the logical window*/
65 #define META_OFFSETVIEWPORTORG		0x0211	/*changes the origin of the device window*/
66 #define META_LINETO			0x0213	/*fairly obvious, once clipping is engaged*/
67 #define META_MOVETO			0x0214	/*obvious
68 						  see code for more*/
69 #define META_OFFSETCLIPRGN		0x0220	/*move the  clipping reg*/
70 #define META_FILLREGION			0x0228	/*fill the selected region with the selected brush*/
71 #define META_SETMAPPERFLAGS		0x0231	/*font mapping flag, ignorable methinks*/
72 #define META_SELECTPALETTE		0x0234	/*safely ignored methinks*/
73 #define META_CREATEFONTINDIRECT		0x02FB	/*gd mapping needs to be done, X one needs to be made robust*/
74 #define META_CREATEPENINDIRECT		0x02FA	/*uncertain*/
75 #define META_CREATEBRUSHINDIRECT	0x02FC	/*undertain*/
76 #define META_POLYGON			0x0324	/*obvious*/
77 #define META_POLYLINE			0x0325	/*obvious*/
78 #define META_SCALEWINDOWEXT		0x0410	/*modify the extent of the window*/
79 #define META_SCALEVIEWPORTEXT		0x0412	/*modify the extent of the viewport*/
80 #define META_EXCLUDECLIPRECT		0x0415	/*remove part of a clipping rect*/
81 #define META_INTERSECTCLIPRECT		0x0416	/*a clipping rectangle, often used for lines*/
82 #define META_ELLIPSE	 		0x0418	/*obvious*/
83 #define META_FLOODFILL 			0x0419	/*reasonably obvious*/
84 #define META_RECTANGLE			0x041B	/*obvious*/
85 #define META_SETPIXEL			0x041F	/*obvious*/
86 #define META_FRAMEREGION		0x0429	/*reasonably obvious*/
87 
88 #define META_TEXTOUT			0x0521
89 #define META_POLYPOLYGON		0x0538	/*working*/
90 #define META_EXTFLOODFILL		0x0548	/*what are filltypes ?*/
91 #define META_ROUNDRECT			0x061C	/*reasonably obvious*/
92 #define META_PATBLT			0x061D	/*more ROP stuff*/
93 #define META_ESCAPE			0x0626	/*i think i can ignore this one*/
94 #define META_CREATEREGION		0x06FF	/*awkward*/
95 #define META_ARC		  	0x0817	/*obvious*/
96 #define META_PIE			0x081A	/*a pie*/
97 #define META_CHORD			0x0830	/*a chord*/
98 #define META_DIBBITBLT			0x0940	/*not so sure yet, some common ones working so far*/
99 #define META_EXTTEXTOUT			0x0a32 	/*working on it, basically working for X*/
100 #define META_DIBSTRETCHBLT		0x0b41	/*working on it*/
101 #define META_SETDIBTODEV		0x0d33	/*a reasonably complicated mechanism of copying a graphic to the screen*/
102 #define META_STRETCHDIB			0x0f43	/*working on it*/
103 
104 /* Regions */
105 
106 #define ERROR         0
107 #define NULLREGION    1
108 #define SIMPLEREGION  2
109 #define COMPLEXREGION 3
110 
111 #define RGN_AND  1
112 #define RGN_OR   2
113 #define RGN_XOR  3
114 #define RGN_DIFF 4
115 #define RGN_COPY 5
116 
117 #define CLIP_INTERSECT 0x0001
118 #define CLIP_EXCLUDE   0x0002
119 #define CLIP_KEEPRGN   0x0004
120 
121 #endif /* ! WMFMETADEFS_H */
122