ReactOS  0.4.15-dev-1177-g6cb3b62
graphicspath.c File Reference
#include "objbase.h"
#include "gdiplus.h"
#include "wine/test.h"
#include <math.h>
Include dependency graph for graphicspath.c:

Go to the source code of this file.

Classes

struct  path_test_t
 

Macros

#define expect(expected, got)   ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
 
#define expectf(expected, got)   ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got)
 
#define POINT_TYPE_MAX_LEN   (75)
 

Functions

static void stringify_point_type (PathPointType type, char *name)
 
static void ok_path (GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
 
static void test_constructor_destructor (void)
 
static void test_getpathdata (void)
 
static void test_line2 (void)
 
static void test_arc (void)
 
static void test_worldbounds (void)
 
static void test_pathpath (void)
 
static void test_ellipse (void)
 
static void test_linei (void)
 
static void test_polygon (void)
 
static void test_rect (void)
 
static void test_lastpoint (void)
 
static void test_addcurve (void)
 
static void test_addclosedcurve (void)
 
static void test_reverse (void)
 
static void test_addpie (void)
 
static void test_flatten (void)
 
static void test_widen (void)
 
static void test_isvisible (void)
 
static void test_empty_rect (void)
 
 START_TEST (graphicspath)
 

Variables

static path_test_t line2_path []
 
static path_test_t arc_path []
 
static path_test_t pathpath_path []
 
static path_test_t ellipse_path []
 
static path_test_t linei_path []
 
static path_test_t poly_path []
 
static path_test_t rect_path []
 
static path_test_t addcurve_path []
 
static path_test_t addcurve_path2 []
 
static path_test_t addcurve_path3 []
 
static path_test_t addclosedcurve_path []
 
static path_test_t reverse_path []
 
static path_test_t addpie_path []
 
static path_test_t addpie_path2 []
 
static path_test_t addpie_path3 []
 
static path_test_t flattenellipse_path []
 
static path_test_t flattenline_path []
 
static path_test_t flattenarc_path []
 
static path_test_t flattenquater_path []
 
static path_test_t widenline_path []
 
static path_test_t widenline_wide_path []
 
static path_test_t widenline_dash_path []
 

Macro Definition Documentation

◆ expect

#define expect (   expected,
  got 
)    ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)

Definition at line 26 of file graphicspath.c.

◆ expectf

#define expectf (   expected,
  got 
)    ok(fabs(expected - got) < 2.0, "Expected %.2f, got %.2f\n", expected, got)

Definition at line 27 of file graphicspath.c.

◆ POINT_TYPE_MAX_LEN

#define POINT_TYPE_MAX_LEN   (75)

Definition at line 28 of file graphicspath.c.

Function Documentation

◆ ok_path()

static void ok_path ( GpPath path,
const path_test_t expected,
INT  expected_size,
BOOL  todo_size 
)
static

Definition at line 78 of file graphicspath.c.

79 {
80  BYTE * types;
81  INT size, idx = 0, eidx = 0, numskip;
82  GpPointF * points;
84 
85  if(GdipGetPointCount(path, &size) != Ok){
86  skip("Cannot perform path comparisons due to failure to retrieve path.\n");
87  return;
88  }
89 
90  todo_wine_if (todo_size)
91  ok(size == expected_size, "Path size %d does not match expected size %d\n",
92  size, expected_size);
93 
94  points = HeapAlloc(GetProcessHeap(), 0, size * sizeof(GpPointF));
96 
98  skip("Cannot perform path comparisons due to failure to retrieve path.\n");
99  goto end;
100  }
101 
102  numskip = expected_size ? expected[eidx].wine_only_entries_preceding : 0;
103  while (idx < size && eidx < expected_size){
104  /* We allow a few pixels fudge in matching X and Y coordinates to account for imprecision in
105  * floating point to integer conversion */
106  BOOL match = (types[idx] == expected[eidx].type) &&
107  fabs(points[idx].X - expected[eidx].X) <= 2.0 &&
108  fabs(points[idx].Y - expected[eidx].Y) <= 2.0;
109 
110  stringify_point_type(expected[eidx].type, ename);
112 
113  todo_wine_if (expected[eidx].todo || numskip)
114  ok(match, "Expected #%d: %s (%.1f,%.1f) but got %s (%.1f,%.1f)\n", eidx,
115  ename, expected[eidx].X, expected[eidx].Y,
116  name, points[idx].X, points[idx].Y);
117 
118  if (match || expected[eidx].todo != 2)
119  idx++;
120  if (match || !numskip--)
121  numskip = expected[++eidx].wine_only_entries_preceding;
122  }
123 
124 end:
127 }
#define Y(I)
Definition: match.c:28
GLsizei GLenum GLenum * types
Definition: glext.h:7753
BOOL todo
Definition: filedlg.c:313
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
int32_t INT
Definition: typedefs.h:58
GpStatus WINGDIPAPI GdipGetPathTypes(GpPath *path, BYTE *types, INT count)
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned int idx
Definition: utils.c:41
GpStatus WINGDIPAPI GdipGetPathPoints(GpPath *path, GpPointF *points, INT count)
#define todo_wine_if(is_todo)
Definition: test.h:163
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:484
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
Definition: cmds.c:130
#define POINT_TYPE_MAX_LEN
Definition: graphicspath.c:28
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
GLsizei const GLfloat * points
Definition: glext.h:8112
unsigned char BYTE
Definition: xxhash.c:193
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
#define ok(value,...)
Definition: atltest.h:57
static void stringify_point_type(PathPointType type, char *name)
Definition: graphicspath.c:30
#define skip(...)
Definition: atltest.h:64
Definition: name.c:38
#define HeapFree(x, y, z)
Definition: compat.h:483
BOOL expected
Definition: store.c:2063

Referenced by test_addclosedcurve(), test_addcurve(), test_addpie(), test_arc(), test_ellipse(), test_flatten(), test_line2(), test_linei(), test_pathpath(), test_polygon(), test_rect(), test_reverse(), and test_widen().

◆ START_TEST()

START_TEST ( graphicspath  )

Definition at line 1352 of file graphicspath.c.

1353 {
1356  HMODULE hmsvcrt;
1357  int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
1358 
1359  /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
1360  hmsvcrt = LoadLibraryA("msvcrt");
1361  _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
1362  if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
1363 
1364  gdiplusStartupInput.GdiplusVersion = 1;
1365  gdiplusStartupInput.DebugEventCallback = NULL;
1366  gdiplusStartupInput.SuppressBackgroundThread = 0;
1367  gdiplusStartupInput.SuppressExternalCodecs = 0;
1368 
1370 
1372  test_getpathdata();
1373  test_line2();
1374  test_arc();
1375  test_worldbounds();
1376  test_pathpath();
1377  test_ellipse();
1378  test_linei();
1379  test_rect();
1380  test_polygon();
1381  test_lastpoint();
1382  test_addcurve();
1384  test_reverse();
1385  test_addpie();
1386  test_flatten();
1387  test_widen();
1388  test_isvisible();
1389  test_empty_rect();
1390 
1392 }
static void test_isvisible(void)
static void test_linei(void)
Definition: graphicspath.c:553
static void test_arc(void)
Definition: graphicspath.c:256
static void test_addclosedcurve(void)
Definition: graphicspath.c:817
static void test_reverse(void)
Definition: graphicspath.c:861
static void test_addcurve(void)
Definition: graphicspath.c:729
static void test_addpie(void)
Definition: graphicspath.c:907
static void test_ellipse(void)
Definition: graphicspath.c:511
static void test_lastpoint(void)
Definition: graphicspath.c:669
static void test_polygon(void)
Definition: graphicspath.c:583
uint32_t ULONG_PTR
Definition: typedefs.h:65
GLenum GLint GLuint mask
Definition: glext.h:6028
static void test_empty_rect(void)
static void test_widen(void)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
static void test_getpathdata(void)
Definition: graphicspath.c:145
smooth NULL
Definition: ftsmooth.c:416
int CDECL _controlfp_s(unsigned int *cur, unsigned int newval, unsigned int mask)
Definition: cntrlfp.c:120
static void test_pathpath(void)
Definition: graphicspath.c:445
void WINAPI GdiplusShutdown(ULONG_PTR)
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
Definition: gdiplus.c:81
static void test_rect(void)
Definition: graphicspath.c:634
static void test_flatten(void)
Definition: graphicspath.c:994
Gdiplus::GdiplusStartupInput gdiplusStartupInput
Definition: winmain.cpp:38
ULONG_PTR gdiplusToken
Definition: winmain.cpp:39
#define CDECL
Definition: compat.h:29
static void test_line2(void)
Definition: graphicspath.c:188
static void test_constructor_destructor(void)
Definition: graphicspath.c:129
#define GetProcAddress(x, y)
Definition: compat.h:501
static void test_worldbounds(void)
Definition: graphicspath.c:286
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31

◆ stringify_point_type()

static void stringify_point_type ( PathPointType  type,
char name 
)
static

Definition at line 30 of file graphicspath.c.

31 {
32  *name = '\0';
33 
35  case PathPointTypeStart:
36  strcat(name, "PathPointTypeStart");
37  break;
38  case PathPointTypeLine:
39  strcat(name, "PathPointTypeLine");
40  break;
42  strcat(name, "PathPointTypeBezier");
43  break;
44  default:
45  strcat(name, "Unknown type");
46  return;
47  }
48 
51  *name = '\0';
52  strcat(name, "Unknown type");
53  return;
54  }
55 
57  strcat(name, " | PathPointTypePathMarker");
59  strcat(name, " | PathPointTypeCloseSubpath");
60 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: name.c:38

Referenced by ok_path().

◆ test_addclosedcurve()

static void test_addclosedcurve ( void  )
static

Definition at line 817 of file graphicspath.c.

818 {
820  GpPath *path;
821  GpPointF points[4];
822 
823  points[0].X = 0.0;
824  points[0].Y = 0.0;
825  points[1].X = 10.0;
826  points[1].Y = 10.0;
827  points[2].X = 10.0;
828  points[2].Y = 20.0;
829  points[3].X = 30.0;
830  points[3].Y = 10.0;
831 
833 
834  /* NULL args */
843 
844  /* add to empty path */
846  expect(Ok, status);
849 }
GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
Definition: graphicspath.c:362
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
GLsizei const GLfloat * points
Definition: glext.h:8112
static path_test_t addclosedcurve_path[]
Definition: graphicspath.c:802
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_addcurve()

static void test_addcurve ( void  )
static

Definition at line 729 of file graphicspath.c.

730 {
732  GpPath *path;
733  GpPointF points[4];
734 
735  points[0].X = 0.0;
736  points[0].Y = 0.0;
737  points[1].X = 10.0;
738  points[1].Y = 10.0;
739  points[2].X = 10.0;
740  points[2].Y = 20.0;
741  points[3].X = 30.0;
742  points[3].Y = 10.0;
743 
745 
746  /* NULL args */
747  status = GdipAddPathCurve2(NULL, NULL, 0, 0.0);
749  status = GdipAddPathCurve2(path, NULL, 0, 0.0);
751  status = GdipAddPathCurve2(path, points, -1, 0.0);
753  status = GdipAddPathCurve2(path, points, 1, 1.0);
755 
756  /* add to empty path */
757  status = GdipAddPathCurve2(path, points, 4, 1.0);
758  expect(Ok, status);
761 
762  /* add to notempty path and opened figure */
764  GdipAddPathLine(path, 100.0, 120.0, 123.0, 10.0);
765  status = GdipAddPathCurve2(path, points, 4, 1.0);
766  expect(Ok, status);
768 
769  /* NULL args */
771  status = GdipAddPathCurve3(NULL, NULL, 0, 0, 0, 0.0);
773  status = GdipAddPathCurve3(path, NULL, 0, 0, 0, 0.0);
775  /* wrong count, offset.. */
776  status = GdipAddPathCurve3(path, points, 0, 0, 0, 0.0);
778  status = GdipAddPathCurve3(path, points, 4, 0, 0, 0.0);
780  status = GdipAddPathCurve3(path, points, 4, 0, 4, 0.0);
782  status = GdipAddPathCurve3(path, points, 4, 1, 3, 0.0);
784  status = GdipAddPathCurve3(path, points, 4, 1, 0, 0.0);
786  status = GdipAddPathCurve3(path, points, 4, 3, 1, 0.0);
788 
789  /* use all points */
790  status = GdipAddPathCurve3(path, points, 4, 0, 3, 1.0);
791  expect(Ok, status);
794 
795  status = GdipAddPathCurve3(path, points, 4, 1, 2, 1.0);
796  expect(Ok, status);
798 
800 }
static path_test_t addcurve_path2[]
Definition: graphicspath.c:706
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
GLsizei const GLfloat * points
Definition: glext.h:8112
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
Definition: graphicspath.c:480
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define ARRAY_SIZE(a)
Definition: main.h:24
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Definition: graphicspath.c:704
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
#define expect(expected, got)
Definition: graphicspath.c:26
GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, INT count, INT offset, INT nseg, REAL tension)
Definition: graphicspath.c:561
static path_test_t addcurve_path[]
Definition: graphicspath.c:694
static SERVICE_STATUS status
Definition: service.c:31
static path_test_t addcurve_path3[]
Definition: graphicspath.c:720
Definition: ps.c:97

Referenced by START_TEST().

◆ test_addpie()

static void test_addpie ( void  )
static

Definition at line 907 of file graphicspath.c.

908 {
910  GpPath *path;
911 
913 
914  /* NULL argument */
915  status = GdipAddPathPie(NULL, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
917 
918  status = GdipAddPathPie(path, 0.0, 0.0, 100.0, 50.0, 10.0, 50.0);
919  expect(Ok, status);
922  expect(Ok, status);
923 
924  /* zero width base ellipse */
925  status = GdipAddPathPie(path, 0.0, 0.0, 0.0, 60.0, -90.0, 24.0);
929  expect(Ok, status);
930 
931  /* zero height base ellipse */
932  status = GdipAddPathPie(path, 0.0, 0.0, 60.0, 0.0 , -90.0, 24.0);
935 
937 }
static path_test_t addpie_path2[]
Definition: graphicspath.c:901
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
static path_test_t addpie_path[]
Definition: graphicspath.c:894
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
#define ARRAY_SIZE(a)
Definition: main.h:24
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
#define expect(expected, got)
Definition: graphicspath.c:26
GpStatus WINGDIPAPI GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:776
static SERVICE_STATUS status
Definition: service.c:31
static path_test_t addpie_path3[]
Definition: graphicspath.c:904
Definition: ps.c:97

Referenced by START_TEST().

◆ test_arc()

static void test_arc ( void  )
static

Definition at line 256 of file graphicspath.c.

257 {
259  GpPath* path;
260 
262  /* Exactly 90 degrees */
263  status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 90.0);
264  expect(Ok, status);
265  /* Over 90 degrees */
266  status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
267  expect(Ok, status);
268  /* Negative start angle */
269  status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0);
270  expect(Ok, status);
271  /* Negative sweep angle */
272  status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 80.0, -100.0);
273  expect(Ok, status);
274  /* More than a full revolution */
275  status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, -400.0);
276  expect(Ok, status);
277  /* 0 sweep angle */
278  status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, 0.0);
279  expect(Ok, status);
280 
282 
284 }
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:195
#define FALSE
Definition: types.h:117
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
#define ARRAY_SIZE(a)
Definition: main.h:24
static path_test_t arc_path[]
Definition: graphicspath.c:215
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_constructor_destructor()

static void test_constructor_destructor ( void  )
static

Definition at line 129 of file graphicspath.c.

130 {
132  GpPath* path = NULL;
133 
135  expect(Ok, status);
136  ok(path != NULL, "Expected path to be initialized\n");
137 
140 
142  expect(Ok, status);
143 }
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
smooth NULL
Definition: ftsmooth.c:416
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
#define ok(value,...)
Definition: atltest.h:57
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_ellipse()

static void test_ellipse ( void  )
static

Definition at line 511 of file graphicspath.c.

512 {
514  GpPath *path;
515  GpPointF points[2];
516 
517  points[0].X = 7.0;
518  points[0].Y = 11.0;
519  points[1].X = 13.0;
520  points[1].Y = 17.0;
521 
523  status = GdipAddPathEllipse(path, 10.0, 100.0, 20.0, 50.5);
524  expect(Ok, status);
526  status = GdipAddPathEllipse(path, 10.0, 200.0, -5.0, -10.0);
527  expect(Ok, status);
529  status = GdipAddPathEllipse(path, 10.0, 300.0, 0.0, 1.0);
530  expect(Ok, status);
531 
533 
535 }
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
#define FALSE
Definition: types.h:117
static path_test_t ellipse_path[]
Definition: graphicspath.c:467
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:623
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
GLsizei const GLfloat * points
Definition: glext.h:8112
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Definition: graphicspath.c:583
Definition: ps.c:97

Referenced by START_TEST().

◆ test_empty_rect()

static void test_empty_rect ( void  )
static

Definition at line 1300 of file graphicspath.c.

1301 {
1302  GpPath *path;
1303  GpStatus status;
1304  INT count;
1305  BOOL result;
1306 
1308  expect(Ok, status);
1309 
1310  status = GdipAddPathRectangle(path, 0.0, 0.0, -5.0, 5.0);
1311  expect(Ok, status);
1312 
1314  expect(Ok, status);
1315  expect(0, count);
1316 
1317  status = GdipIsVisiblePathPoint(path, -2.0, 2.0, NULL, &result);
1318  expect(Ok, status);
1319  expect(FALSE, result);
1320 
1321  status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, -5.0);
1322  expect(Ok, status);
1323 
1325  expect(Ok, status);
1326  expect(0, count);
1327 
1328  status = GdipAddPathRectangle(path, 0.0, 0.0, 0.0, 5.0);
1329  expect(Ok, status);
1330 
1332  expect(Ok, status);
1333  expect(0, count);
1334 
1335  status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, 0.0);
1336  expect(Ok, status);
1337 
1339  expect(Ok, status);
1340  expect(0, count);
1341 
1342  status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, 0.1);
1343  expect(Ok, status);
1344 
1346  expect(Ok, status);
1347  expect(4, count);
1348 
1350 }
GLsizei const GLchar ** path
Definition: glext.h:7234
GLuint GLuint GLsizei count
Definition: gl.h:1545
int32_t INT
Definition: typedefs.h:58
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath *path, REAL x, REAL y, GpGraphics *graphics, BOOL *result)
#define expect(expected, got)
Definition: graphicspath.c:26
GLuint64EXT * result
Definition: glext.h:11304
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_flatten()

static void test_flatten ( void  )
static

Definition at line 994 of file graphicspath.c.

995 {
997  GpPath *path;
998  GpMatrix *m;
999 
1001  expect(Ok, status);
1003  expect(Ok, status);
1004 
1005  /* NULL arguments */
1006  status = GdipFlattenPath(NULL, NULL, 0.0);
1008  status = GdipFlattenPath(NULL, m, 0.0);
1010 
1011  /* flatten empty path */
1012  status = GdipFlattenPath(path, NULL, 1.0);
1013  expect(Ok, status);
1014 
1016  expect(Ok, status);
1017 
1018  status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0);
1019  expect(Ok, status);
1020 
1021  status = GdipFlattenPath(path, NULL, 1.0);
1022  expect(Ok, status);
1024 
1026  expect(Ok, status);
1027  status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 100.0);
1028  expect(Ok, status);
1029  status = GdipFlattenPath(path, NULL, 1.0);
1030  expect(Ok, status);
1032 
1034  expect(Ok, status);
1035  status = GdipAddPathArc(path, 0.0, 0.0, 100.0, 50.0, 0.0, 90.0);
1036  expect(Ok, status);
1037  status = GdipFlattenPath(path, NULL, 1.0);
1038  expect(Ok, status);
1040 
1041  /* easy case - quater of a full circle */
1043  expect(Ok, status);
1044  status = GdipAddPathArc(path, 0.0, 0.0, 100.0, 100.0, 0.0, 90.0);
1045  expect(Ok, status);
1046  status = GdipFlattenPath(path, NULL, 1.0);
1047  expect(Ok, status);
1049 
1052 }
static path_test_t flattenarc_path[]
Definition: graphicspath.c:972
static path_test_t flattenquater_path[]
Definition: graphicspath.c:982
#define TRUE
Definition: types.h:120
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
Definition: matrix.c:140
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
const GLfloat * m
Definition: glext.h:10848
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:195
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
static path_test_t flattenline_path[]
Definition: graphicspath.c:967
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:160
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
#define ARRAY_SIZE(a)
Definition: main.h:24
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Definition: graphicspath.c:704
static path_test_t flattenellipse_path[]
Definition: graphicspath.c:939
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Definition: graphicspath.c:583
Definition: ps.c:97

Referenced by START_TEST().

◆ test_getpathdata()

static void test_getpathdata ( void  )
static

Definition at line 145 of file graphicspath.c.

146 {
147  GpPath *path;
150  INT count;
151 
153  expect(Ok, status);
154  status = GdipAddPathLine(path, 5.0, 5.0, 100.0, 50.0);
155  expect(Ok, status);
156 
158  expect(Ok, status);
159  expect(2, count);
160 
161  data.Count = count;
162  data.Types = GdipAlloc(sizeof(BYTE) * count);
163  data.Points = GdipAlloc(sizeof(PointF) * count);
164 
166  expect(Ok, status);
167  expect((data.Points[0].X == 5.0) && (data.Points[0].Y == 5.0) &&
168  (data.Points[1].X == 100.0) && (data.Points[1].Y == 50.0), TRUE);
169  expect((data.Types[0] == PathPointTypeStart) && (data.Types[1] == PathPointTypeLine), TRUE);
170 
171  GdipFree(data.Points);
172  GdipFree(data.Types);
174 }
GpStatus WINGDIPAPI GdipGetPathData(GpPath *path, GpPathData *pathData)
#define TRUE
Definition: types.h:120
GLsizei const GLchar ** path
Definition: glext.h:7234
GLuint GLuint GLsizei count
Definition: gl.h:1545
void WINGDIPAPI GdipFree(void *ptr)
Definition: gdiplus.c:150
int32_t INT
Definition: typedefs.h:58
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
unsigned char BYTE
Definition: xxhash.c:193
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Definition: graphicspath.c:704
#define expect(expected, got)
Definition: graphicspath.c:26
void *WINGDIPAPI GdipAlloc(SIZE_T size)
Definition: gdiplus.c:142
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_isvisible()

static void test_isvisible ( void  )
static

Definition at line 1248 of file graphicspath.c.

1249 {
1250  GpPath *path;
1251  GpGraphics *graphics = NULL;
1252  HDC hdc = GetDC(0);
1253  BOOL result;
1254  GpStatus status;
1255 
1256  status = GdipCreateFromHDC(hdc, &graphics);
1257  expect(Ok, status);
1259  expect(Ok, status);
1260 
1261  /* NULL */
1262  status = GdipIsVisiblePathPoint(NULL, 0.0, 0.0, NULL, NULL);
1264  status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, NULL);
1266  status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, NULL);
1268  status = GdipIsVisiblePathPoint(path, 0.0, 0.0, graphics, NULL);
1270 
1271  /* empty path */
1272  result = TRUE;
1273  status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, &result);
1274  expect(Ok, status);
1275  expect(FALSE, result);
1276  /* rect */
1277  status = GdipAddPathRectangle(path, 0.0, 0.0, 10.0, 10.0);
1278  expect(Ok, status);
1279  result = FALSE;
1280  status = GdipIsVisiblePathPoint(path, 0.0, 0.0, NULL, &result);
1281  expect(Ok, status);
1282  expect(TRUE, result);
1283  result = TRUE;
1284  status = GdipIsVisiblePathPoint(path, 11.0, 11.0, NULL, &result);
1285  expect(Ok, status);
1286  expect(FALSE, result);
1287  /* not affected by clipping */
1288  status = GdipSetClipRect(graphics, 5.0, 5.0, 5.0, 5.0, CombineModeReplace);
1289  expect(Ok, status);
1290  result = FALSE;
1291  status = GdipIsVisiblePathPoint(path, 0.0, 0.0, graphics, &result);
1292  expect(Ok, status);
1293  expect(TRUE, result);
1294 
1296  GdipDeleteGraphics(graphics);
1297  ReleaseDC(0, hdc);
1298 }
HDC WINAPI GetDC(_In_opt_ HWND)
#define TRUE
Definition: types.h:120
GLsizei const GLchar ** path
Definition: glext.h:7234
static HDC
Definition: imagelist.c:92
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
Definition: graphics.c:6473
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
Definition: graphics.c:2581
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Status
Definition: gdiplustypes.h:24
HDC hdc
Definition: main.c:9
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
Definition: graphics.c:2395
GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath *path, REAL x, REAL y, GpGraphics *graphics, BOOL *result)
#define expect(expected, got)
Definition: graphicspath.c:26
GLuint64EXT * result
Definition: glext.h:11304
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_lastpoint()

static void test_lastpoint ( void  )
static

Definition at line 669 of file graphicspath.c.

670 {
672  GpPath *path;
673  GpPointF ptf;
674 
676  status = GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0);
677  expect(Ok, status);
678 
679  /* invalid args */
686 
688  expect(Ok, status);
689  expect(TRUE, (ptf.X == 5.0) && (ptf.Y == 55.0));
690 
692 }
#define TRUE
Definition: types.h:120
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath *path, GpPointF *lastPoint)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
smooth NULL
Definition: ftsmooth.c:416
REAL Y
Definition: gdiplustypes.h:649
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_line2()

static void test_line2 ( void  )
static

Definition at line 188 of file graphicspath.c.

189 {
191  GpPath* path;
192  int i;
193  GpPointF line2_points[9];
194 
195  for(i = 0; i < 9; i ++){
196  line2_points[i].X = i * 5.0 * (REAL)(i % 2);
197  line2_points[i].Y = 50.0 - i * 5.0;
198  }
199 
201  status = GdipAddPathLine2(path, line2_points, 3);
202  expect(Ok, status);
203  status = GdipAddPathLine2(path, &(line2_points[3]), 3);
204  expect(Ok, status);
206  expect(Ok, status);
207  status = GdipAddPathLine2(path, &(line2_points[6]), 3);
208  expect(Ok, status);
209 
211 
213 }
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:623
REAL Y
Definition: gdiplustypes.h:649
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
static path_test_t line2_path[]
Definition: graphicspath.c:176
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
float REAL
Definition: types.h:41
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_linei()

static void test_linei ( void  )
static

Definition at line 553 of file graphicspath.c.

554 {
556  GpPath *path;
557 
559  status = GdipAddPathLineI(path, 5.0, 5.0, 6.0, 8.0);
560  expect(Ok, status);
561  GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0);
562  status = GdipAddPathLineI(path, 15.0, 15.0, 26.0, 28.0);
563  expect(Ok, status);
565  status = GdipAddPathLineI(path, 35.0, 35.0, 36.0, 38.0);
566  expect(Ok, status);
567 
569 
571 }
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:195
#define FALSE
Definition: types.h:117
GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
Definition: graphicspath.c:738
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
static path_test_t linei_path[]
Definition: graphicspath.c:537
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_pathpath()

static void test_pathpath ( void  )
static

Definition at line 445 of file graphicspath.c.

446 {
448  GpPath* path1, *path2;
449 
451  GdipAddPathArc(path2, 100.0, 100.0, 500.0, 700.0, 95.0, 100.0);
452 
454  GdipAddPathArc(path1, 100.0, 100.0, 500.0, 700.0, 0.0, 90.0);
456  expect(Ok, status);
457  GdipAddPathArc(path1, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0);
459  expect(Ok, status);
460 
462 
465 }
static const WCHAR path2[]
Definition: path.c:29
#define TRUE
Definition: types.h:120
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:195
#define FALSE
Definition: types.h:117
static path_test_t pathpath_path[]
Definition: graphicspath.c:417
static const WCHAR path1[]
Definition: path.c:28
GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath *addingPath, BOOL connect)
Definition: graphicspath.c:745
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_polygon()

static void test_polygon ( void  )
static

Definition at line 583 of file graphicspath.c.

584 {
586  GpPath *path;
587  GpPointF points[5];
588 
589  points[0].X = 0.0;
590  points[0].Y = 0.0;
591  points[1].X = 10.0;
592  points[1].Y = 10.0;
593  points[2].X = 10.0;
594  points[2].Y = 20.0;
595  points[3].X = 30.0;
596  points[3].Y = 10.0;
597  points[4].X = 20.0;
598  points[4].Y = 0.0;
599 
601 
602  /* NULL args */
607  /* Polygon should have 3 points at least */
610 
611  /* to test how it prolongs not empty path */
612  status = GdipAddPathLine(path, 5.0, 5.0, 6.0, 8.0);
613  expect(Ok, status);
615  expect(Ok, status);
616  /* check resulting path */
618 
620 }
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:844
GLsizei const GLchar ** path
Definition: glext.h:7234
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
static path_test_t poly_path[]
Definition: graphicspath.c:573
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
GLsizei const GLfloat * points
Definition: glext.h:8112
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define ARRAY_SIZE(a)
Definition: main.h:24
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Definition: graphicspath.c:704
#define expect(expected, got)
Definition: graphicspath.c:26
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST().

◆ test_rect()

static void test_rect ( void  )
static

Definition at line 634 of file graphicspath.c.

635 {
637  GpPath *path;
638  GpRectF rects[2];
639 
641  status = GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0);
642  expect(Ok, status);
643  status = GdipAddPathRectangle(path, 100.0, 50.0, 120.0, 30.0);
644  expect(Ok, status);
645 
647 
649 
651 
652  rects[0].X = 5.0;
653  rects[0].Y = 5.0;
654  rects[0].Width = 100.0;
655  rects[0].Height = 50.0;
656  rects[1].X = 100.0;
657  rects[1].Y = 50.0;
658  rects[1].Width = 120.0;
659  rects[1].Height = 30.0;
660 
662  expect(Ok, status);
663 
665 
667 }
GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count)
GLsizei const GLchar ** path
Definition: glext.h:7234
#define GDIPCONST
Definition: gdiplusflat.h:24
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
#define FALSE
Definition: types.h:117
REAL Height
Definition: gdiplustypes.h:664
static path_test_t rect_path[]
Definition: graphicspath.c:622
REAL X
Definition: gdiplustypes.h:661
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL Width
Definition: gdiplustypes.h:663
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
REAL Y
Definition: gdiplustypes.h:662
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by START_TEST(), and test_gethrgn().

◆ test_reverse()

static void test_reverse ( void  )
static

Definition at line 861 of file graphicspath.c.

862 {
864  GpPath *path;
865  GpPointF pts[7];
866  INT i;
867 
868  for(i = 0; i < 7; i++){
869  pts[i].X = i * 5.0 * (REAL)(i % 2);
870  pts[i].Y = 50.0 - i * 5.0;
871  }
872 
874 
875  /* NULL argument */
878 
879  /* empty path */
881  expect(Ok, status);
882 
883  GdipAddPathLine2(path, pts, 4);
885  GdipAddPathLine2(path, &(pts[4]), 3);
886 
888  expect(Ok, status);
890 
892 }
GLsizei const GLchar ** path
Definition: glext.h:7234
static path_test_t reverse_path[]
Definition: graphicspath.c:851
int32_t INT
Definition: typedefs.h:58
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:623
REAL Y
Definition: gdiplustypes.h:649
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
Status
Definition: gdiplustypes.h:24
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
#define ARRAY_SIZE(a)
Definition: main.h:24
#define expect(expected, got)
Definition: graphicspath.c:26
float REAL
Definition: types.h:41
static SERVICE_STATUS status
Definition: service.c:31
GpStatus WINGDIPAPI GdipReversePath(GpPath *path)
Definition: ps.c:97

Referenced by START_TEST().

◆ test_widen()

static void test_widen ( void  )
static

Definition at line 1079 of file graphicspath.c.

1080 {
1081  GpStatus status;
1082  GpPath *path;
1083  GpPen *pen;
1084  GpMatrix *m;
1085  INT count=-1;
1086 
1088  expect(Ok, status);
1089  status = GdipCreatePen1(0xffffffff, 10.0, UnitPixel, &pen);
1090  expect(Ok, status);
1092  expect(Ok, status);
1093 
1094  /* NULL arguments */
1095  status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1096  expect(Ok, status);
1097  status = GdipWidenPath(NULL, NULL, NULL, 0.0);
1099  status = GdipWidenPath(path, pen, m, 0.0);
1100  expect(Ok, status);
1101  status = GdipWidenPath(path, pen, NULL, 1.0);
1102  expect(Ok, status);
1103  status = GdipWidenPath(path, NULL, m, 1.0);
1105  status = GdipWidenPath(NULL, pen, m, 1.0);
1107 
1108  /* widen empty path */
1110  expect(Ok, status);
1111  status = GdipWidenPath(path, pen, m, 1.0);
1113 
1114  /* horizontal line */
1116  expect(Ok, status);
1117  status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1118  expect(Ok, status);
1119 
1120  status = GdipWidenPath(path, pen, m, 1.0);
1121  expect(Ok, status);
1123 
1124  /* horizontal 2x stretch */
1126  expect(Ok, status);
1127  status = GdipAddPathLine(path, 2.5, 10.0, 25.0, 10.0);
1128  expect(Ok, status);
1129 
1130  status = GdipScaleMatrix(m, 2.0, 1.0, MatrixOrderAppend);
1131  expect(Ok, status);
1132 
1133  status = GdipWidenPath(path, pen, m, 1.0);
1134  expect(Ok, status);
1136 
1137  /* vertical 2x stretch */
1139  expect(Ok, status);
1140  status = GdipAddPathLine(path, 5.0, 5.0, 50.0, 5.0);
1141  expect(Ok, status);
1142 
1143  status = GdipScaleMatrix(m, 0.5, 2.0, MatrixOrderAppend);
1144  expect(Ok, status);
1145 
1146  status = GdipWidenPath(path, pen, m, 1.0);
1147  expect(Ok, status);
1149 
1150  status = GdipScaleMatrix(m, 1.0, 0.5, MatrixOrderAppend);
1151  expect(Ok, status);
1152 
1153  /* dashed line */
1155  expect(Ok, status);
1156  status = GdipAddPathLine(path, 5.0, 5.0, 50.0, 5.0);
1157  expect(Ok, status);
1158 
1160  expect(Ok, status);
1161 
1162  status = GdipWidenPath(path, pen, m, 1.0);
1163  expect(Ok, status);
1165 
1167  expect(Ok, status);
1168 
1169  /* pen width in UnitWorld */
1170  GdipDeletePen(pen);
1171  status = GdipCreatePen1(0xffffffff, 10.0, UnitWorld, &pen);
1172  expect(Ok, status);
1173 
1175  expect(Ok, status);
1176  status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1177  expect(Ok, status);
1178 
1179  status = GdipWidenPath(path, pen, m, 1.0);
1180  expect(Ok, status);
1182 
1183  /* horizontal 2x stretch */
1185  expect(Ok, status);
1186  status = GdipAddPathLine(path, 2.5, 10.0, 25.0, 10.0);
1187  expect(Ok, status);
1188 
1189  status = GdipScaleMatrix(m, 2.0, 1.0, MatrixOrderAppend);
1190  expect(Ok, status);
1191 
1192  status = GdipWidenPath(path, pen, m, 1.0);
1193  expect(Ok, status);
1195 
1196  /* vertical 2x stretch */
1198  expect(Ok, status);
1199  status = GdipAddPathLine(path, 5.0, 5.0, 50.0, 5.0);
1200  expect(Ok, status);
1201 
1202  status = GdipScaleMatrix(m, 0.5, 2.0, MatrixOrderAppend);
1203  expect(Ok, status);
1204 
1205  status = GdipWidenPath(path, pen, m, 1.0);
1206  expect(Ok, status);
1208 
1209  status = GdipScaleMatrix(m, 1.0, 0.5, MatrixOrderAppend);
1210  expect(Ok, status);
1211 
1212  /* pen width in UnitInch */
1213  GdipDeletePen(pen);
1214  status = GdipCreatePen1(0xffffffff, 10.0, UnitWorld, &pen);
1215  expect(Ok, status);
1216 
1218  expect(Ok, status);
1219  status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1220  expect(Ok, status);
1221 
1222  status = GdipWidenPath(path, pen, m, 1.0);
1223  expect(Ok, status);
1225 
1226  /* pen width = 0 pixels - native fails to widen but can draw with this pen */
1227  GdipDeletePen(pen);
1228  status = GdipCreatePen1(0xffffffff, 0.0, UnitPixel, &pen);
1229  expect(Ok, status);
1230 
1232  expect(Ok, status);
1233  status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1234  expect(Ok, status);
1235 
1236  status = GdipWidenPath(path, pen, m, 1.0);
1237  expect(Ok, status);
1238 
1240  expect(Ok, status);
1241  todo_wine expect(0, count);
1242 
1244  GdipDeletePen(pen);
1246 }
static path_test_t widenline_dash_path[]
static path_test_t widenline_path[]
GLsizei const GLchar ** path
Definition: glext.h:7234
GLuint GLuint GLsizei count
Definition: gl.h:1545
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
Definition: matrix.c:140
int32_t INT
Definition: typedefs.h:58
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
const GLfloat * m
Definition: glext.h:10848
static void ok_path(GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size)
Definition: graphicspath.c:78
#define FALSE
Definition: types.h:117
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
static path_test_t widenline_wide_path[]
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:160
Status
Definition: gdiplustypes.h:24
#define todo_wine
Definition: test.h:162
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
Definition: matrix.c:289
#define ARRAY_SIZE(a)
Definition: main.h:24
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Definition: graphicspath.c:704
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, REAL flatness)
#define expect(expected, got)
Definition: graphicspath.c:26
GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
Definition: pen.c:192
static SERVICE_STATUS status
Definition: service.c:31
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen)
Definition: pen.c:136
GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash)
Definition: pen.c:650
Definition: ps.c:97

Referenced by START_TEST().

◆ test_worldbounds()

static void test_worldbounds ( void  )
static

Definition at line 286 of file graphicspath.c.

287 {
289  GpPath *path;
290  GpPen *pen;
291  GpMatrix *matrix;
292  GpRectF bounds;
293  GpPointF line2_points[10];
294  int i;
295 
296  for(i = 0; i < 10; i ++){
297  line2_points[i].X = 200.0 + i * 50.0 * (i % 2);
298  line2_points[i].Y = 200.0 + i * 50.0 * !(i % 2);
299  }
300  GdipCreatePen1((ARGB)0xdeadbeef, 20.0, UnitWorld, &pen);
302  GdipCreateMatrix2(1.5, 0.0, 1.0, 1.2, 10.4, 10.2, &matrix);
303 
305  GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
306  GdipAddPathLine2(path, &(line2_points[0]), 10);
308  expect(Ok, status);
310 
311  expectf(200.0, bounds.X);
312  expectf(200.0, bounds.Y);
313  expectf(450.0, bounds.Width);
314  expectf(600.0, bounds.Height);
315 
317  GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
318  GdipAddPathLine2(path, &(line2_points[0]), 10);
320  expect(Ok, status);
322 
323  expectf(510.4, bounds.X);
324  expectf(250.2, bounds.Y);
325  expectf(1275.0, bounds.Width);
326  expectf(720.0, bounds.Height);
327 
329  GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
330  GdipAddPathLine2(path, &(line2_points[0]), 10);
331  status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
332  expect(Ok, status);
334 
335  expectf(100.0, bounds.X);
336  expectf(100.0, bounds.Y);
337  expectf(650.0, bounds.Width);
338  expectf(800.0, bounds.Height);
339 
341  GdipAddPathLine2(path, &(line2_points[0]), 2);
342  status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
343  expect(Ok, status);
345 
346  expectf(156.0, bounds.X);
347  expectf(156.0, bounds.Y);
348  expectf(138.0, bounds.Width);
349  expectf(88.0, bounds.Height);
350 
351  line2_points[2].X = 2 * line2_points[1].X - line2_points[0].X;
352  line2_points[2].Y = 2 * line2_points[1].Y - line2_points[0].Y;
353 
355  GdipAddPathLine2(path, &(line2_points[0]), 3);
356  status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
357  expect(Ok, status);
359 
360  expectf(100.0, bounds.X);
361  expectf(100.0, bounds.Y);
362  expectf(300.0, bounds.Width);
363  expectf(200.0, bounds.Height);
364 
366  GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 45.0, 20.0);
367  status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
368  expect(Ok, status);
370 
371  expectf(386.7, bounds.X);
372  expectf(553.4, bounds.Y);
373  expectf(266.8, bounds.Width);
374  expectf(289.6, bounds.Height);
375 
377  status = GdipGetPathWorldBounds(path, &bounds, matrix, pen);
378  expect(Ok, status);
380 
381  expectf(0.0, bounds.X);
382  expectf(0.0, bounds.Y);
383  expectf(0.0, bounds.Width);
384  expectf(0.0, bounds.Height);
385 
387  GdipAddPathLine2(path, &(line2_points[0]), 2);
388  status = GdipGetPathWorldBounds(path, &bounds, matrix, pen);
389  expect(Ok, status);
391 
392  todo_wine{
393  expectf(427.9, bounds.X);
394  expectf(167.7, bounds.Y);
395  expectf(239.9, bounds.Width);
396  expectf(164.9, bounds.Height);
397  }
398 
400  GdipCreateMatrix2(0.9, -0.5, -0.5, -1.2, 10.4, 10.2, &matrix);
402  GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
403  GdipAddPathLine2(path, &(line2_points[0]), 10);
405  expect(Ok, status);
408 
409  expectf(-209.6, bounds.X);
410  expectf(-1274.8, bounds.Y);
411  expectf(705.0, bounds.Width);
412  expectf(945.0, bounds.Height);
413 
414  GdipDeletePen(pen);
415 }
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
Definition: matrix.c:61
GLsizei const GLchar ** path
Definition: glext.h:7234
GLuint GLenum matrix
Definition: glext.h:9407
GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath *path, GpRectF *bounds, GDIPCONST GpMatrix *matrix, GDIPCONST GpPen *pen)
#define expectf(expected, got)
Definition: graphicspath.c:27
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:195
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:623
REAL Height
Definition: gdiplustypes.h:664
REAL X
Definition: gdiplustypes.h:661
REAL Y
Definition: gdiplustypes.h:649
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:160
Status
Definition: gdiplustypes.h:24
#define todo_wine
Definition: test.h:162
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
REAL X
Definition: gdiplustypes.h:648
GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap)
Definition: pen.c:671
REAL Width
Definition: gdiplustypes.h:663
#define expect(expected, got)
Definition: graphicspath.c:26
GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
Definition: pen.c:192
REAL Y
Definition: gdiplustypes.h:662
static SERVICE_STATUS status
Definition: service.c:31
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen)
Definition: pen.c:136
Definition: ps.c:97
DWORD ARGB

Referenced by START_TEST().

Variable Documentation

◆ addclosedcurve_path

path_test_t addclosedcurve_path[]
static
Initial value:
= {
{0.0, 0.0, PathPointTypeStart, 0, 0},
{-6.7, 0.0, PathPointTypeBezier, 0, 0},
{6.7, 3.3, PathPointTypeBezier, 0, 0},
{10.0, 10.0, PathPointTypeBezier, 0, 0},
{13.3, 16.7, PathPointTypeBezier, 0, 0},
{3.3, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0},
{16.7, 20.0, PathPointTypeBezier, 0, 0},
{33.3, 16.7, PathPointTypeBezier, 0, 0},
{30.0, 10.0, PathPointTypeBezier, 0, 0},
{26.7, 3.3, PathPointTypeBezier, 0, 0},
{6.7, 0.0, PathPointTypeBezier, 0, 0},
}

Definition at line 802 of file graphicspath.c.

Referenced by test_addclosedcurve().

◆ addcurve_path

path_test_t addcurve_path[]
static
Initial value:
= {
{0.0, 0.0, PathPointTypeStart, 0, 0},
{3.3, 3.3, PathPointTypeBezier, 0, 0},
{6.7, 3.3, PathPointTypeBezier, 0, 0},
{10.0, 10.0, PathPointTypeBezier, 0, 0},
{13.3, 16.7, PathPointTypeBezier, 0, 0},
{3.3, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0},
{16.7, 20.0, PathPointTypeBezier, 0, 0},
{23.3, 13.3, PathPointTypeBezier, 0, 0},
{30.0, 10.0, PathPointTypeBezier, 0, 0}
}

Definition at line 694 of file graphicspath.c.

Referenced by test_addcurve().

◆ addcurve_path2

path_test_t addcurve_path2[]
static
Initial value:
= {
{100.0,120.0,PathPointTypeStart, 0, 0},
{123.0,10.0, PathPointTypeLine, 0, 0},
{0.0, 0.0, PathPointTypeLine, 0, 0},
{3.3, 3.3, PathPointTypeBezier, 0, 0},
{6.7, 3.3, PathPointTypeBezier, 0, 0},
{10.0, 10.0, PathPointTypeBezier, 0, 0},
{13.3, 16.7, PathPointTypeBezier, 0, 0},
{3.3, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0},
{16.7, 20.0, PathPointTypeBezier, 0, 0},
{23.3, 13.3, PathPointTypeBezier, 0, 0},
{30.0, 10.0, PathPointTypeBezier, 0, 0}
}

Definition at line 706 of file graphicspath.c.

Referenced by test_addcurve().

◆ addcurve_path3

path_test_t addcurve_path3[]
static
Initial value:
= {
{10.0, 10.0, PathPointTypeStart, 0, 0},
{13.3, 16.7, PathPointTypeBezier, 0, 1},
{3.3, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0},
{16.7, 20.0, PathPointTypeBezier, 0, 0},
{23.3, 13.3, PathPointTypeBezier, 0, 0},
{30.0, 10.0, PathPointTypeBezier, 0, 0}
}

Definition at line 720 of file graphicspath.c.

Referenced by test_addcurve().

◆ addpie_path

path_test_t addpie_path[]
static
Initial value:

Definition at line 894 of file graphicspath.c.

Referenced by test_addpie().

◆ addpie_path2

path_test_t addpie_path2[]
static
Initial value:

Definition at line 901 of file graphicspath.c.

Referenced by test_addpie().

◆ addpie_path3

path_test_t addpie_path3[]
static
Initial value:

Definition at line 904 of file graphicspath.c.

Referenced by test_addpie().

◆ arc_path

path_test_t arc_path[]
static

Definition at line 215 of file graphicspath.c.

Referenced by test_arc().

◆ ellipse_path

path_test_t ellipse_path[]
static

Definition at line 467 of file graphicspath.c.

Referenced by test_ellipse().

◆ flattenarc_path

path_test_t flattenarc_path[]
static
Initial value:
= {
{100.0, 25.0,PathPointTypeStart, 0, 0},
{99.0, 30.0, PathPointTypeLine, 0, 0},
{96.0, 34.8, PathPointTypeLine, 0, 0},
{91.5, 39.0, PathPointTypeLine, 0, 0},
{85.5, 42.8, PathPointTypeLine, 0, 0},
{69.5, 48.0, PathPointTypeLine, 0, 1},
{50.0, 50.0, PathPointTypeLine, 0, 1}
}

Definition at line 972 of file graphicspath.c.

Referenced by test_flatten().

◆ flattenellipse_path

path_test_t flattenellipse_path[]
static
Initial value:
= {
{100.0, 25.0,PathPointTypeStart, 0, 0},
{99.0, 30.0, PathPointTypeLine, 0, 0},
{96.0, 34.8, PathPointTypeLine, 0, 0},
{91.5, 39.0, PathPointTypeLine, 0, 0},
{85.5, 42.8, PathPointTypeLine, 0, 0},
{69.5, 48.0, PathPointTypeLine, 0, 1},
{50.0, 50.0, PathPointTypeLine, 0, 1},
{30.5, 48.0, PathPointTypeLine, 0, 1},
{14.8, 42.8, PathPointTypeLine, 0, 1},
{8.5, 39.0, PathPointTypeLine, 0, 1},
{4.0, 34.8, PathPointTypeLine, 0, 1},
{1.0, 30.0, PathPointTypeLine, 0, 1},
{0.0, 25.0, PathPointTypeLine, 0, 1},
{1.0, 20.0, PathPointTypeLine, 0, 1},
{4.0, 15.3, PathPointTypeLine, 0, 1},
{8.5, 11.0, PathPointTypeLine, 0, 1},
{14.8, 7.3, PathPointTypeLine, 0, 1},
{30.5, 2.0, PathPointTypeLine, 0, 1},
{50.0, 0.0, PathPointTypeLine, 0, 1},
{69.5, 2.0, PathPointTypeLine, 0, 1},
{85.5, 7.3, PathPointTypeLine, 0, 1},
{91.5, 11.0, PathPointTypeLine, 0, 1},
{96.0, 15.3, PathPointTypeLine, 0, 1},
{99.0, 20.0, PathPointTypeLine, 0, 1},
}

Definition at line 939 of file graphicspath.c.

Referenced by test_flatten().

◆ flattenline_path

path_test_t flattenline_path[]
static
Initial value:
= {
{5.0, 10.0,PathPointTypeStart, 0, 0},
{50.0, 100.0, PathPointTypeLine, 0, 0}
}

Definition at line 967 of file graphicspath.c.

Referenced by test_flatten().

◆ flattenquater_path

path_test_t flattenquater_path[]
static
Initial value:
= {
{100.0, 50.0,PathPointTypeStart, 0, 0},
{99.0, 60.0, PathPointTypeLine, 0, 0},
{96.0, 69.5, PathPointTypeLine, 0, 0},
{91.5, 78.0, PathPointTypeLine, 0, 0},
{85.5, 85.5, PathPointTypeLine, 0, 0},
{78.0, 91.5, PathPointTypeLine, 0, 0},
{69.5, 96.0, PathPointTypeLine, 0, 0},
{60.0, 99.0, PathPointTypeLine, 0, 0},
{50.0, 100.0,PathPointTypeLine, 0, 0}
}

Definition at line 982 of file graphicspath.c.

Referenced by test_flatten().

◆ line2_path

path_test_t line2_path[]
static
Initial value:
= {
{0.0, 50.0, PathPointTypeStart, 0, 0},
{5.0, 45.0, PathPointTypeLine, 0, 0},
{0.0, 40.0, PathPointTypeLine, 0, 0},
{15.0, 35.0, PathPointTypeLine, 0, 0},
{0.0, 30.0, PathPointTypeLine, 0, 0},
{0.0, 20.0, PathPointTypeStart, 0, 0},
{35.0, 15.0, PathPointTypeLine, 0, 0},
{0.0, 10.0, PathPointTypeLine, 0, 0}
}

Definition at line 176 of file graphicspath.c.

Referenced by test_line2().

◆ linei_path

path_test_t linei_path[]
static
Initial value:
= {
{5.00, 5.00, PathPointTypeStart, 0, 0},
{6.00, 8.00, PathPointTypeLine, 0, 0},
{409.92, 110.20, PathPointTypeLine, 0, 0},
{543.96, 156.53, PathPointTypeBezier, 0, 0},
{625.80, 346.22, PathPointTypeBezier, 0, 0},
{592.71, 533.88, PathPointTypeBezier, 0, 0},
{592.47, 535.28, PathPointTypeBezier, 0, 0},
{592.22, 536.67, PathPointTypeBezier, 0, 0},
{591.96, 538.06, PathPointTypeBezier, 0, 0},
{15.00, 15.00, PathPointTypeLine, 0, 0},
{26.00, 28.00, PathPointTypeLine | PathPointTypeCloseSubpath, 0, 0},
{35.00, 35.00, PathPointTypeStart, 0, 0},
{36.00, 38.00, PathPointTypeLine, 0, 0}
}

Definition at line 537 of file graphicspath.c.

Referenced by test_linei().

◆ pathpath_path

path_test_t pathpath_path[]
static
Initial value:
= {
{600.00, 450.00, PathPointTypeStart, 0, 0},
{600.00, 643.30, PathPointTypeBezier, 0, 0},
{488.07, 800.00, PathPointTypeBezier, 0, 0},
{350.00, 800.00, PathPointTypeBezier, 0, 0},
{319.61, 797.40, PathPointTypeStart, 0, 0},
{182.56, 773.90, PathPointTypeBezier, 0, 0},
{85.07, 599.31, PathPointTypeBezier, 0, 0},
{101.85, 407.45, PathPointTypeBezier, 0, 0},
{102.54, 399.66, PathPointTypeBezier, 0, 0},
{103.40, 391.91, PathPointTypeBezier, 0, 0},
{104.46, 384.21, PathPointTypeBezier, 0, 0},
{409.92, 110.20, PathPointTypeLine, 0, 0},
{543.96, 156.53, PathPointTypeBezier, 0, 0},
{625.80, 346.22, PathPointTypeBezier, 0, 0},
{592.71, 533.88, PathPointTypeBezier, 0, 0},
{592.47, 535.28, PathPointTypeBezier, 0, 0},
{592.22, 536.67, PathPointTypeBezier, 0, 0},
{591.96, 538.06, PathPointTypeBezier, 0, 0},
{319.61, 797.40, PathPointTypeLine, 0, 0},
{182.56, 773.90, PathPointTypeBezier, 0, 0},
{85.07, 599.31, PathPointTypeBezier, 0, 0},
{101.85, 407.45, PathPointTypeBezier, 0, 0},
{102.54, 399.66, PathPointTypeBezier, 0, 0},
{103.40, 391.91, PathPointTypeBezier, 0, 0},
{104.46, 384.21, PathPointTypeBezier, 0, 0}
}

Definition at line 417 of file graphicspath.c.

Referenced by test_pathpath().

◆ poly_path

path_test_t poly_path[]
static
Initial value:
= {
{5.00, 5.00, PathPointTypeStart, 0, 0},
{6.00, 8.00, PathPointTypeLine, 0, 0},
{0.00, 0.00, PathPointTypeStart, 0, 0},
{10.00, 10.00, PathPointTypeLine, 0, 0},
{10.00, 20.00, PathPointTypeLine, 0, 0},
{30.00, 10.00, PathPointTypeLine, 0, 0},
}

Definition at line 573 of file graphicspath.c.

Referenced by test_polygon().

◆ rect_path

path_test_t rect_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{105.0, 5.0, PathPointTypeLine, 0, 0},
{105.0, 55.0, PathPointTypeLine, 0, 0},
{100.0, 50.0, PathPointTypeStart, 0, 0},
{220.0, 50.0, PathPointTypeLine, 0, 0},
{220.0, 80.0, PathPointTypeLine, 0, 0},
}

Definition at line 622 of file graphicspath.c.

Referenced by test_rect().

◆ reverse_path

path_test_t reverse_path[]
static
Initial value:
= {
{0.0, 20.0, PathPointTypeStart, 0, 0},
{25.0, 25.0, PathPointTypeLine, 0, 0},
{0.0, 30.0, PathPointTypeLine, 0, 0},
{15.0, 35.0, PathPointTypeStart, 0, 0},
{0.0, 40.0, PathPointTypeLine, 0, 0},
{5.0, 45.0, PathPointTypeLine, 0, 0},
}

Definition at line 851 of file graphicspath.c.

Referenced by test_reverse().

◆ widenline_dash_path

path_test_t widenline_dash_path[]
static
Initial value:
= {
{5.0, 0.0, PathPointTypeStart, 0, 0},
{35.0, 0.0, PathPointTypeLine, 0, 0},
{35.0, 10.0, PathPointTypeLine, 0, 0},
{45.0, 0.0, PathPointTypeStart, 0, 0},
{50.0, 0.0, PathPointTypeLine, 0, 0},
{50.0, 10.0, PathPointTypeLine, 0, 0},
}

Definition at line 1068 of file graphicspath.c.

Referenced by test_widen().

◆ widenline_path

path_test_t widenline_path[]
static
Initial value:

Definition at line 1054 of file graphicspath.c.

Referenced by test_widen().

◆ widenline_wide_path

path_test_t widenline_wide_path[]
static
Initial value:

Definition at line 1061 of file graphicspath.c.

Referenced by test_widen().