ReactOS 0.4.15-dev-8116-gf69e256
path.c File Reference
#include <precomp.h>
#include "gdi_private.h"
#include <debug.h>
Include dependency graph for path.c:

Go to the source code of this file.

Classes

struct  path_physdev
 

Macros

#define NDEBUG
 

Functions

WINEDCget_nulldrv_dc (PHYSDEV dev)
 
static struct path_physdevget_path_physdev (PHYSDEV dev)
 
static BOOL pathdrv_BeginPath (PHYSDEV dev)
 
static BOOL pathdrv_AbortPath (PHYSDEV dev)
 
static BOOL pathdrv_EndPath (PHYSDEV dev)
 
static BOOL pathdrv_CreateDC (PHYSDEV *dev, LPCWSTR driver, LPCWSTR device, LPCWSTR output, const DEVMODEW *devmode)
 
static BOOL pathdrv_DeleteDC (PHYSDEV dev)
 
static BOOL pathdrv_MoveTo (PHYSDEV dev, INT x, INT y)
 
static BOOL pathdrv_LineTo (PHYSDEV dev, INT x, INT y)
 
static BOOL pathdrv_Rectangle (PHYSDEV dev, INT x1, INT y1, INT x2, INT y2)
 
static BOOL pathdrv_RoundRect (PHYSDEV dev, INT x1, INT y1, INT x2, INT y2, INT ell_width, INT ell_height)
 
static BOOL pathdrv_Ellipse (PHYSDEV dev, INT x1, INT y1, INT x2, INT y2)
 
static BOOL pathdrv_AngleArc (PHYSDEV dev, INT x, INT y, DWORD radius, FLOAT eStartAngle, FLOAT eSweepAngle)
 
static BOOL pathdrv_Arc (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
 
static BOOL pathdrv_ArcTo (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
 
static BOOL pathdrv_Chord (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
 
static BOOL pathdrv_Pie (PHYSDEV dev, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend)
 
static BOOL pathdrv_PolyBezierTo (PHYSDEV dev, const POINT *pts, DWORD cbPoints)
 
static BOOL pathdrv_PolyBezier (PHYSDEV dev, const POINT *pts, DWORD cbPoints)
 
static BOOL pathdrv_PolyDraw (PHYSDEV dev, const POINT *pts, const BYTE *types, DWORD cbPoints)
 
static BOOL pathdrv_Polyline (PHYSDEV dev, const POINT *pts, INT count)
 
static BOOL pathdrv_PolylineTo (PHYSDEV dev, const POINT *pts, INT count)
 
static BOOL pathdrv_Polygon (PHYSDEV dev, const POINT *pts, INT count)
 
static BOOL pathdrv_PolyPolygon (PHYSDEV dev, const POINT *pts, const INT *counts, UINT polygons)
 
static BOOL pathdrv_PolyPolyline (PHYSDEV dev, const POINT *pts, const DWORD *counts, DWORD polylines)
 
static BOOL pathdrv_ExtTextOut (PHYSDEV dev, INT x, INT y, UINT flags, const RECT *lprc, LPCWSTR str, UINT count, const INT *dx)
 
static BOOL pathdrv_CloseFigure (PHYSDEV dev)
 
BOOL nulldrv_BeginPath (PHYSDEV dev)
 
BOOL nulldrv_EndPath (PHYSDEV dev)
 
BOOL nulldrv_AbortPath (PHYSDEV dev)
 
BOOL nulldrv_CloseFigure (PHYSDEV dev)
 
BOOL nulldrv_SelectClipPath (PHYSDEV dev, INT mode)
 
BOOL nulldrv_FillPath (PHYSDEV dev)
 
BOOL nulldrv_StrokeAndFillPath (PHYSDEV dev)
 
BOOL nulldrv_StrokePath (PHYSDEV dev)
 
BOOL nulldrv_FlattenPath (PHYSDEV dev)
 
BOOL nulldrv_WidenPath (PHYSDEV dev)
 

Variables

const struct gdi_dc_funcs path_driver DECLSPEC_HIDDEN
 
const struct gdi_dc_funcs path_driver
 

Macro Definition Documentation

◆ NDEBUG

#define NDEBUG

Definition at line 10 of file path.c.

Function Documentation

◆ get_nulldrv_dc()

WINEDC * get_nulldrv_dc ( PHYSDEV  dev)

Referenced by nulldrv_BeginPath().

◆ get_path_physdev()

static struct path_physdev * get_path_physdev ( PHYSDEV  dev)
inlinestatic

Definition at line 23 of file path.c.

24{
25 return CONTAINING_RECORD( dev, struct path_physdev, dev );
26}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by nulldrv_BeginPath(), pathdrv_DeleteDC(), and pathdrv_EndPath().

◆ nulldrv_AbortPath()

BOOL nulldrv_AbortPath ( PHYSDEV  dev)

Definition at line 354 of file path.c.

355{
356 //DC *dc = get_nulldrv_dc( dev );
357 DPRINT("nulldrv_AbortPath dev %p\n",dev);
358 //if (dc->path) free_gdi_path( dc->path );
359 //dc->path = NULL;
360 return TRUE;
361}
#define TRUE
Definition: types.h:120
#define DPRINT
Definition: sndvol32.h:73

◆ nulldrv_BeginPath()

BOOL nulldrv_BeginPath ( PHYSDEV  dev)

Definition at line 331 of file path.c.

332{
333 DC *dc = get_nulldrv_dc( dev );
334 struct path_physdev *physdev;
335
336 if (!path_driver.pCreateDC( &dc->physDev, NULL, NULL, NULL, NULL ))
337 {
338 return FALSE;
339 }
340 physdev = get_path_physdev( find_dc_driver( dc, &path_driver ));
341 physdev->HasPathHook = TRUE;
342 DPRINT("nulldrv_BeginPath dev %p\n",dev);
343 DPRINT("nulldrv_BeginPath pd %p\n",physdev);
344 return TRUE;
345}
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
static const WCHAR dc[]
Definition: polytest.cpp:41
BOOL HasPathHook
Definition: path.c:20
static struct path_physdev * get_path_physdev(PHYSDEV dev)
Definition: path.c:23
const struct gdi_dc_funcs path_driver
Definition: path.c:440
WINEDC * get_nulldrv_dc(PHYSDEV dev)

◆ nulldrv_CloseFigure()

BOOL nulldrv_CloseFigure ( PHYSDEV  dev)

Definition at line 363 of file path.c.

364{
365 DPRINT("nulldrv_CloseFigure dev %p\n",dev);
367 return FALSE;
368}
#define SetLastError(x)
Definition: compat.h:752
#define ERROR_CAN_NOT_COMPLETE
Definition: winerror.h:582

◆ nulldrv_EndPath()

BOOL nulldrv_EndPath ( PHYSDEV  dev)

Definition at line 347 of file path.c.

348{
349 DPRINT("nulldrv_EndPath dev %p\n",dev);
351 return FALSE;
352}

◆ nulldrv_FillPath()

BOOL nulldrv_FillPath ( PHYSDEV  dev)

Definition at line 384 of file path.c.

385{
386 DPRINT("nulldrv_FillPath dev %p\n",dev);
387 //if (GetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE;
388 //AbortPath( dev->hdc );
389 return TRUE;
390}

◆ nulldrv_FlattenPath()

BOOL nulldrv_FlattenPath ( PHYSDEV  dev)

Definition at line 408 of file path.c.

409{
410/* DC *dc = get_nulldrv_dc( dev );
411 struct gdi_path *path; */
412 DPRINT("nulldrv_FlattenPath dev %p\n",dev);
413/* if (!dc->path)
414 {
415 SetLastError( ERROR_CAN_NOT_COMPLETE );
416 return FALSE;
417 }
418 if (!(path = PATH_FlattenPath( dc->path ))) return FALSE;
419 free_gdi_path( dc->path );
420 dc->path = path;*/
421 return TRUE;
422}

◆ nulldrv_SelectClipPath()

BOOL nulldrv_SelectClipPath ( PHYSDEV  dev,
INT  mode 
)

Definition at line 370 of file path.c.

371{
372 BOOL ret = FALSE;
373 HRGN hrgn = PathToRegion( dev->hdc );
374 DPRINT("nulldrv_SelectClipPath dev %p\n",dev);
375 if (hrgn)
376 {
377 ret = ExtSelectClipRgn( dev->hdc, hrgn, mode ) != ERROR;
379 }
380 return ret;
381// return TRUE;
382}
static HRGN hrgn
#define ERROR(name)
Definition: error_private.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
pKey DeleteObject()
GLenum mode
Definition: glext.h:6217
int ret
HRGN WINAPI PathToRegion(_In_ HDC)
int WINAPI ExtSelectClipRgn(_In_ HDC, _In_opt_ HRGN, _In_ int)

◆ nulldrv_StrokeAndFillPath()

BOOL nulldrv_StrokeAndFillPath ( PHYSDEV  dev)

Definition at line 392 of file path.c.

393{
394 DPRINT("nulldrv_StrokeAndFillPath dev %p\n",dev);
395 //if (GetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE;
396 //AbortPath( dev->hdc );
397 return TRUE;
398}

◆ nulldrv_StrokePath()

BOOL nulldrv_StrokePath ( PHYSDEV  dev)

Definition at line 400 of file path.c.

401{
402 DPRINT("nulldrv_StrokePath dev %p\n",dev);
403 //if (GetPath( dev->hdc, NULL, NULL, 0 ) == -1) return FALSE;
404 //AbortPath( dev->hdc );
405 return TRUE;
406}

◆ nulldrv_WidenPath()

BOOL nulldrv_WidenPath ( PHYSDEV  dev)

Definition at line 424 of file path.c.

425{
426/* DC *dc = get_nulldrv_dc( dev );
427 struct gdi_path *path;*/
428 DPRINT("nulldrv_WidenPath dev %p\n",dev);
429/* if (!dc->path)
430 {
431 SetLastError( ERROR_CAN_NOT_COMPLETE );
432 return FALSE;
433 }
434 if (!(path = PATH_WidenPath( dc ))) return FALSE;
435 free_gdi_path( dc->path );
436 dc->path = path;*/
437 return TRUE;
438}

◆ pathdrv_AbortPath()

static BOOL pathdrv_AbortPath ( PHYSDEV  dev)
static

Definition at line 41 of file path.c.

42{
43 DC *dc = get_physdev_dc( dev );
44 DPRINT("pathdrv_AbortPath dev %p\n",dev);
45 path_driver.pDeleteDC( pop_dc_driver( dc, &path_driver ));
46 return TRUE;
47}

◆ pathdrv_AngleArc()

static BOOL pathdrv_AngleArc ( PHYSDEV  dev,
INT  x,
INT  y,
DWORD  radius,
FLOAT  eStartAngle,
FLOAT  eSweepAngle 
)
static

Definition at line 154 of file path.c.

155{
156 DPRINT("pathdrv_AngleArc dev %p\n",dev);
157 return TRUE;
158}

◆ pathdrv_Arc()

static BOOL pathdrv_Arc ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)
static

Definition at line 164 of file path.c.

166{
167// DC *dc = get_physdev_dc( dev );
168 DPRINT("pathdrv_Arc dev %p\n",dev);
169 return TRUE;
170}

◆ pathdrv_ArcTo()

static BOOL pathdrv_ArcTo ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)
static

Definition at line 176 of file path.c.

178{
179// DC *dc = get_physdev_dc( dev );
180 DPRINT("pathdrv_ArcTo dev %p\n",dev);
181 return TRUE;
182}

◆ pathdrv_BeginPath()

static BOOL pathdrv_BeginPath ( PHYSDEV  dev)
static

Definition at line 31 of file path.c.

32{
33 DPRINT("pathdrv_BeginPath dev %p\n",dev);
34 return TRUE;
35}

◆ pathdrv_Chord()

static BOOL pathdrv_Chord ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)
static

Definition at line 188 of file path.c.

190{
191// DC *dc = get_physdev_dc( dev );
192 DPRINT("pathdrv_Chord dev %p\n",dev);
193 return TRUE;
194}

◆ pathdrv_CloseFigure()

static BOOL pathdrv_CloseFigure ( PHYSDEV  dev)
static

Definition at line 319 of file path.c.

320{
321// struct path_physdev *physdev = get_path_physdev( dev );
322 DPRINT("pathdrv_CloseFigure dev %p\n",dev);
323 return TRUE;
324}

◆ pathdrv_CreateDC()

static BOOL pathdrv_CreateDC ( PHYSDEV dev,
LPCWSTR  driver,
LPCWSTR  device,
LPCWSTR  output,
const DEVMODEW devmode 
)
static

Definition at line 70 of file path.c.

72{
73 struct path_physdev *physdev = HeapAlloc( GetProcessHeap(), 0, sizeof(*physdev) );
74 DPRINT("pathdrv_CreateDC dev %p\n",dev);
75 if (!physdev) return FALSE;
76 push_dc_driver( dev, &physdev->dev, &path_driver );
77 return TRUE;
78}
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
struct gdi_physdev dev
Definition: path.c:18

◆ pathdrv_DeleteDC()

static BOOL pathdrv_DeleteDC ( PHYSDEV  dev)
static

Definition at line 84 of file path.c.

85{
86 struct path_physdev *physdev = get_path_physdev( dev );
87 DPRINT("pathdrv_DeleteDC dev %p\n",dev);
88 HeapFree( GetProcessHeap(), 0, physdev );
89 return TRUE;
90}
#define HeapFree(x, y, z)
Definition: compat.h:735

◆ pathdrv_Ellipse()

static BOOL pathdrv_Ellipse ( PHYSDEV  dev,
INT  x1,
INT  y1,
INT  x2,
INT  y2 
)
static

Definition at line 143 of file path.c.

144{
145// struct path_physdev *physdev = get_path_physdev( dev );
146// DC *dc = get_physdev_dc( dev );
147 DPRINT("pathdrv_Ellipse dev %p\n",dev);
148 return TRUE;
149}

◆ pathdrv_EndPath()

static BOOL pathdrv_EndPath ( PHYSDEV  dev)
static

Definition at line 53 of file path.c.

54{
55 struct path_physdev *physdev = get_path_physdev( dev );
56 DC *dc = get_physdev_dc( dev );
57
58 DPRINT("pathdrv_EndPath dev %p\n",dev);
59
60 pop_dc_driver( dc, &path_driver );
61 HeapFree( GetProcessHeap(), 0, physdev );
62
63 return TRUE;
64}

◆ pathdrv_ExtTextOut()

static BOOL pathdrv_ExtTextOut ( PHYSDEV  dev,
INT  x,
INT  y,
UINT  flags,
const RECT lprc,
LPCWSTR  str,
UINT  count,
const INT dx 
)
static

Definition at line 308 of file path.c.

310{
311// struct path_physdev *physdev = get_path_physdev( dev );
312 DPRINT("pathdrv_ExtTextOut dev %p\n",dev);
313 return TRUE;
314}

◆ pathdrv_LineTo()

static BOOL pathdrv_LineTo ( PHYSDEV  dev,
INT  x,
INT  y 
)
static

Definition at line 107 of file path.c.

108{
109// struct path_physdev *physdev = get_path_physdev( dev );
110// DC *dc = get_physdev_dc( dev );
111 DPRINT("pathdrv_LineTo dev %p\n",dev);
112 return TRUE;
113}

◆ pathdrv_MoveTo()

static BOOL pathdrv_MoveTo ( PHYSDEV  dev,
INT  x,
INT  y 
)
static

Definition at line 95 of file path.c.

96{
97// struct path_physdev *physdev = get_path_physdev( dev );
98// DC *dc = get_physdev_dc( dev );
99 DPRINT("pathdrv_MoveTo dev %p\n",dev);
100 return TRUE;
101}

◆ pathdrv_Pie()

static BOOL pathdrv_Pie ( PHYSDEV  dev,
INT  left,
INT  top,
INT  right,
INT  bottom,
INT  xstart,
INT  ystart,
INT  xend,
INT  yend 
)
static

Definition at line 200 of file path.c.

202{
203// DC *dc = get_physdev_dc( dev );
204 DPRINT("pathdrv_Pie dev %p\n",dev);
205 return TRUE;
206}

◆ pathdrv_PolyBezier()

static BOOL pathdrv_PolyBezier ( PHYSDEV  dev,
const POINT pts,
DWORD  cbPoints 
)
static

Definition at line 224 of file path.c.

225{
226// struct path_physdev *physdev = get_path_physdev( dev );
227// DC *dc = get_physdev_dc( dev );
228 DPRINT("pathdrv_PolyBezier dev %p\n",dev);
229 return TRUE;
230}

◆ pathdrv_PolyBezierTo()

static BOOL pathdrv_PolyBezierTo ( PHYSDEV  dev,
const POINT pts,
DWORD  cbPoints 
)
static

Definition at line 212 of file path.c.

213{
214// struct path_physdev *physdev = get_path_physdev( dev );
215// DC *dc = get_physdev_dc( dev );
216 DPRINT("pathdrv_PolyBezierTo dev %p\n",dev);
217 return TRUE;
218}

◆ pathdrv_PolyDraw()

static BOOL pathdrv_PolyDraw ( PHYSDEV  dev,
const POINT pts,
const BYTE types,
DWORD  cbPoints 
)
static

Definition at line 236 of file path.c.

237{
238// struct path_physdev *physdev = get_path_physdev( dev );
239// DC *dc = get_physdev_dc( dev );
240 DPRINT("pathdrv_PolyDraw dev %p\n",dev);
241 return TRUE;
242}

◆ pathdrv_Polygon()

static BOOL pathdrv_Polygon ( PHYSDEV  dev,
const POINT pts,
INT  count 
)
static

Definition at line 272 of file path.c.

273{
274// struct path_physdev *physdev = get_path_physdev( dev );
275// DC *dc = get_physdev_dc( dev );
276 DPRINT("pathdrv_Polygon dev %p\n",dev);
277 return TRUE;
278}

◆ pathdrv_Polyline()

static BOOL pathdrv_Polyline ( PHYSDEV  dev,
const POINT pts,
INT  count 
)
static

Definition at line 248 of file path.c.

249{
250// struct path_physdev *physdev = get_path_physdev( dev );
251// DC *dc = get_physdev_dc( dev );
252 DPRINT("pathdrv_PolyLine dev %p\n",dev);
253 return TRUE;
254}

◆ pathdrv_PolylineTo()

static BOOL pathdrv_PolylineTo ( PHYSDEV  dev,
const POINT pts,
INT  count 
)
static

Definition at line 260 of file path.c.

261{
262// struct path_physdev *physdev = get_path_physdev( dev );
263// DC *dc = get_physdev_dc( dev );
264 DPRINT("pathdrv_PolyLineTo dev %p\n",dev);
265 return TRUE;
266}

◆ pathdrv_PolyPolygon()

static BOOL pathdrv_PolyPolygon ( PHYSDEV  dev,
const POINT pts,
const INT counts,
UINT  polygons 
)
static

Definition at line 284 of file path.c.

285{
286// struct path_physdev *physdev = get_path_physdev( dev );
287// DC *dc = get_physdev_dc( dev );
288 DPRINT("pathdrv_PolyPolygon dev %p\n",dev);
289 return TRUE;
290}

◆ pathdrv_PolyPolyline()

static BOOL pathdrv_PolyPolyline ( PHYSDEV  dev,
const POINT pts,
const DWORD counts,
DWORD  polylines 
)
static

Definition at line 296 of file path.c.

297{
298// struct path_physdev *physdev = get_path_physdev( dev );
299// DC *dc = get_physdev_dc( dev );
300 DPRINT("pathdrv_PolyPolyline dev %p\n",dev);
301 return TRUE;
302}

◆ pathdrv_Rectangle()

static BOOL pathdrv_Rectangle ( PHYSDEV  dev,
INT  x1,
INT  y1,
INT  x2,
INT  y2 
)
static

Definition at line 119 of file path.c.

120{
121// struct path_physdev *physdev = get_path_physdev( dev );
122// DC *dc = get_physdev_dc( dev );
123 DPRINT("pathdrv_Rectangle dev %p\n",dev);
124 return TRUE;
125}

◆ pathdrv_RoundRect()

static BOOL pathdrv_RoundRect ( PHYSDEV  dev,
INT  x1,
INT  y1,
INT  x2,
INT  y2,
INT  ell_width,
INT  ell_height 
)
static

Definition at line 131 of file path.c.

132{
133// struct path_physdev *physdev = get_path_physdev( dev );
134// DC *dc = get_physdev_dc( dev );
135 DPRINT("pathdrv_RoundRect dev %p\n",dev);
136 return TRUE;
137}

Variable Documentation

◆ DECLSPEC_HIDDEN

Definition at line 14 of file path.c.

◆ path_driver

const struct gdi_dc_funcs path_driver

Definition at line 440 of file path.c.

Referenced by nulldrv_BeginPath(), pathdrv_AbortPath(), pathdrv_CreateDC(), and pathdrv_EndPath().