2 * DIBDRV implementation of GDI driver graphics functions
4 * Copyright 2009 Massimo Del Fedele
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
26 WINE_DEFAULT_DEBUG_CHANNEL(dibdrv
);
28 /***********************************************************************
31 BOOL
DIBDRV_Arc( DIBDRVPHYSDEV
*physDev
, INT left
, INT top
, INT right
, INT bottom
,
32 INT xstart
, INT ystart
, INT xend
, INT yend
)
36 TRACE("physDev:%p, left:%d, top:%d, right:%d, bottom:%d, xstart:%d, ystart:%d, xend:%d, yend:%d\n",
37 physDev
, left
, top
, right
, bottom
, xstart
, ystart
, xend
, yend
);
41 /* DIB section selected in, use DIB Engine */
42 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
43 res
= _DIBDRV_GetDisplayDriver()->pArc(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
44 xstart
, ystart
, xend
, yend
);
48 /* DDB selected in, use X11 driver */
49 res
= _DIBDRV_GetDisplayDriver()->pArc(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
50 xstart
, ystart
, xend
, yend
);
55 /***********************************************************************
58 BOOL
DIBDRV_Chord( DIBDRVPHYSDEV
*physDev
, INT left
, INT top
, INT right
, INT bottom
,
59 INT xstart
, INT ystart
, INT xend
, INT yend
)
63 TRACE("physDev:%p, left:%d, top:%d, right:%d, bottom:%d, xstart:%d, ystart:%d, xend:%d, yend:%d\n",
64 physDev
, left
, top
, right
, bottom
, xstart
, ystart
, xend
, yend
);
68 /* DIB section selected in, use DIB Engine */
69 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
70 res
= _DIBDRV_GetDisplayDriver()->pChord(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
71 xstart
, ystart
, xend
, yend
);
75 /* DDB selected in, use X11 driver */
76 res
= _DIBDRV_GetDisplayDriver()->pChord(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
77 xstart
, ystart
, xend
, yend
);
82 /***********************************************************************
85 BOOL
DIBDRV_Ellipse( DIBDRVPHYSDEV
*physDev
, INT left
, INT top
, INT right
, INT bottom
)
89 TRACE("physDev:%p, left:%d, top:%d, right:%d, bottom:%d\n",
90 physDev
, left
, top
, right
, bottom
);
94 /* DIB section selected in, use DIB Engine */
95 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
96 res
= _DIBDRV_GetDisplayDriver()->pEllipse(physDev
->X11PhysDev
, left
, top
, right
, bottom
);
100 /* DDB selected in, use X11 driver */
101 res
= _DIBDRV_GetDisplayDriver()->pEllipse(physDev
->X11PhysDev
, left
, top
, right
, bottom
);
106 /**********************************************************************
107 * DIBDRV_ExtFloodFill
109 BOOL
DIBDRV_ExtFloodFill( DIBDRVPHYSDEV
*physDev
, INT x
, INT y
, COLORREF color
,
114 TRACE("physDev:%p, x:%d, y:%d, color:%x, fillType:%d\n",
115 physDev
, x
, y
, color
, fillType
);
119 /* DIB section selected in, use DIB Engine */
120 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
121 res
= _DIBDRV_GetDisplayDriver()->pExtFloodFill(physDev
->X11PhysDev
, x
, y
, color
, fillType
);
125 /* DDB selected in, use X11 driver */
126 res
= _DIBDRV_GetDisplayDriver()->pExtFloodFill(physDev
->X11PhysDev
, x
, y
, color
, fillType
);
131 /***********************************************************************
134 BOOL
DIBDRV_GetDCOrgEx( DIBDRVPHYSDEV
*physDev
, LPPOINT lpp
)
138 TRACE("physDev:%p, lpp:%p\n", physDev
, lpp
);
142 /* DIB section selected in, use DIB Engine */
143 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
144 res
= _DIBDRV_GetDisplayDriver()->pGetDCOrgEx(physDev
->X11PhysDev
, lpp
);
148 /* DDB selected in, use X11 driver */
149 res
= _DIBDRV_GetDisplayDriver()->pGetDCOrgEx(physDev
->X11PhysDev
, lpp
);
154 /***********************************************************************
157 COLORREF
DIBDRV_GetPixel( DIBDRVPHYSDEV
*physDev
, INT x
, INT y
)
161 TRACE("physDev:%p, x:%d, y:%d\n", physDev
, x
, y
);
165 /* DIB section selected in, use DIB Engine */
166 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
167 res
= _DIBDRV_GetDisplayDriver()->pGetPixel(physDev
->X11PhysDev
, x
, y
);
171 /* DDB selected in, use X11 driver */
172 res
= _DIBDRV_GetDisplayDriver()->pGetPixel(physDev
->X11PhysDev
, x
, y
);
177 /***********************************************************************
180 BOOL
DIBDRV_LineTo( DIBDRVPHYSDEV
*physDev
, INT x
, INT y
)
184 TRACE("physDev:%p, x:%d, y:%d\n", physDev
, x
, y
);
188 /* DIB section selected in, use DIB Engine */
189 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
190 res
= _DIBDRV_GetDisplayDriver()->pLineTo(physDev
->X11PhysDev
, x
, y
);
194 /* DDB selected in, use X11 driver */
195 res
= _DIBDRV_GetDisplayDriver()->pLineTo(physDev
->X11PhysDev
, x
, y
);
200 /***********************************************************************
203 BOOL
DIBDRV_PaintRgn( DIBDRVPHYSDEV
*physDev
, HRGN hrgn
)
207 TRACE("physDev:%p, hrgn:%p\n", physDev
, hrgn
);
211 /* DIB section selected in, use DIB Engine */
212 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
213 res
= _DIBDRV_GetDisplayDriver()->pPaintRgn(physDev
->X11PhysDev
, hrgn
);
217 /* DDB selected in, use X11 driver */
218 res
= _DIBDRV_GetDisplayDriver()->pPaintRgn(physDev
->X11PhysDev
, hrgn
);
223 /***********************************************************************
226 BOOL
DIBDRV_Pie( DIBDRVPHYSDEV
*physDev
, INT left
, INT top
, INT right
, INT bottom
,
227 INT xstart
, INT ystart
, INT xend
, INT yend
)
231 TRACE("physDev:%p, left:%d, top:%d, right:%d, bottom:%d, xstart:%d, ystart:%d, xend:%d, yend:%d\n",
232 physDev
, left
, top
, right
, bottom
, xstart
, ystart
, xend
, yend
);
236 /* DIB section selected in, use DIB Engine */
237 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
238 res
= _DIBDRV_GetDisplayDriver()->pPie(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
239 xstart
, ystart
, xend
, yend
);
243 /* DDB selected in, use X11 driver */
244 res
= _DIBDRV_GetDisplayDriver()->pPie(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
245 xstart
, ystart
, xend
, yend
);
250 /**********************************************************************
253 BOOL
DIBDRV_Polygon( DIBDRVPHYSDEV
*physDev
, const POINT
* pt
, INT count
)
257 TRACE("physDev:%p, pt:%p, count:%d\n", physDev
, pt
, count
);
261 /* DIB section selected in, use DIB Engine */
262 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
263 res
= _DIBDRV_GetDisplayDriver()->pPolygon(physDev
->X11PhysDev
, pt
, count
);
267 /* DDB selected in, use X11 driver */
268 res
= _DIBDRV_GetDisplayDriver()->pPolygon(physDev
->X11PhysDev
, pt
, count
);
273 /**********************************************************************
276 BOOL
DIBDRV_Polyline( DIBDRVPHYSDEV
*physDev
, const POINT
* pt
, INT count
)
280 TRACE("physDev:%p, pt:%p, count:%d\n", physDev
, pt
, count
);
284 /* DIB section selected in, use DIB Engine */
285 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
286 res
= _DIBDRV_GetDisplayDriver()->pPolyline(physDev
->X11PhysDev
, pt
, count
);
290 /* DDB selected in, use X11 driver */
291 res
= _DIBDRV_GetDisplayDriver()->pPolyline(physDev
->X11PhysDev
, pt
, count
);
296 /**********************************************************************
299 BOOL
DIBDRV_PolyPolygon( DIBDRVPHYSDEV
*physDev
, const POINT
* pt
, const INT
* counts
, UINT polygons
)
303 TRACE("physDev:%p, pt:%p, counts:%p, polygons:%d\n", physDev
, pt
, counts
, polygons
);
307 /* DIB section selected in, use DIB Engine */
308 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
309 res
= _DIBDRV_GetDisplayDriver()->pPolyPolygon(physDev
->X11PhysDev
, pt
, counts
, polygons
);
313 /* DDB selected in, use X11 driver */
314 res
= _DIBDRV_GetDisplayDriver()->pPolyPolygon(physDev
->X11PhysDev
, pt
, counts
, polygons
);
319 /**********************************************************************
320 * DIBDRV_PolyPolyline
322 BOOL
DIBDRV_PolyPolyline( DIBDRVPHYSDEV
*physDev
, const POINT
* pt
, const DWORD
* counts
,
327 TRACE("physDev:%p, pt:%p, counts:%p, polylines:%d\n", physDev
, pt
, counts
, polylines
);
331 /* DIB section selected in, use DIB Engine */
332 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
333 res
= _DIBDRV_GetDisplayDriver()->pPolyPolyline(physDev
->X11PhysDev
, pt
, counts
, polylines
);
337 /* DDB selected in, use X11 driver */
338 res
= _DIBDRV_GetDisplayDriver()->pPolyPolyline(physDev
->X11PhysDev
, pt
, counts
, polylines
);
343 /***********************************************************************
346 BOOL
DIBDRV_Rectangle( DIBDRVPHYSDEV
*physDev
, INT left
, INT top
, INT right
, INT bottom
)
350 TRACE("physDev:%p, left:%d, top:%d, right:%d, bottom:%d\n",
351 physDev
, left
, top
, right
, bottom
);
355 /* DIB section selected in, use DIB Engine */
356 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
357 res
= _DIBDRV_GetDisplayDriver()->pRectangle(physDev
->X11PhysDev
, left
, top
, right
, bottom
);
361 /* DDB selected in, use X11 driver */
362 res
= _DIBDRV_GetDisplayDriver()->pRectangle(physDev
->X11PhysDev
, left
, top
, right
, bottom
);
367 /***********************************************************************
370 BOOL
DIBDRV_RoundRect( DIBDRVPHYSDEV
*physDev
, INT left
, INT top
, INT right
,
371 INT bottom
, INT ell_width
, INT ell_height
)
375 TRACE("physDev:%p, left:%d, top:%d, right:%d, bottom:%d, ell_width:%d, ell_height:%d\n",
376 physDev
, left
, top
, right
, bottom
, ell_width
, ell_height
);
380 /* DIB section selected in, use DIB Engine */
381 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
382 res
= _DIBDRV_GetDisplayDriver()->pRoundRect(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
383 ell_width
, ell_height
);
387 /* DDB selected in, use X11 driver */
388 res
= _DIBDRV_GetDisplayDriver()->pRoundRect(physDev
->X11PhysDev
, left
, top
, right
, bottom
,
389 ell_width
, ell_height
);
394 /***********************************************************************
397 COLORREF
DIBDRV_SetPixel( DIBDRVPHYSDEV
*physDev
, INT x
, INT y
, COLORREF color
)
401 TRACE("physDev:%p, x:%d, y:%d, color:%x\n", physDev
, x
, y
, color
);
405 /* DIB section selected in, use DIB Engine */
406 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
407 res
= _DIBDRV_GetDisplayDriver()->pSetPixel(physDev
->X11PhysDev
, x
, y
, color
);
411 /* DDB selected in, use X11 driver */
412 res
= _DIBDRV_GetDisplayDriver()->pSetPixel(physDev
->X11PhysDev
, x
, y
, color
);
417 /***********************************************************************
420 DWORD
DIBDRV_SetDCOrg( DIBDRVPHYSDEV
*physDev
, INT x
, INT y
)
424 TRACE("physDev:%p, x:%d, y:%d\n", physDev
, x
, y
);
428 /* DIB section selected in, use DIB Engine */
429 ONCE(FIXME("TEMPORARY - fallback to X11 driver\n"));
430 res
= _DIBDRV_GetDisplayDriver()->pSetDCOrg(physDev
->X11PhysDev
, x
, y
);
434 /* DDB selected in, use X11 driver */
435 res
= _DIBDRV_GetDisplayDriver()->pSetDCOrg(physDev
->X11PhysDev
, x
, y
);