1*fc16259fSJames Tabor /*
2*fc16259fSJames Tabor * Enhanced MetaFile driver
3*fc16259fSJames Tabor *
4*fc16259fSJames Tabor * Copyright 1999 Huw D M Davies
5*fc16259fSJames Tabor * Copyright 2021 Jacek Caban for CodeWeavers
6*fc16259fSJames Tabor *
7*fc16259fSJames Tabor * This library is free software; you can redistribute it and/or
8*fc16259fSJames Tabor * modify it under the terms of the GNU Lesser General Public
9*fc16259fSJames Tabor * License as published by the Free Software Foundation; either
10*fc16259fSJames Tabor * version 2.1 of the License, or (at your option) any later version.
11*fc16259fSJames Tabor *
12*fc16259fSJames Tabor * This library is distributed in the hope that it will be useful,
13*fc16259fSJames Tabor * but WITHOUT ANY WARRANTY; without even the implied warranty of
14*fc16259fSJames Tabor * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15*fc16259fSJames Tabor * Lesser General Public License for more details.
16*fc16259fSJames Tabor *
17*fc16259fSJames Tabor * You should have received a copy of the GNU Lesser General Public
18*fc16259fSJames Tabor * License along with this library; if not, write to the Free Software
19*fc16259fSJames Tabor * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20*fc16259fSJames Tabor */
21*fc16259fSJames Tabor
22*fc16259fSJames Tabor //#include "ntgdi_private.h"
23*fc16259fSJames Tabor #include "wine/config.h"
24*fc16259fSJames Tabor
25*fc16259fSJames Tabor #include <stdarg.h>
26*fc16259fSJames Tabor #include <stdlib.h>
27*fc16259fSJames Tabor #include <string.h>
28*fc16259fSJames Tabor #include <assert.h>
29*fc16259fSJames Tabor #include "windef.h"
30*fc16259fSJames Tabor #include "winbase.h"
31*fc16259fSJames Tabor #include "wingdi.h"
32*fc16259fSJames Tabor #include "winnls.h"
33*fc16259fSJames Tabor #include "winerror.h"
34*fc16259fSJames Tabor #include "gdi_private.h"
35*fc16259fSJames Tabor #ifdef __REACTOS__
36*fc16259fSJames Tabor #include "wine/winternl.h"
37*fc16259fSJames Tabor #else
38*fc16259fSJames Tabor #include "winternl.h"
39*fc16259fSJames Tabor #endif
40*fc16259fSJames Tabor #include "wine/wingdi16.h"
41*fc16259fSJames Tabor #include "wine/debug.h"
42*fc16259fSJames Tabor
43*fc16259fSJames Tabor #define M_PI 3.14159265358979323846
44*fc16259fSJames Tabor #define M_PI_2 1.570796326794896619
45*fc16259fSJames Tabor
emfdrv_update_bounds(WINEDC * dc,RECTL * rect)46*fc16259fSJames Tabor static void emfdrv_update_bounds( WINEDC *dc, RECTL *rect )
47*fc16259fSJames Tabor {
48*fc16259fSJames Tabor RECTL *bounds = &dc->emf_bounds;
49*fc16259fSJames Tabor RECTL vport_rect = *rect;
50*fc16259fSJames Tabor
51*fc16259fSJames Tabor //lp_to_dp( dc, (POINT *)&vport_rect, 2 );
52*fc16259fSJames Tabor LPtoDP(dc->hdc, (POINT *)&vport_rect, 2 );
53*fc16259fSJames Tabor
54*fc16259fSJames Tabor /* The coordinate systems may be mirrored
55*fc16259fSJames Tabor (LPtoDP handles points, not rectangles) */
56*fc16259fSJames Tabor if (vport_rect.left > vport_rect.right)
57*fc16259fSJames Tabor {
58*fc16259fSJames Tabor LONG temp = vport_rect.right;
59*fc16259fSJames Tabor vport_rect.right = vport_rect.left;
60*fc16259fSJames Tabor vport_rect.left = temp;
61*fc16259fSJames Tabor }
62*fc16259fSJames Tabor if (vport_rect.top > vport_rect.bottom)
63*fc16259fSJames Tabor {
64*fc16259fSJames Tabor LONG temp = vport_rect.bottom;
65*fc16259fSJames Tabor vport_rect.bottom = vport_rect.top;
66*fc16259fSJames Tabor vport_rect.top = temp;
67*fc16259fSJames Tabor }
68*fc16259fSJames Tabor
69*fc16259fSJames Tabor if (bounds->left > bounds->right)
70*fc16259fSJames Tabor {
71*fc16259fSJames Tabor /* first bounding rectangle */
72*fc16259fSJames Tabor *bounds = vport_rect;
73*fc16259fSJames Tabor }
74*fc16259fSJames Tabor else
75*fc16259fSJames Tabor {
76*fc16259fSJames Tabor bounds->left = min( bounds->left, vport_rect.left );
77*fc16259fSJames Tabor bounds->top = min( bounds->top, vport_rect.top );
78*fc16259fSJames Tabor bounds->right = max( bounds->right, vport_rect.right );
79*fc16259fSJames Tabor bounds->bottom = max( bounds->bottom, vport_rect.bottom );
80*fc16259fSJames Tabor }
81*fc16259fSJames Tabor }
82*fc16259fSJames Tabor
EMFDRV_LineTo(WINEDC * dc,INT x,INT y)83*fc16259fSJames Tabor BOOL EMFDRV_LineTo( WINEDC *dc, INT x, INT y )
84*fc16259fSJames Tabor {
85*fc16259fSJames Tabor RECTL bounds;
86*fc16259fSJames Tabor POINT pt;
87*fc16259fSJames Tabor
88*fc16259fSJames Tabor //pt = dc->attr->cur_pos;
89*fc16259fSJames Tabor GetCurrentPositionEx(dc->hdc, &pt);
90*fc16259fSJames Tabor
91*fc16259fSJames Tabor bounds.left = min( x, pt.x );
92*fc16259fSJames Tabor bounds.top = min( y, pt.y );
93*fc16259fSJames Tabor bounds.right = max( x, pt.x );
94*fc16259fSJames Tabor bounds.bottom = max( y, pt.y );
95*fc16259fSJames Tabor emfdrv_update_bounds( dc, &bounds );
96*fc16259fSJames Tabor return TRUE;
97*fc16259fSJames Tabor }
98*fc16259fSJames Tabor
EMFDRV_RoundRect(WINEDC * dc,INT left,INT top,INT right,INT bottom,INT ell_width,INT ell_height)99*fc16259fSJames Tabor BOOL EMFDRV_RoundRect( WINEDC *dc, INT left, INT top, INT right,
100*fc16259fSJames Tabor INT bottom, INT ell_width, INT ell_height )
101*fc16259fSJames Tabor {
102*fc16259fSJames Tabor RECTL bounds;
103*fc16259fSJames Tabor
104*fc16259fSJames Tabor if (left == right || top == bottom) return FALSE;
105*fc16259fSJames Tabor
106*fc16259fSJames Tabor bounds.left = min( left, right );
107*fc16259fSJames Tabor bounds.top = min( top, bottom );
108*fc16259fSJames Tabor bounds.right = max( left, right );
109*fc16259fSJames Tabor bounds.bottom = max( top, bottom );
110*fc16259fSJames Tabor if (GetGraphicsMode(dc->hdc) == GM_COMPATIBLE)//dc->attr->graphics_mode == GM_COMPATIBLE)
111*fc16259fSJames Tabor {
112*fc16259fSJames Tabor bounds.right--;
113*fc16259fSJames Tabor bounds.bottom--;
114*fc16259fSJames Tabor }
115*fc16259fSJames Tabor
116*fc16259fSJames Tabor emfdrv_update_bounds( dc, &bounds );
117*fc16259fSJames Tabor return TRUE;
118*fc16259fSJames Tabor }
119*fc16259fSJames Tabor
EMFDRV_ArcChordPie(WINEDC * dc,INT left,INT top,INT right,INT bottom,INT xstart,INT ystart,INT xend,INT yend,DWORD type)120*fc16259fSJames Tabor BOOL EMFDRV_ArcChordPie( WINEDC *dc, INT left, INT top, INT right, INT bottom,
121*fc16259fSJames Tabor INT xstart, INT ystart, INT xend, INT yend, DWORD type )
122*fc16259fSJames Tabor {
123*fc16259fSJames Tabor INT temp, x_centre, y_centre, i;
124*fc16259fSJames Tabor double angle_start, angle_end;
125*fc16259fSJames Tabor double xinter_start, yinter_start, xinter_end, yinter_end;
126*fc16259fSJames Tabor EMRARC emr;
127*fc16259fSJames Tabor RECTL bounds;
128*fc16259fSJames Tabor
129*fc16259fSJames Tabor if (left == right || top == bottom) return FALSE;
130*fc16259fSJames Tabor
131*fc16259fSJames Tabor if (left > right) { temp = left; left = right; right = temp; }
132*fc16259fSJames Tabor if (top > bottom) { temp = top; top = bottom; bottom = temp; }
133*fc16259fSJames Tabor
134*fc16259fSJames Tabor if (GetGraphicsMode(dc->hdc) == GM_COMPATIBLE)//dc->attr->graphics_mode == GM_COMPATIBLE)
135*fc16259fSJames Tabor {
136*fc16259fSJames Tabor right--;
137*fc16259fSJames Tabor bottom--;
138*fc16259fSJames Tabor }
139*fc16259fSJames Tabor
140*fc16259fSJames Tabor emr.emr.iType = type;
141*fc16259fSJames Tabor emr.emr.nSize = sizeof(emr);
142*fc16259fSJames Tabor emr.rclBox.left = left;
143*fc16259fSJames Tabor emr.rclBox.top = top;
144*fc16259fSJames Tabor emr.rclBox.right = right;
145*fc16259fSJames Tabor emr.rclBox.bottom = bottom;
146*fc16259fSJames Tabor emr.ptlStart.x = xstart;
147*fc16259fSJames Tabor emr.ptlStart.y = ystart;
148*fc16259fSJames Tabor emr.ptlEnd.x = xend;
149*fc16259fSJames Tabor emr.ptlEnd.y = yend;
150*fc16259fSJames Tabor
151*fc16259fSJames Tabor /* Now calculate the BBox */
152*fc16259fSJames Tabor x_centre = (left + right + 1) / 2;
153*fc16259fSJames Tabor y_centre = (top + bottom + 1) / 2;
154*fc16259fSJames Tabor
155*fc16259fSJames Tabor xstart -= x_centre;
156*fc16259fSJames Tabor ystart -= y_centre;
157*fc16259fSJames Tabor xend -= x_centre;
158*fc16259fSJames Tabor yend -= y_centre;
159*fc16259fSJames Tabor
160*fc16259fSJames Tabor /* invert y co-ords to get angle anti-clockwise from x-axis */
161*fc16259fSJames Tabor angle_start = atan2( -(double)ystart, (double)xstart );
162*fc16259fSJames Tabor angle_end = atan2( -(double)yend, (double)xend );
163*fc16259fSJames Tabor
164*fc16259fSJames Tabor /* These are the intercepts of the start/end lines with the arc */
165*fc16259fSJames Tabor xinter_start = (right - left + 1)/2 * cos(angle_start) + x_centre;
166*fc16259fSJames Tabor yinter_start = -(bottom - top + 1)/2 * sin(angle_start) + y_centre;
167*fc16259fSJames Tabor xinter_end = (right - left + 1)/2 * cos(angle_end) + x_centre;
168*fc16259fSJames Tabor yinter_end = -(bottom - top + 1)/2 * sin(angle_end) + y_centre;
169*fc16259fSJames Tabor
170*fc16259fSJames Tabor if (angle_start < 0) angle_start += 2 * M_PI;
171*fc16259fSJames Tabor if (angle_end < 0) angle_end += 2 * M_PI;
172*fc16259fSJames Tabor if (angle_end < angle_start) angle_end += 2 * M_PI;
173*fc16259fSJames Tabor
174*fc16259fSJames Tabor bounds.left = min( xinter_start, xinter_end );
175*fc16259fSJames Tabor bounds.top = min( yinter_start, yinter_end );
176*fc16259fSJames Tabor bounds.right = max( xinter_start, xinter_end );
177*fc16259fSJames Tabor bounds.bottom = max( yinter_start, yinter_end );
178*fc16259fSJames Tabor
179*fc16259fSJames Tabor for (i = 0; i <= 8; i++)
180*fc16259fSJames Tabor {
181*fc16259fSJames Tabor if(i * M_PI / 2 < angle_start) /* loop until we're past start */
182*fc16259fSJames Tabor continue;
183*fc16259fSJames Tabor if(i * M_PI / 2 > angle_end) /* if we're past end we're finished */
184*fc16259fSJames Tabor break;
185*fc16259fSJames Tabor
186*fc16259fSJames Tabor /* the arc touches the rectangle at the start of quadrant i, so adjust
187*fc16259fSJames Tabor BBox to reflect this. */
188*fc16259fSJames Tabor
189*fc16259fSJames Tabor switch(i % 4) {
190*fc16259fSJames Tabor case 0:
191*fc16259fSJames Tabor bounds.right = right;
192*fc16259fSJames Tabor break;
193*fc16259fSJames Tabor case 1:
194*fc16259fSJames Tabor bounds.top = top;
195*fc16259fSJames Tabor break;
196*fc16259fSJames Tabor case 2:
197*fc16259fSJames Tabor bounds.left = left;
198*fc16259fSJames Tabor break;
199*fc16259fSJames Tabor case 3:
200*fc16259fSJames Tabor bounds.bottom = bottom;
201*fc16259fSJames Tabor break;
202*fc16259fSJames Tabor }
203*fc16259fSJames Tabor }
204*fc16259fSJames Tabor
205*fc16259fSJames Tabor /* If we're drawing a pie then make sure we include the centre */
206*fc16259fSJames Tabor if (type == EMR_PIE)
207*fc16259fSJames Tabor {
208*fc16259fSJames Tabor if (bounds.left > x_centre) bounds.left = x_centre;
209*fc16259fSJames Tabor else if (bounds.right < x_centre) bounds.right = x_centre;
210*fc16259fSJames Tabor if (bounds.top > y_centre) bounds.top = y_centre;
211*fc16259fSJames Tabor else if (bounds.bottom < y_centre) bounds.bottom = y_centre;
212*fc16259fSJames Tabor }
213*fc16259fSJames Tabor else if (type == EMR_ARCTO)
214*fc16259fSJames Tabor {
215*fc16259fSJames Tabor POINT pt;
216*fc16259fSJames Tabor //pt = dc->attr->cur_pos;
217*fc16259fSJames Tabor GetCurrentPositionEx(dc->hdc, &pt);
218*fc16259fSJames Tabor bounds.left = min( bounds.left, pt.x );
219*fc16259fSJames Tabor bounds.top = min( bounds.top, pt.y );
220*fc16259fSJames Tabor bounds.right = max( bounds.right, pt.x );
221*fc16259fSJames Tabor bounds.bottom = max( bounds.bottom, pt.y );
222*fc16259fSJames Tabor }
223*fc16259fSJames Tabor emfdrv_update_bounds( dc, &bounds );
224*fc16259fSJames Tabor return TRUE;
225*fc16259fSJames Tabor }
226*fc16259fSJames Tabor
EMFDRV_Arc(WINEDC * dc,INT left,INT top,INT right,INT bottom,INT xstart,INT ystart,INT xend,INT yend)227*fc16259fSJames Tabor BOOL EMFDRV_Arc( WINEDC *dc, INT left, INT top, INT right, INT bottom,
228*fc16259fSJames Tabor INT xstart, INT ystart, INT xend, INT yend )
229*fc16259fSJames Tabor {
230*fc16259fSJames Tabor return EMFDRV_ArcChordPie( dc, left, top, right, bottom, xstart, ystart,
231*fc16259fSJames Tabor xend, yend, EMR_ARC );
232*fc16259fSJames Tabor }
233*fc16259fSJames Tabor
EMFDRV_ArcTo(WINEDC * dc,INT left,INT top,INT right,INT bottom,INT xstart,INT ystart,INT xend,INT yend)234*fc16259fSJames Tabor BOOL EMFDRV_ArcTo( WINEDC *dc, INT left, INT top, INT right, INT bottom,
235*fc16259fSJames Tabor INT xstart, INT ystart, INT xend, INT yend )
236*fc16259fSJames Tabor {
237*fc16259fSJames Tabor return EMFDRV_ArcChordPie( dc, left, top, right, bottom, xstart, ystart,
238*fc16259fSJames Tabor xend, yend, EMR_ARCTO );
239*fc16259fSJames Tabor }
240*fc16259fSJames Tabor
EMFDRV_Pie(WINEDC * dc,INT left,INT top,INT right,INT bottom,INT xstart,INT ystart,INT xend,INT yend)241*fc16259fSJames Tabor BOOL EMFDRV_Pie( WINEDC *dc, INT left, INT top, INT right, INT bottom,
242*fc16259fSJames Tabor INT xstart, INT ystart, INT xend, INT yend )
243*fc16259fSJames Tabor {
244*fc16259fSJames Tabor return EMFDRV_ArcChordPie( dc, left, top, right, bottom, xstart, ystart,
245*fc16259fSJames Tabor xend, yend, EMR_PIE );
246*fc16259fSJames Tabor }
247*fc16259fSJames Tabor
EMFDRV_Chord(WINEDC * dc,INT left,INT top,INT right,INT bottom,INT xstart,INT ystart,INT xend,INT yend)248*fc16259fSJames Tabor BOOL EMFDRV_Chord( WINEDC *dc, INT left, INT top, INT right, INT bottom,
249*fc16259fSJames Tabor INT xstart, INT ystart, INT xend, INT yend )
250*fc16259fSJames Tabor {
251*fc16259fSJames Tabor return EMFDRV_ArcChordPie( dc, left, top, right, bottom, xstart, ystart,
252*fc16259fSJames Tabor xend, yend, EMR_CHORD );
253*fc16259fSJames Tabor }
254*fc16259fSJames Tabor
EMFDRV_Ellipse(WINEDC * dc,INT left,INT top,INT right,INT bottom)255*fc16259fSJames Tabor BOOL EMFDRV_Ellipse( WINEDC *dc, INT left, INT top, INT right, INT bottom )
256*fc16259fSJames Tabor {
257*fc16259fSJames Tabor RECTL bounds;
258*fc16259fSJames Tabor
259*fc16259fSJames Tabor if (left == right || top == bottom) return FALSE;
260*fc16259fSJames Tabor
261*fc16259fSJames Tabor bounds.left = min( left, right );
262*fc16259fSJames Tabor bounds.top = min( top, bottom );
263*fc16259fSJames Tabor bounds.right = max( left, right );
264*fc16259fSJames Tabor bounds.bottom = max( top, bottom );
265*fc16259fSJames Tabor if (GetGraphicsMode(dc->hdc) == GM_COMPATIBLE)//dc->attr->graphics_mode == GM_COMPATIBLE)
266*fc16259fSJames Tabor {
267*fc16259fSJames Tabor bounds.right--;
268*fc16259fSJames Tabor bounds.bottom--;
269*fc16259fSJames Tabor }
270*fc16259fSJames Tabor
271*fc16259fSJames Tabor emfdrv_update_bounds( dc, &bounds );
272*fc16259fSJames Tabor return TRUE;
273*fc16259fSJames Tabor }
274*fc16259fSJames Tabor
EMFDRV_Rectangle(WINEDC * dc,INT left,INT top,INT right,INT bottom)275*fc16259fSJames Tabor BOOL EMFDRV_Rectangle( WINEDC *dc, INT left, INT top, INT right, INT bottom )
276*fc16259fSJames Tabor {
277*fc16259fSJames Tabor RECTL bounds;
278*fc16259fSJames Tabor
279*fc16259fSJames Tabor if (left == right || top == bottom) return FALSE;
280*fc16259fSJames Tabor
281*fc16259fSJames Tabor bounds.left = min( left, right );
282*fc16259fSJames Tabor bounds.top = min( top, bottom );
283*fc16259fSJames Tabor bounds.right = max( left, right );
284*fc16259fSJames Tabor bounds.bottom = max( top, bottom );
285*fc16259fSJames Tabor if (GetGraphicsMode(dc->hdc) == GM_COMPATIBLE)//dc->attr->graphics_mode == GM_COMPATIBLE)
286*fc16259fSJames Tabor {
287*fc16259fSJames Tabor bounds.right--;
288*fc16259fSJames Tabor bounds.bottom--;
289*fc16259fSJames Tabor }
290*fc16259fSJames Tabor
291*fc16259fSJames Tabor emfdrv_update_bounds( dc, &bounds );
292*fc16259fSJames Tabor return TRUE;
293*fc16259fSJames Tabor }
294*fc16259fSJames Tabor
EMFDRV_SetPixel(WINEDC * dc,INT x,INT y,COLORREF color)295*fc16259fSJames Tabor COLORREF EMFDRV_SetPixel( WINEDC *dc, INT x, INT y, COLORREF color )
296*fc16259fSJames Tabor {
297*fc16259fSJames Tabor RECTL bounds;
298*fc16259fSJames Tabor
299*fc16259fSJames Tabor bounds.left = bounds.right = x;
300*fc16259fSJames Tabor bounds.top = bounds.bottom = y;
301*fc16259fSJames Tabor emfdrv_update_bounds( dc, &bounds );
302*fc16259fSJames Tabor return CLR_INVALID;
303*fc16259fSJames Tabor }
304*fc16259fSJames Tabor
EMFDRV_PolylineTo(WINEDC * dc,const POINT * pt,INT count)305*fc16259fSJames Tabor BOOL EMFDRV_PolylineTo( WINEDC *dc, const POINT *pt, INT count )
306*fc16259fSJames Tabor {
307*fc16259fSJames Tabor /* FIXME: update bounding rect */
308*fc16259fSJames Tabor return TRUE;
309*fc16259fSJames Tabor }
310*fc16259fSJames Tabor
EMFDRV_PolyBezier(WINEDC * dc,const POINT * pts,DWORD count)311*fc16259fSJames Tabor BOOL EMFDRV_PolyBezier( WINEDC *dc, const POINT *pts, DWORD count )
312*fc16259fSJames Tabor {
313*fc16259fSJames Tabor /* FIXME: update bounding rect */
314*fc16259fSJames Tabor return TRUE;
315*fc16259fSJames Tabor }
316*fc16259fSJames Tabor
EMFDRV_PolyBezierTo(WINEDC * dc,const POINT * pts,DWORD count)317*fc16259fSJames Tabor BOOL EMFDRV_PolyBezierTo( WINEDC *dc, const POINT *pts, DWORD count )
318*fc16259fSJames Tabor {
319*fc16259fSJames Tabor /* FIXME: update bounding rect */
320*fc16259fSJames Tabor return TRUE;
321*fc16259fSJames Tabor }
322*fc16259fSJames Tabor
EMFDRV_PolyPolyline(WINEDC * dc,const POINT * pt,const DWORD * counts,UINT polys)323*fc16259fSJames Tabor BOOL EMFDRV_PolyPolyline( WINEDC *dc, const POINT *pt,
324*fc16259fSJames Tabor const DWORD *counts, UINT polys )
325*fc16259fSJames Tabor {
326*fc16259fSJames Tabor /* FIXME: update bounding rect */
327*fc16259fSJames Tabor return TRUE;
328*fc16259fSJames Tabor }
329*fc16259fSJames Tabor
EMFDRV_PolyPolygon(WINEDC * dc,const POINT * pt,const INT * counts,UINT polys)330*fc16259fSJames Tabor BOOL EMFDRV_PolyPolygon( WINEDC *dc, const POINT *pt,
331*fc16259fSJames Tabor const INT *counts, UINT polys )
332*fc16259fSJames Tabor {
333*fc16259fSJames Tabor /* FIXME: update bounding rect */
334*fc16259fSJames Tabor return TRUE;
335*fc16259fSJames Tabor }
336*fc16259fSJames Tabor
EMFDRV_PolyDraw(WINEDC * dc,const POINT * pts,const BYTE * types,DWORD count)337*fc16259fSJames Tabor BOOL EMFDRV_PolyDraw( WINEDC *dc, const POINT *pts,
338*fc16259fSJames Tabor const BYTE *types, DWORD count )
339*fc16259fSJames Tabor {
340*fc16259fSJames Tabor /* FIXME: update bounding rect */
341*fc16259fSJames Tabor return TRUE;
342*fc16259fSJames Tabor }
343*fc16259fSJames Tabor
EMFDRV_FillRgn(WINEDC * dc,HRGN hrgn,HBRUSH hbrush)344*fc16259fSJames Tabor BOOL EMFDRV_FillRgn( WINEDC *dc, HRGN hrgn, HBRUSH hbrush )
345*fc16259fSJames Tabor {
346*fc16259fSJames Tabor /* FIXME: update bounding rect */
347*fc16259fSJames Tabor return TRUE;
348*fc16259fSJames Tabor }
349*fc16259fSJames Tabor
EMFDRV_FrameRgn(WINEDC * dc,HRGN hrgn,HBRUSH hbrush,INT width,INT height)350*fc16259fSJames Tabor BOOL EMFDRV_FrameRgn( WINEDC *dc, HRGN hrgn, HBRUSH hbrush, INT width, INT height )
351*fc16259fSJames Tabor {
352*fc16259fSJames Tabor /* FIXME: update bounding rect */
353*fc16259fSJames Tabor return TRUE;
354*fc16259fSJames Tabor }
355*fc16259fSJames Tabor
EMFDRV_InvertRgn(WINEDC * dc,HRGN hrgn)356*fc16259fSJames Tabor BOOL EMFDRV_InvertRgn( WINEDC *dc, HRGN hrgn )
357*fc16259fSJames Tabor {
358*fc16259fSJames Tabor /* FIXME: update bounding rect */
359*fc16259fSJames Tabor return TRUE;
360*fc16259fSJames Tabor }
361*fc16259fSJames Tabor
EMFDRV_ExtTextOut(WINEDC * dc,INT x,INT y,UINT flags,const RECT * lprect,LPCWSTR str,UINT count,const INT * lpDx)362*fc16259fSJames Tabor BOOL EMFDRV_ExtTextOut( WINEDC *dc, INT x, INT y, UINT flags, const RECT *lprect,
363*fc16259fSJames Tabor LPCWSTR str, UINT count, const INT *lpDx )
364*fc16259fSJames Tabor {
365*fc16259fSJames Tabor /* FIXME: update bounding rect */
366*fc16259fSJames Tabor return TRUE;
367*fc16259fSJames Tabor }
368*fc16259fSJames Tabor
EMFDRV_GradientFill(WINEDC * dc,TRIVERTEX * vert_array,ULONG nvert,void * grad_array,ULONG ngrad,ULONG mode)369*fc16259fSJames Tabor BOOL EMFDRV_GradientFill( WINEDC *dc, TRIVERTEX *vert_array, ULONG nvert,
370*fc16259fSJames Tabor void *grad_array, ULONG ngrad, ULONG mode )
371*fc16259fSJames Tabor {
372*fc16259fSJames Tabor /* FIXME: update bounding rect */
373*fc16259fSJames Tabor return TRUE;
374*fc16259fSJames Tabor }
375*fc16259fSJames Tabor
EMFDRV_FillPath(WINEDC * dc)376*fc16259fSJames Tabor BOOL EMFDRV_FillPath( WINEDC *dc )
377*fc16259fSJames Tabor {
378*fc16259fSJames Tabor /* FIXME: update bound rect */
379*fc16259fSJames Tabor return TRUE;
380*fc16259fSJames Tabor }
381*fc16259fSJames Tabor
EMFDRV_StrokeAndFillPath(WINEDC * dc)382*fc16259fSJames Tabor BOOL EMFDRV_StrokeAndFillPath( WINEDC *dc )
383*fc16259fSJames Tabor {
384*fc16259fSJames Tabor /* FIXME: update bound rect */
385*fc16259fSJames Tabor return TRUE;
386*fc16259fSJames Tabor }
387*fc16259fSJames Tabor
EMFDRV_StrokePath(WINEDC * dc)388*fc16259fSJames Tabor BOOL EMFDRV_StrokePath( WINEDC *dc )
389*fc16259fSJames Tabor {
390*fc16259fSJames Tabor /* FIXME: update bound rect */
391*fc16259fSJames Tabor return TRUE;
392*fc16259fSJames Tabor }
393*fc16259fSJames Tabor
EMFDRV_AlphaBlend(WINEDC * dc_dst,INT x_dst,INT y_dst,INT width_dst,INT height_dst,HDC dc_src,INT x_src,INT y_src,INT width_src,INT height_src,BLENDFUNCTION func)394*fc16259fSJames Tabor BOOL EMFDRV_AlphaBlend( WINEDC *dc_dst, INT x_dst, INT y_dst, INT width_dst, INT height_dst,
395*fc16259fSJames Tabor HDC dc_src, INT x_src, INT y_src, INT width_src, INT height_src,
396*fc16259fSJames Tabor BLENDFUNCTION func )
397*fc16259fSJames Tabor {
398*fc16259fSJames Tabor /* FIXME: update bound rect */
399*fc16259fSJames Tabor return TRUE;
400*fc16259fSJames Tabor }
401*fc16259fSJames Tabor
EMFDRV_PatBlt(WINEDC * dc,INT left,INT top,INT width,INT height,DWORD rop)402*fc16259fSJames Tabor BOOL EMFDRV_PatBlt( WINEDC *dc, INT left, INT top, INT width, INT height, DWORD rop )
403*fc16259fSJames Tabor {
404*fc16259fSJames Tabor /* FIXME: update bound rect */
405*fc16259fSJames Tabor return TRUE;
406*fc16259fSJames Tabor }
407*fc16259fSJames Tabor
EMFDRV_StretchDIBits(WINEDC * dc,INT x_dst,INT y_dst,INT width_dst,INT height_dst,INT x_src,INT y_src,INT width_src,INT height_src,const void * bits,BITMAPINFO * info,UINT wUsage,DWORD dwRop)408*fc16259fSJames Tabor INT EMFDRV_StretchDIBits( WINEDC *dc, INT x_dst, INT y_dst, INT width_dst,
409*fc16259fSJames Tabor INT height_dst, INT x_src, INT y_src, INT width_src,
410*fc16259fSJames Tabor INT height_src, const void *bits, BITMAPINFO *info,
411*fc16259fSJames Tabor UINT wUsage, DWORD dwRop )
412*fc16259fSJames Tabor {
413*fc16259fSJames Tabor /* FIXME: Update bound rect */
414*fc16259fSJames Tabor return height_src;
415*fc16259fSJames Tabor }
416*fc16259fSJames Tabor
EMFDRV_SetDIBitsToDevice(WINEDC * dc,INT x_dst,INT y_dst,DWORD width,DWORD height,INT x_src,INT y_src,UINT startscan,UINT lines,const void * bits,BITMAPINFO * info,UINT usage)417*fc16259fSJames Tabor INT EMFDRV_SetDIBitsToDevice( WINEDC *dc, INT x_dst, INT y_dst, DWORD width,
418*fc16259fSJames Tabor DWORD height, INT x_src, INT y_src, UINT startscan,
419*fc16259fSJames Tabor UINT lines, const void *bits, BITMAPINFO *info,
420*fc16259fSJames Tabor UINT usage )
421*fc16259fSJames Tabor {
422*fc16259fSJames Tabor /* FIXME: Update bound rect */
423*fc16259fSJames Tabor return lines;
424*fc16259fSJames Tabor }
425*fc16259fSJames Tabor
EMFDRV_SelectBitmap(WINEDC * dc,HBITMAP hbitmap)426*fc16259fSJames Tabor HBITMAP EMFDRV_SelectBitmap( WINEDC *dc, HBITMAP hbitmap )
427*fc16259fSJames Tabor {
428*fc16259fSJames Tabor return 0;
429*fc16259fSJames Tabor }
430*fc16259fSJames Tabor
431