Added support for WODM_BREAKLOOP message.
[wine.git] / graphics / enhmetafiledrv / dc.c
blob7ad21dd9a4084d88d6887def991c199be0bfcd0f
1 /*
2 * Enhanced MetaFile driver dc value functions
4 * Copyright 1999 Huw D M Davies
6 */
7 #include "enhmetafiledrv.h"
8 #include "debugtools.h"
10 DEFAULT_DEBUG_CHANNEL(enhmetafile)
12 INT EMFDRV_SaveDC( DC *dc )
14 EMRSAVEDC emr;
15 emr.emr.iType = EMR_SAVEDC;
16 emr.emr.nSize = sizeof(emr);
17 return EMFDRV_WriteRecord( dc, &emr.emr );
20 BOOL EMFDRV_RestoreDC( DC *dc, INT level )
22 EMRRESTOREDC emr;
23 emr.emr.iType = EMR_RESTOREDC;
24 emr.emr.nSize = sizeof(emr);
25 emr.iRelative = level;
26 return EMFDRV_WriteRecord( dc, &emr.emr );
29 UINT EMFDRV_SetTextAlign( DC *dc, UINT align )
31 EMRSETTEXTALIGN emr;
32 emr.emr.iType = EMR_SETTEXTALIGN;
33 emr.emr.nSize = sizeof(emr);
34 emr.iMode = align;
35 return EMFDRV_WriteRecord( dc, &emr.emr );
38 INT EMFDRV_SetBkMode( DC *dc, INT mode )
40 EMRSETBKMODE emr;
41 emr.emr.iType = EMR_SETBKMODE;
42 emr.emr.nSize = sizeof(emr);
43 emr.iMode = mode;
44 return EMFDRV_WriteRecord( dc, &emr.emr );
47 INT EMFDRV_SetROP2( DC *dc, INT rop )
49 EMRSETROP2 emr;
50 emr.emr.iType = EMR_SETROP2;
51 emr.emr.nSize = sizeof(emr);
52 emr.iMode = rop;
53 return EMFDRV_WriteRecord( dc, &emr.emr );
56 INT EMFDRV_SetPolyFillMode( DC *dc, INT mode )
58 EMRSETPOLYFILLMODE emr;
59 emr.emr.iType = EMR_SETPOLYFILLMODE;
60 emr.emr.nSize = sizeof(emr);
61 emr.iMode = mode;
62 return EMFDRV_WriteRecord( dc, &emr.emr );
65 INT EMFDRV_SetStretchBltMode( DC *dc, INT mode )
67 EMRSETSTRETCHBLTMODE emr;
68 emr.emr.iType = EMR_SETSTRETCHBLTMODE;
69 emr.emr.nSize = sizeof(emr);
70 emr.iMode = mode;
71 return EMFDRV_WriteRecord( dc, &emr.emr );
74 INT EMFDRV_SetMapMode( DC *dc, INT mode )
76 EMRSETMAPMODE emr;
77 emr.emr.iType = EMR_SETMAPMODE;
78 emr.emr.nSize = sizeof(emr);
79 emr.iMode = mode;
80 return EMFDRV_WriteRecord( dc, &emr.emr );
83 INT EMFDRV_ExcludeClipRect( DC *dc, INT left, INT top, INT right, INT bottom )
85 EMREXCLUDECLIPRECT emr;
86 emr.emr.iType = EMR_EXCLUDECLIPRECT;
87 emr.emr.nSize = sizeof(emr);
88 emr.rclClip.left = left;
89 emr.rclClip.top = top;
90 emr.rclClip.right = right;
91 emr.rclClip.bottom = bottom;
92 return EMFDRV_WriteRecord( dc, &emr.emr );
95 INT EMFDRV_IntersectClipRect( DC *dc, INT left, INT top, INT right, INT bottom)
97 EMRINTERSECTCLIPRECT emr;
98 emr.emr.iType = EMR_INTERSECTCLIPRECT;
99 emr.emr.nSize = sizeof(emr);
100 emr.rclClip.left = left;
101 emr.rclClip.top = top;
102 emr.rclClip.right = right;
103 emr.rclClip.bottom = bottom;
104 return EMFDRV_WriteRecord( dc, &emr.emr );
107 INT EMFDRV_OffsetClipRgn( DC *dc, INT x, INT y )
109 EMROFFSETCLIPRGN emr;
110 emr.emr.iType = EMR_OFFSETCLIPRGN;
111 emr.emr.nSize = sizeof(emr);
112 emr.ptlOffset.x = x;
113 emr.ptlOffset.y = y;
114 return EMFDRV_WriteRecord( dc, &emr.emr );
117 DWORD EMFDRV_SetMapperFlags( DC *dc, DWORD flags )
119 EMRSETMAPPERFLAGS emr;
121 emr.emr.iType = EMR_SETMAPPERFLAGS;
122 emr.emr.nSize = sizeof(emr);
123 emr.dwFlags = flags;
125 return EMFDRV_WriteRecord( dc, &emr.emr );
128 BOOL EMFDRV_AbortPath( DC *dc )
130 EMRABORTPATH emr;
132 emr.emr.iType = EMR_ABORTPATH;
133 emr.emr.nSize = sizeof(emr);
135 return EMFDRV_WriteRecord( dc, &emr.emr );
138 BOOL EMFDRV_BeginPath( DC *dc )
140 EMRBEGINPATH emr;
142 emr.emr.iType = EMR_BEGINPATH;
143 emr.emr.nSize = sizeof(emr);
145 return EMFDRV_WriteRecord( dc, &emr.emr );
148 BOOL EMFDRV_CloseFigure( DC *dc )
150 EMRCLOSEFIGURE emr;
152 emr.emr.iType = EMR_CLOSEFIGURE;
153 emr.emr.nSize = sizeof(emr);
155 return EMFDRV_WriteRecord( dc, &emr.emr );
158 BOOL EMFDRV_EndPath( DC *dc )
160 EMRENDPATH emr;
162 emr.emr.iType = EMR_ENDPATH;
163 emr.emr.nSize = sizeof(emr);
165 return EMFDRV_WriteRecord( dc, &emr.emr );
168 BOOL EMFDRV_FillPath( DC *dc )
170 EMRFILLPATH emr;
172 emr.emr.iType = EMR_FILLPATH;
173 emr.emr.nSize = sizeof(emr);
174 FIXME("Bounds\n");
175 emr.rclBounds.left = 0;
176 emr.rclBounds.top = 0;
177 emr.rclBounds.right = 0;
178 emr.rclBounds.bottom = 0;
179 return EMFDRV_WriteRecord( dc, &emr.emr );
182 BOOL EMFDRV_FlattenPath( DC *dc )
184 EMRFLATTENPATH emr;
186 emr.emr.iType = EMR_FLATTENPATH;
187 emr.emr.nSize = sizeof(emr);
189 return EMFDRV_WriteRecord( dc, &emr.emr );
192 BOOL EMFDRV_SelectClipPath( DC *dc, INT iMode )
194 EMRSELECTCLIPPATH emr;
196 emr.emr.iType = EMR_SELECTCLIPPATH;
197 emr.emr.nSize = sizeof(emr);
198 emr.iMode = iMode;
200 return EMFDRV_WriteRecord( dc, &emr.emr );
203 BOOL EMFDRV_StrokeAndFillPath( DC *dc )
205 EMRSTROKEANDFILLPATH emr;
207 emr.emr.iType = EMR_STROKEANDFILLPATH;
208 emr.emr.nSize = sizeof(emr);
209 FIXME("Bounds\n");
210 emr.rclBounds.left = 0;
211 emr.rclBounds.top = 0;
212 emr.rclBounds.right = 0;
213 emr.rclBounds.bottom = 0;
214 return EMFDRV_WriteRecord( dc, &emr.emr );
217 BOOL EMFDRV_StrokePath( DC *dc )
219 EMRSTROKEPATH emr;
221 emr.emr.iType = EMR_STROKEPATH;
222 emr.emr.nSize = sizeof(emr);
223 FIXME("Bounds\n");
224 emr.rclBounds.left = 0;
225 emr.rclBounds.top = 0;
226 emr.rclBounds.right = 0;
227 emr.rclBounds.bottom = 0;
228 return EMFDRV_WriteRecord( dc, &emr.emr );
231 BOOL EMFDRV_WidenPath( DC *dc )
233 EMRWIDENPATH emr;
235 emr.emr.iType = EMR_WIDENPATH;
236 emr.emr.nSize = sizeof(emr);
238 return EMFDRV_WriteRecord( dc, &emr.emr );