ReactOS 0.4.17-dev-243-g1369312
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)
 
#define ok_path(a, b, c, d)   _ok_path_fudge(a,b,c,d,1.0,__LINE__)
 
#define ok_path_fudge(a, b, c, d, e)   _ok_path_fudge(a,b,c,d,e,__LINE__)
 

Functions

static void stringify_point_type (PathPointType type, char *name)
 
static void _ok_path_fudge (GpPath *path, const path_test_t *expected, INT expected_size, BOOL todo_size, REAL fudge, int line)
 
static void test_constructor_destructor (void)
 
static void test_getpathdata (void)
 
static void test_createpath2 (void)
 
static void test_line2 (void)
 
static void test_bezier (void)
 
static void test_beziers (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_widen_cap (void)
 
static void test_isvisible (void)
 
static void test_is_outline_visible_path_point (void)
 
static void test_empty_rect (void)
 
static void test_rect_line (void)
 
 START_TEST (graphicspath)
 

Variables

static path_test_t line2_path []
 
static path_test_t bezier_path []
 
static path_test_t arc_path []
 
static path_test_t arc_path2 []
 
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_path_default_tension []
 
static path_test_t addcurve_path2 []
 
static path_test_t addcurve_path3 []
 
static path_test_t addcurve_path4 []
 
static path_test_t addcurve_path5 []
 
static path_test_t addclosedcurve_path []
 
static path_test_t addclosedcurve_path_default_tension []
 
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 []
 
static path_test_t widenline_thin_dash_path []
 
static path_test_t widenline_unit_path []
 
static path_test_t widenline_capflat_path []
 
static path_test_t widenline_capsquare_path []
 
static path_test_t widenline_capround_path []
 
static path_test_t widenline_captriangle_path []
 
static path_test_t widenline_capsquareanchor_path []
 
static path_test_t widenline_caproundanchor_path []
 
static path_test_t widenline_capdiamondanchor_path []
 
static path_test_t widenline_caparrowanchor_path []
 
static path_test_t widenline_capsquareanchor_thin_path []
 
static path_test_t widenline_capsquareanchor_dashed_path []
 
static path_test_t widenline_capsquareanchor_multifigure_path []
 
static path_test_t widenline_customarrow_multifigure_path []
 
static path_test_t rect_line_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.

◆ ok_path

#define ok_path (   a,
  b,
  c,
  d 
)    _ok_path_fudge(a,b,c,d,1.0,__LINE__)

Definition at line 78 of file graphicspath.c.

◆ ok_path_fudge

#define ok_path_fudge (   a,
  b,
  c,
  d,
  e 
)    _ok_path_fudge(a,b,c,d,e,__LINE__)

Definition at line 79 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_fudge()

static void _ok_path_fudge ( GpPath path,
const path_test_t expected,
INT  expected_size,
BOOL  todo_size,
REAL  fudge,
int  line 
)
static

Definition at line 80 of file graphicspath.c.

82{
83 BYTE * types;
84 INT size, idx = 0, eidx = 0, numskip;
87
88 if(GdipGetPointCount(path, &size) != Ok){
89 skip("Cannot perform path comparisons due to failure to retrieve path.\n");
90 return;
91 }
92
93 todo_wine_if (todo_size)
94 ok_(__FILE__,line)(size == expected_size, "Path size %d does not match expected size %d\n",
95 size, expected_size);
96
97 points = malloc(size * sizeof(GpPointF));
98 types = malloc(size);
99
101 skip("Cannot perform path comparisons due to failure to retrieve path.\n");
102 goto end;
103 }
104
105 numskip = expected_size ? expected[eidx].wine_only_entries_preceding : 0;
106 while (idx < size && eidx < expected_size){
107 /* We allow a few pixels fudge in matching X and Y coordinates to account for imprecision in
108 * floating point to integer conversion */
109 BOOL match = (types[idx] == expected[eidx].type) &&
110 fabs(points[idx].X - expected[eidx].X) <= fudge &&
111 fabs(points[idx].Y - expected[eidx].Y) <= fudge;
112
113 stringify_point_type(expected[eidx].type, ename);
115
116 todo_wine_if (expected[eidx].todo || numskip)
117 ok_(__FILE__,line)(match, "Expected #%d: %s (%.6f,%.6f) but got %s (%.6f,%.6f)\n", eidx,
118 ename, expected[eidx].X, expected[eidx].Y,
119 name, points[idx].X, points[idx].Y);
120
121 if (match || expected[eidx].todo != 2)
122 idx++;
123 if (match || !numskip--)
124 numskip = expected[++eidx].wine_only_entries_preceding;
125 }
126
127end:
128 free(types);
129 free(points);
130}
#define skip(...)
Definition: atltest.h:64
#define ok_(x1, x2)
Definition: atltest.h:61
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
unsigned int idx
Definition: utils.c:41
#define Y(I)
GpStatus WINGDIPAPI GdipGetPointCount(GpPath *path, INT *count)
GpStatus WINGDIPAPI GdipGetPathPoints(GpPath *path, GpPointF *points, INT count)
GpStatus WINGDIPAPI GdipGetPathTypes(GpPath *path, BYTE *types, INT count)
_ACRTIMP double __cdecl fabs(double)
unsigned int BOOL
Definition: ntddk_ex.h:94
@ Ok
Definition: gdiplustypes.h:25
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
GLsizei const GLfloat * points
Definition: glext.h:8112
#define todo_wine_if(is_todo)
Definition: minitest.h:81
BOOL todo
Definition: filedlg.c:313
BOOL expected
Definition: store.c:2000
static void stringify_point_type(PathPointType type, char *name)
Definition: graphicspath.c:30
#define POINT_TYPE_MAX_LEN
Definition: graphicspath.c:28
Definition: parser.c:49
Definition: match.c:28
Definition: name.c:39
Definition: cmds.c:130
int32_t INT
Definition: typedefs.h:58
unsigned char BYTE
Definition: xxhash.c:193

◆ START_TEST()

START_TEST ( graphicspath  )

Definition at line 2215 of file graphicspath.c.

2216{
2217 struct GdiplusStartupInput gdiplusStartupInput;
2218 ULONG_PTR gdiplusToken;
2219 HMODULE hmsvcrt;
2220 int (CDECL * _controlfp_s)(unsigned int *cur, unsigned int newval, unsigned int mask);
2221
2222 /* Enable all FP exceptions except _EM_INEXACT, which gdi32 can trigger */
2223 hmsvcrt = LoadLibraryA("msvcrt");
2224 _controlfp_s = (void*)GetProcAddress(hmsvcrt, "_controlfp_s");
2225 if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e);
2226
2227 gdiplusStartupInput.GdiplusVersion = 1;
2228 gdiplusStartupInput.DebugEventCallback = NULL;
2229 gdiplusStartupInput.SuppressBackgroundThread = 0;
2230 gdiplusStartupInput.SuppressExternalCodecs = 0;
2231
2232 GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
2233
2237 test_line2();
2238 test_bezier();
2239 test_beziers();
2240 test_arc();
2242 test_pathpath();
2243 test_ellipse();
2244 test_linei();
2245 test_rect();
2246 test_polygon();
2248 test_addcurve();
2250 test_reverse();
2251 test_addpie();
2252 test_flatten();
2253 test_widen();
2259
2260 GdiplusShutdown(gdiplusToken);
2261}
#define NULL
Definition: types.h:112
#define CDECL
Definition: compat.h:29
#define GetProcAddress(x, y)
Definition: compat.h:753
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
_ACRTIMP errno_t __cdecl _controlfp_s(unsigned int *, unsigned int, unsigned int)
Definition: math.c:1304
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
FxCollectionEntry * cur
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
Definition: gdiplus.c:83
void WINAPI GdiplusShutdown(ULONG_PTR)
GLenum GLint GLuint mask
Definition: glext.h:6028
static void test_addclosedcurve(void)
static void test_is_outline_visible_path_point(void)
static void test_createpath2(void)
Definition: graphicspath.c:179
static void test_addcurve(void)
Definition: graphicspath.c:970
static void test_empty_rect(void)
static void test_ellipse(void)
Definition: graphicspath.c:724
static void test_beziers(void)
Definition: graphicspath.c:378
static void test_bezier(void)
Definition: graphicspath.c:359
static void test_line2(void)
Definition: graphicspath.c:300
static void test_linei(void)
Definition: graphicspath.c:767
static void test_reverse(void)
static void test_isvisible(void)
static void test_pathpath(void)
Definition: graphicspath.c:658
static void test_widen(void)
static void test_widen_cap(void)
static void test_polygon(void)
Definition: graphicspath.c:799
static void test_getpathdata(void)
Definition: graphicspath.c:148
static void test_rect_line(void)
static void test_lastpoint(void)
Definition: graphicspath.c:885
static void test_addpie(void)
static void test_flatten(void)
static void test_worldbounds(void)
Definition: graphicspath.c:499
static void test_constructor_destructor(void)
Definition: graphicspath.c:132
static void test_rect(void)
Definition: graphicspath.c:850
static void test_arc(void)
Definition: graphicspath.c:448
uint32_t ULONG_PTR
Definition: typedefs.h:65

◆ 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
36 strcat(name, "PathPointTypeStart");
37 break;
39 strcat(name, "PathPointTypeLine");
40 break;
42 strcat(name, "PathPointTypeBezier");
43 break;
44 default:
45 strcat(name, "Unknown type");
46 return;
47 }
48
49 type &= ~PathPointTypePathTypeMask;
51 *name = '\0';
52 strcat(name, "Unknown type");
53 return;
54 }
55
57 strcat(name, " | PathPointTypePathMarker");
59 strcat(name, " | PathPointTypeCloseSubpath");
60}
@ PathPointTypePathMarker
Definition: gdiplusenums.h:88
@ PathPointTypePathTypeMask
Definition: gdiplusenums.h:86
@ PathPointTypeBezier
Definition: gdiplusenums.h:85
@ PathPointTypeLine
Definition: gdiplusenums.h:84
@ PathPointTypeCloseSubpath
Definition: gdiplusenums.h:89
@ PathPointTypeStart
Definition: gdiplusenums.h:83
strcat
Definition: string.h:92

Referenced by _ok_path_fudge().

◆ test_addclosedcurve()

static void test_addclosedcurve ( void  )
static

Definition at line 1094 of file graphicspath.c.

1095{
1097 GpPath *path;
1098 GpPointF points[4];
1099
1100 points[0].X = 0.0;
1101 points[0].Y = 0.0;
1102 points[1].X = 10.0;
1103 points[1].Y = 10.0;
1104 points[2].X = 10.0;
1105 points[2].Y = 20.0;
1106 points[3].X = 30.0;
1107 points[3].Y = 10.0;
1108
1110
1111 /* NULL args */
1120
1121 /* add to empty path */
1123 expect(Ok, status);
1126
1127 /* add to empty path with default tension */
1130 expect(Ok, status);
1133}
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FALSE
Definition: types.h:117
GpStatus WINGDIPAPI GdipCreatePath(GpFillMode fill, GpPath **path)
GpStatus WINGDIPAPI GdipDeletePath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathClosedCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:467
GpStatus WINGDIPAPI GdipAddPathClosedCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
Definition: graphicspath.c:483
@ FillModeAlternate
Definition: gdiplusenums.h:55
Status
Definition: gdiplustypes.h:24
@ InvalidParameter
Definition: gdiplustypes.h:27
static path_test_t addclosedcurve_path_default_tension[]
#define expect(expected, got)
Definition: graphicspath.c:26
#define ok_path(a, b, c, d)
Definition: graphicspath.c:78
static path_test_t addclosedcurve_path[]
REAL X
Definition: gdiplustypes.h:643
Definition: ps.c:97

Referenced by START_TEST().

◆ test_addcurve()

static void test_addcurve ( void  )
static

Definition at line 970 of file graphicspath.c.

971{
973 GpPath *path;
974 GpPointF points[4];
975
976 points[0].X = 0.0;
977 points[0].Y = 0.0;
978 points[1].X = 10.0;
979 points[1].Y = 10.0;
980 points[2].X = 10.0;
981 points[2].Y = 20.0;
982 points[3].X = 30.0;
983 points[3].Y = 10.0;
984
986
987 /* NULL args */
988 status = GdipAddPathCurve2(NULL, NULL, 0, 0.0);
990 status = GdipAddPathCurve2(path, NULL, 0, 0.0);
992 status = GdipAddPathCurve2(path, points, -1, 0.0);
996
997 /* add to empty path */
999 expect(Ok, status);
1002
1003 /* add to empty path with default tension */
1006 expect(Ok, status);
1009
1010 /* add to notempty path and opened figure */
1012 GdipAddPathLine(path, 100.0, 120.0, 123.0, 10.0);
1013 status = GdipAddPathCurve2(path, points, 4, 1.0);
1014 expect(Ok, status);
1016
1017 /* NULL args */
1019 status = GdipAddPathCurve3(NULL, NULL, 0, 0, 0, 0.0);
1021 status = GdipAddPathCurve3(path, NULL, 0, 0, 0, 0.0);
1023 /* wrong count, offset.. */
1024 status = GdipAddPathCurve3(path, points, 0, 0, 0, 0.0);
1026 status = GdipAddPathCurve3(path, points, 4, 0, 0, 0.0);
1028 status = GdipAddPathCurve3(path, points, 4, 0, 4, 0.0);
1030 status = GdipAddPathCurve3(path, points, 4, 1, 3, 0.0);
1032 status = GdipAddPathCurve3(path, points, 4, 1, 0, 0.0);
1034 status = GdipAddPathCurve3(path, points, 4, 3, 1, 0.0);
1036
1037 /* use all points */
1038 status = GdipAddPathCurve3(path, points, 4, 0, 3, 1.0);
1039 expect(Ok, status);
1042
1043 /* Skip first point */
1044 status = GdipAddPathCurve3(path, points, 4, 1, 2, 1.0);
1045 expect(Ok, status);
1048
1049 /* Skip two last points */
1050 status = GdipAddPathCurve3(path, points, 4, 0, 1, 1.0);
1051 expect(Ok, status);
1054
1055 /* Skip first and last points */
1056 status = GdipAddPathCurve3(path, points, 4, 1, 1, 1.0);
1057 expect(Ok, status);
1060
1062}
GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points, INT count, INT offset, INT nseg, REAL tension)
Definition: graphicspath.c:595
GpStatus WINGDIPAPI GdipAddPathLine(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2)
Definition: graphicspath.c:804
GpStatus WINGDIPAPI GdipAddPathCurve(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:581
GpStatus WINGDIPAPI GdipResetPath(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath *path, GDIPCONST GpPointF *points, INT count, REAL tension)
Definition: graphicspath.c:667
static path_test_t addcurve_path2[]
Definition: graphicspath.c:934
static path_test_t addcurve_path4[]
Definition: graphicspath.c:957
static path_test_t addcurve_path[]
Definition: graphicspath.c:910
static path_test_t addcurve_path_default_tension[]
Definition: graphicspath.c:922
static path_test_t addcurve_path3[]
Definition: graphicspath.c:948
static path_test_t addcurve_path5[]
Definition: graphicspath.c:963

Referenced by START_TEST().

◆ test_addpie()

static void test_addpie ( void  )
static

Definition at line 1191 of file graphicspath.c.

1192{
1194 GpPath *path;
1195
1197
1198 /* NULL argument */
1199 status = GdipAddPathPie(NULL, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
1201
1202 status = GdipAddPathPie(path, 0.0, 0.0, 100.0, 50.0, 10.0, 50.0);
1203 expect(Ok, status);
1206 expect(Ok, status);
1207
1208 /* zero width base ellipse */
1209 status = GdipAddPathPie(path, 0.0, 0.0, 0.0, 60.0, -90.0, 24.0);
1213 expect(Ok, status);
1214
1215 /* zero height base ellipse */
1216 status = GdipAddPathPie(path, 0.0, 0.0, 60.0, 0.0 , -90.0, 24.0);
1219
1221}
GpStatus WINGDIPAPI GdipAddPathPie(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:864
static path_test_t addpie_path2[]
static path_test_t addpie_path3[]
static path_test_t addpie_path[]

Referenced by START_TEST().

◆ test_arc()

static void test_arc ( void  )
static

Definition at line 448 of file graphicspath.c.

449{
451 GpPath* path;
452
454
455 status = GdipAddPathArc(path, 100.0, 100.0, 1.0, 0.0, 0.0, 90.0);
457
458 status = GdipAddPathArc(path, 100.0, 100.0, 0.0, 1.0, 0.0, 90.0);
460
461 status = GdipAddPathArc(path, 100.0, 100.0, -40, 1.0, 0.0, 90.0);
463
464 status = GdipAddPathArc(path, 100.0, 100.0, 1.0, -50.0, 0.0, 90.0);
466
468 /* Exactly 90 degrees */
469 status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 90.0);
470 expect(Ok, status);
471 /* Over 90 degrees */
472 status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
473 expect(Ok, status);
474 /* Negative start angle */
475 status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0);
476 expect(Ok, status);
477 /* Negative sweep angle */
478 status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 80.0, -100.0);
479 expect(Ok, status);
480 /* More than a full revolution */
481 status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, -400.0);
482 expect(Ok, status);
483 /* 0 sweep angle */
484 status = GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 50.0, 0.0);
485 expect(Ok, status);
486
488
490 GdipAddPathLine(path, 1.0, 0.0, 1.0, 0.5);
491 status = GdipAddPathArc(path, 0.0, 0.0, 1.0, 1.0, 0.0, 90.0);
492 expect(Ok, status);
493
495
497}
GpStatus WINGDIPAPI GdipAddPathArc(GpPath *path, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
Definition: graphicspath.c:353
#define ok_path_fudge(a, b, c, d, e)
Definition: graphicspath.c:79
static path_test_t arc_path[]
Definition: graphicspath.c:400
static path_test_t arc_path2[]
Definition: graphicspath.c:440

Referenced by START_TEST().

◆ test_bezier()

static void test_bezier ( void  )
static

Definition at line 359 of file graphicspath.c.

360{
362 GpPath* path;
363
365
366 status = GdipAddPathBezier(path, 10.0, 10.0, 20.0, 10.0, 20.0, 20.0, 30.0, 20.0);
367 expect(Ok, status);
368 status = GdipAddPathBezier(path, 30.0, 20.0, 40.0, 20.0, 40.0, 30.0, 50.0, 30.0);
369 expect(Ok, status);
370 status = GdipAddPathBezier(path, 50.0, 10.0, 60.0, 10.0, 60.0, 20.0, 70.0, 20.0);
371 expect(Ok, status);
372
374
376}
GpStatus WINGDIPAPI GdipAddPathBezier(GpPath *path, REAL x1, REAL y1, REAL x2, REAL y2, REAL x3, REAL y3, REAL x4, REAL y4)
Definition: graphicspath.c:396
static path_test_t bezier_path[]
Definition: graphicspath.c:345

Referenced by START_TEST().

◆ test_beziers()

static void test_beziers ( void  )
static

Definition at line 378 of file graphicspath.c.

379{
381 GpPath* path;
382 PointF bezier_points1[] = {{10.0,10.0}, {20.0,10.0}, {20.0,20.0}, {30.0,20.0}};
383 PointF bezier_points2[] = {{30.0,20.0}, {40.0,20.0}, {40.0,30.0}, {50.0,30.0}};
384 PointF bezier_points3[] = {{50.0,10.0}, {60.0,10.0}, {60.0,20.0}, {70.0,20.0}};
385
387
388 status = GdipAddPathBeziers(path, bezier_points1, 4);
389 expect(Ok, status);
390 status = GdipAddPathBeziers(path, bezier_points2, 4);
391 expect(Ok, status);
392 status = GdipAddPathBeziers(path, bezier_points3, 4);
393 expect(Ok, status);
394
396
398}
GpStatus WINGDIPAPI GdipAddPathBeziers(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:429

Referenced by START_TEST().

◆ test_constructor_destructor()

static void test_constructor_destructor ( void  )
static

Definition at line 132 of file graphicspath.c.

133{
135 GpPath* path = NULL;
136
138 expect(Ok, status);
139 ok(path != NULL, "Expected path to be initialized\n");
140
143
145 expect(Ok, status);
146}
#define ok(value,...)
Definition: atltest.h:57

Referenced by START_TEST().

◆ test_createpath2()

static void test_createpath2 ( void  )
static

Definition at line 179 of file graphicspath.c.

180{
182 GpPath* path = NULL;
184 INT i, count, expect_count;
185
186 PointF test_line_points[] = {{1.0,1.0}, {2.0,1.0}, {2.0,2.0}};
188
189 PointF test_bez_points[] = {{1.0,1.0}, {2.0,1.0}, {3.0,1.0}, {4.0,1.0},
190 {5.0,1.0}, {6.0,1.0}, {7.0,1.0}};
191 BYTE test_bez_types[] = {PathPointTypeStart, PathPointTypeBezier,
194
195 status = GdipCreatePath2(test_line_points, test_line_types, 2, FillModeAlternate, &path);
196 expect(Ok, status);
198 expect(Ok, status);
199 expect(2, count);
201
202 status = GdipCreatePath2(test_line_points, test_line_types, 1, FillModeAlternate, &path);
203 expect(Ok, status);
205 expect(Ok, status);
206 expect(1, count);
208
209 path = (void *)0xdeadbeef;
210 status = GdipCreatePath2(test_line_points, test_line_types, 0, FillModeAlternate, &path);
212 ok(!path, "Expected NULL, got %p\n", path);
213 if(path && path != (void *)0xdeadbeef)
215
216 path = (void *)0xdeadbeef;
217 status = GdipCreatePath2(test_line_points, test_line_types, -1, FillModeAlternate, &path);
219 ok(!path, "Expected NULL, got %p\n", path);
220 if(path && path != (void *)0xdeadbeef)
222
223 path = (void *)0xdeadbeef;
224 status = GdipCreatePath2(NULL, test_line_types, 2, FillModeAlternate, &path);
226 ok(path == (void *)0xdeadbeef, "Expected %p, got %p\n", (void *)0xdeadbeef, path);
227 if(path && path != (void *)0xdeadbeef)
229
230 path = (void *)0xdeadbeef;
231 status = GdipCreatePath2(test_line_points, NULL, 2, FillModeAlternate, &path);
233 ok(path == (void *)0xdeadbeef, "Expected %p, got %p\n", (void *)0xdeadbeef, path);
234 if(path && path != (void *)0xdeadbeef)
236
237 status = GdipCreatePath2(test_line_points, test_line_types, 2, FillModeAlternate, NULL);
239
240 /* Multi-point paths should not end with Start */
241 status = GdipCreatePath2(test_line_points, test_line_types, 3, FillModeAlternate, &path);
242 expect(Ok, status);
244 expect(Ok, status);
245 expect(0, count);
247
248 /* Zero-length line points do not get altered */
249 test_line_points[1].X = test_line_points[0].X;
250 test_line_points[1].Y = test_line_points[0].Y;
251 status = GdipCreatePath2(test_line_points, test_line_types, 2, FillModeAlternate, &path);
252 expect(Ok, status);
254 expect(Ok, status);
255 expect(2, count);
257
258 /* The type of the first point is always converted to PathPointTypeStart */
259 test_line_types[0] = PathPointTypeLine;
260 status = GdipCreatePath2(test_line_points, test_line_types, 1, FillModeAlternate, &path);
261 expect(Ok, status);
263 expect(Ok, status);
264 expect(1, count);
265 data.Count = count;
266 data.Types = GdipAlloc(sizeof(BYTE) * count);
267 data.Points = GdipAlloc(sizeof(PointF) * count);
269 expect(Ok, status);
270 expect((data.Points[0].X == 1.0) && (data.Points[0].Y == 1.0), TRUE);
271 expect(data.Types[0], PathPointTypeStart);
272 GdipFree(data.Points);
273 GdipFree(data.Types);
275
276 /* Bezier points must come in groups of three */
277 for(i = 2; i <= 7; i++) {
278 expect_count = (i % 3 == 1) ? i : 0;
279 status = GdipCreatePath2(test_bez_points, test_bez_types, i, FillModeAlternate, &path);
280 expect(Ok, status);
282 expect(Ok, status);
283 expect(expect_count, count);
285 }
286}
#define TRUE
Definition: types.h:120
GpStatus WINGDIPAPI GdipGetPathData(GpPath *path, GpPathData *pathData)
GpStatus WINGDIPAPI GdipCreatePath2(GDIPCONST GpPointF *points, GDIPCONST BYTE *types, INT count, GpFillMode fill, GpPath **path)
void WINGDIPAPI GdipFree(void *ptr)
Definition: gdiplus.c:152
void *WINGDIPAPI GdipAlloc(SIZE_T size)
Definition: gdiplus.c:144
@ OutOfMemory
Definition: gdiplustypes.h:28
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
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
REAL Y
Definition: gdiplustypes.h:644

Referenced by START_TEST().

◆ test_ellipse()

static void test_ellipse ( void  )
static

Definition at line 724 of file graphicspath.c.

725{
727 GpPath *path;
728 GpPointF points[2];
729
730 points[0].X = 7.0;
731 points[0].Y = 11.0;
732 points[1].X = 13.0;
733 points[1].Y = 17.0;
734
736 status = GdipAddPathEllipse(path, 10.0, 100.0, 20.0, 50.5);
737 expect(Ok, status);
739 status = GdipAddPathEllipse(path, 10.0, 200.0, -5.0, -10.0);
740 expect(Ok, status);
742 status = GdipAddPathEllipse(path, 10.0, 300.0, 0.0, 1.0);
743 expect(Ok, status);
744
746
748}
GpStatus WINGDIPAPI GdipAddPathLine2(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:743
GpStatus WINGDIPAPI GdipClosePathFigure(GpPath *path)
GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width, REAL height)
Definition: graphicspath.c:703
static path_test_t ellipse_path[]
Definition: graphicspath.c:680

Referenced by START_TEST().

◆ test_empty_rect()

static void test_empty_rect ( void  )
static

Definition at line 2136 of file graphicspath.c.

2137{
2138 GpPath *path;
2140 INT count;
2141 BOOL result;
2142
2144 expect(Ok, status);
2145
2146 status = GdipAddPathRectangle(path, 0.0, 0.0, -5.0, 5.0);
2147 expect(Ok, status);
2148
2150 expect(Ok, status);
2151 expect(0, count);
2152
2153 status = GdipIsVisiblePathPoint(path, -2.0, 2.0, NULL, &result);
2154 expect(Ok, status);
2156
2157 status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, -5.0);
2158 expect(Ok, status);
2159
2161 expect(Ok, status);
2162 expect(0, count);
2163
2164 status = GdipAddPathRectangle(path, 0.0, 0.0, 0.0, 5.0);
2165 expect(Ok, status);
2166
2168 expect(Ok, status);
2169 expect(0, count);
2170
2171 status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, 0.0);
2172 expect(Ok, status);
2173
2175 expect(Ok, status);
2176 expect(0, count);
2177
2178 status = GdipAddPathRectangle(path, 0.0, 0.0, 5.0, 0.1);
2179 expect(Ok, status);
2180
2182 expect(Ok, status);
2183 expect(4, count);
2184
2186}
GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y, REAL width, REAL height)
GpStatus WINGDIPAPI GdipIsVisiblePathPoint(GpPath *path, REAL x, REAL y, GpGraphics *graphics, BOOL *result)
GLuint64EXT * result
Definition: glext.h:11304

Referenced by START_TEST().

◆ test_flatten()

static void test_flatten ( void  )
static

Definition at line 1278 of file graphicspath.c.

1279{
1281 GpPath *path;
1282 GpMatrix *m;
1283
1285 expect(Ok, status);
1287 expect(Ok, status);
1288
1289 /* NULL arguments */
1292 status = GdipFlattenPath(NULL, m, 0.0);
1294
1295 /* flatten empty path */
1297 expect(Ok, status);
1298
1300 expect(Ok, status);
1301
1302 status = GdipAddPathEllipse(path, 0.0, 0.0, 100.0, 50.0);
1303 expect(Ok, status);
1304
1306 expect(Ok, status);
1308
1310 expect(Ok, status);
1311 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 100.0);
1312 expect(Ok, status);
1314 expect(Ok, status);
1316
1318 expect(Ok, status);
1319 status = GdipAddPathArc(path, 0.0, 0.0, 100.0, 50.0, 0.0, 90.0);
1320 expect(Ok, status);
1322 expect(Ok, status);
1324
1325 /* easy case - quater of a full circle */
1327 expect(Ok, status);
1328 status = GdipAddPathArc(path, 0.0, 0.0, 100.0, 100.0, 0.0, 90.0);
1329 expect(Ok, status);
1331 expect(Ok, status);
1333
1335 expect(Ok, status);
1337 expect(Ok, status);
1338
1339 /* path seen in the wild that caused a stack overflow */
1340 /* same path but redo with the manual points that caused a crash */
1341 status = GdipAddPathBezier(path, 154.950806, 33.391144, 221.586075, 15.536285, 291.747314, 15.536285, 358.382568, 33.391144);
1342 expect(Ok, status);
1343 status = GdipAddPathBezier(path, 256.666809, 412.999512, 256.666718, 412.999481, 256.666656, 412.999481, 256.666565, 412.999512);
1344 expect(Ok, status);
1346 expect(Ok, status);
1348 expect(Ok, status);
1349
1352}
GpStatus WINGDIPAPI GdipFlattenPath(GpPath *path, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipTransformPath(GpPath *path, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipStartPathFigure(GpPath *path)
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
Definition: matrix.c:156
GpStatus WINGDIPAPI GdipCreateMatrix(GpMatrix **matrix)
Definition: matrix.c:136
const GLfloat * m
Definition: glext.h:10848
static path_test_t flattenarc_path[]
static path_test_t flattenellipse_path[]
static path_test_t flattenquater_path[]
static path_test_t flattenline_path[]

Referenced by START_TEST().

◆ test_getpathdata()

static void test_getpathdata ( void  )
static

Definition at line 148 of file graphicspath.c.

149{
150 GpPath *path;
153 INT count;
154
156 expect(Ok, status);
157 status = GdipAddPathLine(path, 5.0, 5.0, 100.0, 50.0);
158 expect(Ok, status);
159
161 expect(Ok, status);
162 expect(2, count);
163
164 data.Count = count;
165 data.Types = GdipAlloc(sizeof(BYTE) * count);
166 data.Points = GdipAlloc(sizeof(PointF) * count);
167
169 expect(Ok, status);
170 expect((data.Points[0].X == 5.0) && (data.Points[0].Y == 5.0) &&
171 (data.Points[1].X == 100.0) && (data.Points[1].Y == 50.0), TRUE);
172 expect((data.Types[0] == PathPointTypeStart) && (data.Types[1] == PathPointTypeLine), TRUE);
173
174 GdipFree(data.Points);
175 GdipFree(data.Types);
177}

Referenced by START_TEST().

◆ test_is_outline_visible_path_point()

static void test_is_outline_visible_path_point ( void  )
static

Definition at line 1995 of file graphicspath.c.

1996{
1997 BOOL result;
1999 GpGraphics *graphics = NULL;
2000 GpPath *path;
2001 GpPen *pen = NULL;
2003 static const int width = 20, height = 20;
2004
2005 /* Graphics associated with an Image object.*/
2007 expect(Ok, status);
2009 expect(Ok, status);
2010 ok(graphics != NULL, "Expected the graphics context to be initialized.\n");
2011
2013 expect(Ok, status);
2014
2015 status = GdipAddPathRectangle(path, 2.0, 0.0, 13.0, 15.0);
2016 expect(Ok, status);
2017
2018 status = GdipCreatePen1((ARGB)0xffff00ff, 3.0f, UnitPixel, &pen);
2019 expect(Ok, status);
2020 ok(pen != NULL, "Expected pen to be initialized\n");
2021
2022 /* With NULL pen */
2023 result = 9;
2024 status = GdipIsOutlineVisiblePathPoint(path, 0.0, 1.0, NULL, graphics, &result);
2026 expect(9, result);
2027
2028 /* Without transformation */
2029 result = TRUE;
2030 status = GdipIsOutlineVisiblePathPoint(path, 0.0, 1.0, pen, graphics, &result);
2031 expect(Ok, status);
2033 result = FALSE;
2034 status = GdipIsOutlineVisiblePathPoint(path, 1.0, 1.0, pen, graphics, &result);
2035 expect(Ok, status);
2036 expect(TRUE, result);
2037 result = FALSE;
2038 status = GdipIsOutlineVisiblePathPoint(path, 10.0, 1.0, pen, graphics, &result);
2039 expect(Ok, status);
2040 expect(TRUE, result);
2041 result = FALSE;
2042 status = GdipIsOutlineVisiblePathPoint(path, 16.0, 1.0, pen, graphics, &result);
2043 expect(Ok, status);
2044 expect(TRUE, result);
2045 result = TRUE;
2046 status = GdipIsOutlineVisiblePathPoint(path, 17.0, 1.0, pen, graphics, &result);
2047 expect(Ok, status);
2049
2050 /* Translating */
2051 status = GdipTranslateWorldTransform(graphics, 50.0, 50.0, MatrixOrderPrepend);
2052 expect(Ok, status);
2053 result = FALSE;
2054 status = GdipIsOutlineVisiblePathPoint(path, 10.0, 1.0, pen, graphics, &result);
2055 expect(Ok, status);
2056 expect(TRUE, result);
2057 result = FALSE;
2058 status = GdipIsOutlineVisiblePathPoint(path, 15.0, 1.0, pen, graphics, &result);
2059 expect(Ok, status);
2060 expect(TRUE, result);
2061 result = FALSE;
2062 status = GdipIsOutlineVisiblePathPoint(path, 16.0, 1.0, pen, graphics, &result);
2063 expect(Ok, status);
2064 expect(TRUE, result);
2065
2066 /* Scaling */
2067 status = GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderPrepend);
2068 expect(Ok, status);
2069 result = TRUE;
2070 status = GdipIsOutlineVisiblePathPoint(path, 0.0, 1.0, pen, graphics, &result);
2071 expect(Ok, status);
2073 result = TRUE;
2074 status = GdipIsOutlineVisiblePathPoint(path, 1.0, 1.0, pen, graphics, &result);
2075 expect(Ok, status);
2077 result = FALSE;
2078 status = GdipIsOutlineVisiblePathPoint(path, 2.0, 1.0, pen, graphics, &result);
2079 expect(Ok, status);
2080 expect(TRUE, result);
2081 result = TRUE;
2082 status = GdipIsOutlineVisiblePathPoint(path, 3.0, 1.0, pen, graphics, &result);
2083 expect(Ok, status);
2085 result = TRUE;
2086 status = GdipIsOutlineVisiblePathPoint(path, 14.0, 1.0, pen, graphics, &result);
2087 expect(Ok, status);
2089 result = FALSE;
2090 status = GdipIsOutlineVisiblePathPoint(path, 15.0, 1.0, pen, graphics, &result);
2091 expect(Ok, status);
2092 expect(TRUE, result);
2093 result = TRUE;
2094 status = GdipIsOutlineVisiblePathPoint(path, 16.0, 1.0, pen, graphics, &result);
2095 expect(Ok, status);
2097
2098 /* Page Unit */
2099 GdipResetWorldTransform(graphics);
2101 expect(Ok, status);
2102 result = TRUE;
2103 status = GdipIsOutlineVisiblePathPoint(path, 0.0, 1.0, pen, graphics, &result);
2104 expect(Ok, status);
2106 result = TRUE;
2107 status = GdipIsOutlineVisiblePathPoint(path, 1.0, 1.0, pen, graphics, &result);
2108 expect(Ok, status);
2110 result = FALSE;
2111 status = GdipIsOutlineVisiblePathPoint(path, 2.0, 1.0, pen, graphics, &result);
2112 expect(Ok, status);
2113 expect(TRUE, result);
2114 result = TRUE;
2115 status = GdipIsOutlineVisiblePathPoint(path, 3.0, 1.0, pen, graphics, &result);
2116 expect(Ok, status);
2118 result = TRUE;
2119 status = GdipIsOutlineVisiblePathPoint(path, 14.0, 1.0, pen, graphics, &result);
2120 expect(Ok, status);
2122 result = FALSE;
2123 status = GdipIsOutlineVisiblePathPoint(path, 15.0, 1.0, pen, graphics, &result);
2124 expect(Ok, status);
2125 expect(TRUE, result);
2126 result = TRUE;
2127 status = GdipIsOutlineVisiblePathPoint(path, 16.0, 1.0, pen, graphics, &result);
2128 expect(Ok, status);
2130
2131 GdipResetWorldTransform(graphics);
2133 GdipDeleteGraphics(graphics);
2134}
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
Definition: graphics.c:2616
GpStatus WINGDIPAPI GdipScaleWorldTransform(GpGraphics *graphics, REAL sx, REAL sy, GpMatrixOrder order)
Definition: graphics.c:6406
GpStatus WINGDIPAPI GdipTranslateWorldTransform(GpGraphics *graphics, REAL dx, REAL dy, GpMatrixOrder order)
Definition: graphics.c:6748
GpStatus WINGDIPAPI GdipSetPageUnit(GpGraphics *graphics, GpUnit unit)
Definition: graphics.c:6560
GpStatus WINGDIPAPI GdipResetWorldTransform(GpGraphics *graphics)
Definition: graphics.c:6194
GpStatus WINGDIPAPI GdipIsOutlineVisiblePathPoint(GpPath *path, REAL x, REAL y, GpPen *pen, GpGraphics *graphics, BOOL *result)
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
Definition: image.c:1793
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics)
Definition: image.c:2195
GpStatus WINGDIPAPI GdipCreatePen1(ARGB color, REAL width, GpUnit unit, GpPen **pen)
Definition: pen.c:146
@ MatrixOrderPrepend
Definition: gdiplusenums.h:187
@ UnitMillimeter
Definition: gdiplusenums.h:33
@ UnitPixel
Definition: gdiplusenums.h:29
DWORD ARGB
#define PixelFormat32bppRGB
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
Definition: uimain.c:89

Referenced by START_TEST().

◆ test_isvisible()

static void test_isvisible ( void  )
static

Definition at line 1931 of file graphicspath.c.

1932{
1933 GpPath *path;
1934 GpGraphics *graphics = NULL;
1935 HDC hdc = GetDC(0);
1936 BOOL result;
1938
1939 status = GdipCreateFromHDC(hdc, &graphics);
1940 expect(Ok, status);
1942 expect(Ok, status);
1943
1944 /* NULL */
1951 status = GdipIsVisiblePathPoint(path, 0.0, 0.0, graphics, NULL);
1953
1954 /* empty path */
1955 result = TRUE;
1957 expect(Ok, status);
1959 /* rect */
1960 status = GdipAddPathRectangle(path, 0.0, 0.0, 10.0, 10.0);
1961 expect(Ok, status);
1962 result = FALSE;
1964 expect(Ok, status);
1965 expect(TRUE, result);
1966 result = TRUE;
1967 status = GdipIsVisiblePathPoint(path, 11.0, 11.0, NULL, &result);
1968 expect(Ok, status);
1970 /* not affected by clipping */
1971 status = GdipSetClipRect(graphics, 5.0, 5.0, 5.0, 5.0, CombineModeReplace);
1972 expect(Ok, status);
1973 result = FALSE;
1974 status = GdipIsVisiblePathPoint(path, 0.0, 0.0, graphics, &result);
1975 expect(Ok, status);
1976 expect(TRUE, result);
1977 /* not affected by world transform */
1978 status = GdipScaleWorldTransform(graphics, 2.0, 2.0, MatrixOrderPrepend);
1979 expect(Ok, status);
1980 result = FALSE;
1981 status = GdipIsVisiblePathPoint(path, 9.0, 9.0, graphics, &result);
1982 expect(Ok, status);
1983 expect(TRUE, result);
1984 result = TRUE;
1985 status = GdipIsVisiblePathPoint(path, 11.0, 11.0, graphics, &result);
1986 expect(Ok, status);
1988 GdipResetWorldTransform(graphics);
1989
1991 GdipDeleteGraphics(graphics);
1992 ReleaseDC(0, hdc);
1993}
GpStatus WINGDIPAPI GdipCreateFromHDC(HDC hdc, GpGraphics **graphics)
Definition: graphics.c:2434
GpStatus WINGDIPAPI GdipSetClipRect(GpGraphics *graphics, REAL x, REAL y, REAL width, REAL height, CombineMode mode)
Definition: graphics.c:6842
@ CombineModeReplace
Definition: gdiplusenums.h:388
HDC hdc
Definition: main.c:9
static HDC
Definition: imagelist.c:88
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by run_tests(), and START_TEST().

◆ test_lastpoint()

static void test_lastpoint ( void  )
static

Definition at line 885 of file graphicspath.c.

886{
888 GpPath *path;
889 GpPointF ptf;
890
892 status = GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0);
893 expect(Ok, status);
894
895 /* invalid args */
902
904 expect(Ok, status);
905 expect(TRUE, (ptf.X == 5.0) && (ptf.Y == 55.0));
906
908}
GpStatus WINGDIPAPI GdipGetPathLastPoint(GpPath *path, GpPointF *lastPoint)

Referenced by START_TEST().

◆ test_line2()

static void test_line2 ( void  )
static

Definition at line 300 of file graphicspath.c.

301{
303 GpPath* path;
304 int i;
305 GpPointF line2_points[9];
306
307 for(i = 0; i < 9; i ++){
308 line2_points[i].X = i * 5.0 * (REAL)(i % 2);
309 line2_points[i].Y = 50.0 - i * 5.0;
310 }
311
313
314 status = GdipAddPathLine2(NULL, line2_points, 2);
318 status = GdipAddPathLine2(path, line2_points, 0);
320 status = GdipAddPathLine2(path, line2_points, -1);
322
323 status = GdipAddPathLine2(path, line2_points, 3);
324 expect(Ok, status);
325 status = GdipAddPathLine2(path, &(line2_points[3]), 3);
326 expect(Ok, status);
328 expect(Ok, status);
329 status = GdipAddPathLine2(path, &(line2_points[6]), 3);
330 expect(Ok, status);
331
333
335 status = GdipAddPathLine2(path, line2_points, 3);
336 expect(Ok, status);
337 status = GdipAddPathLine2(path, &(line2_points[2]), 3);
338 expect(Ok, status);
339
341
343}
float REAL
Definition: types.h:41
static path_test_t line2_path[]
Definition: graphicspath.c:288

Referenced by START_TEST().

◆ test_linei()

static void test_linei ( void  )
static

Definition at line 767 of file graphicspath.c.

768{
770 GpPath *path;
771
773 status = GdipAddPathLineI(path, 5.0, 5.0, 6.0, 8.0);
774 expect(Ok, status);
775 GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0);
776 status = GdipAddPathLineI(path, 15.0, 15.0, 26.0, 28.0);
777 expect(Ok, status);
779 status = GdipAddPathLineI(path, 35.0, 35.0, 36.0, 38.0);
780 expect(Ok, status);
781 status = GdipAddPathLineI(path, 36, 38, 39, 40);
782 expect(Ok, status);
783
785
787}
GpStatus WINGDIPAPI GdipAddPathLineI(GpPath *path, INT x1, INT y1, INT x2, INT y2)
Definition: graphicspath.c:826
static path_test_t linei_path[]
Definition: graphicspath.c:750

Referenced by START_TEST().

◆ test_pathpath()

static void test_pathpath ( void  )
static

Definition at line 658 of file graphicspath.c.

659{
661 GpPath* path1, *path2;
662
664 GdipAddPathArc(path2, 100.0, 100.0, 500.0, 700.0, 95.0, 100.0);
665
667 GdipAddPathArc(path1, 100.0, 100.0, 500.0, 700.0, 0.0, 90.0);
669 expect(Ok, status);
670 GdipAddPathArc(path1, 100.0, 100.0, 500.0, 700.0, -80.0, 100.0);
672 expect(Ok, status);
673
675
678}
GpStatus WINGDIPAPI GdipAddPathPath(GpPath *path, GDIPCONST GpPath *addingPath, BOOL connect)
Definition: graphicspath.c:833
static path_test_t pathpath_path[]
Definition: graphicspath.c:630
static const WCHAR path1[]
Definition: path.c:28
static const WCHAR path2[]
Definition: path.c:29

Referenced by START_TEST().

◆ test_polygon()

static void test_polygon ( void  )
static

Definition at line 799 of file graphicspath.c.

800{
802 GpPath *path;
803 GpPointF points[5];
804
805 points[0].X = 0.0;
806 points[0].Y = 0.0;
807 points[1].X = 10.0;
808 points[1].Y = 10.0;
809 points[2].X = 10.0;
810 points[2].Y = 20.0;
811 points[3].X = 30.0;
812 points[3].Y = 10.0;
813 points[4].X = 20.0;
814 points[4].Y = 0.0;
815
817
818 /* NULL args */
823 /* Polygon should have 3 points at least */
826
827 /* to test how it prolongs not empty path */
828 status = GdipAddPathLine(path, 5.0, 5.0, 6.0, 8.0);
829 expect(Ok, status);
831 expect(Ok, status);
832 /* check resulting path */
834
836}
GpStatus WINGDIPAPI GdipAddPathPolygon(GpPath *path, GDIPCONST GpPointF *points, INT count)
Definition: graphicspath.c:932
static path_test_t poly_path[]
Definition: graphicspath.c:789

Referenced by D3DXCreatePolygonTest(), and START_TEST().

◆ test_rect()

static void test_rect ( void  )
static

Definition at line 850 of file graphicspath.c.

851{
853 GpPath *path;
854 GpRectF rects[2];
855
857 status = GdipAddPathRectangle(path, 5.0, 5.0, 100.0, 50.0);
858 expect(Ok, status);
859 status = GdipAddPathRectangle(path, 100.0, 50.0, 120.0, 30.0);
860 expect(Ok, status);
861
863
865
867
868 rects[0].X = 5.0;
869 rects[0].Y = 5.0;
870 rects[0].Width = 100.0;
871 rects[0].Height = 50.0;
872 rects[1].X = 100.0;
873 rects[1].Y = 50.0;
874 rects[1].Width = 120.0;
875 rects[1].Height = 30.0;
876
878 expect(Ok, status);
879
881
883}
GpStatus WINGDIPAPI GdipAddPathRectangles(GpPath *path, GDIPCONST GpRectF *rects, INT count)
#define GDIPCONST
Definition: gdiplusflat.h:24
static path_test_t rect_path[]
Definition: graphicspath.c:838
REAL Height
Definition: gdiplustypes.h:659
REAL X
Definition: gdiplustypes.h:656
REAL Width
Definition: gdiplustypes.h:658
REAL Y
Definition: gdiplustypes.h:657

Referenced by START_TEST(), and test_gethrgn().

◆ test_rect_line()

static void test_rect_line ( void  )
static

Definition at line 2197 of file graphicspath.c.

2198{
2200 GpPath* path;
2201
2203
2204 status = GdipAddPathRectangleI(path, 1, 4, 16, 64);
2205 expect(Ok, status);
2206
2207 status = GdipAddPathLineI(path, 1, 8, 17, 8);
2208 expect(Ok, status);
2209
2211
2213}
GpStatus WINGDIPAPI GdipAddPathRectangleI(GpPath *path, INT x, INT y, INT width, INT height)
static path_test_t rect_line_path[]

Referenced by START_TEST().

◆ test_reverse()

static void test_reverse ( void  )
static

Definition at line 1145 of file graphicspath.c.

1146{
1148 GpPath *path;
1149 GpPointF pts[7];
1150 INT i;
1151
1152 for(i = 0; i < 7; i++){
1153 pts[i].X = i * 5.0 * (REAL)(i % 2);
1154 pts[i].Y = 50.0 - i * 5.0;
1155 }
1156
1158
1159 /* NULL argument */
1162
1163 /* empty path */
1165 expect(Ok, status);
1166
1167 GdipAddPathLine2(path, pts, 4);
1169 GdipAddPathLine2(path, &(pts[4]), 3);
1170
1172 expect(Ok, status);
1174
1176}
GpStatus WINGDIPAPI GdipReversePath(GpPath *path)
static path_test_t reverse_path[]

Referenced by START_TEST().

◆ test_widen()

static void test_widen ( void  )
static

Definition at line 1397 of file graphicspath.c.

1398{
1400 GpPath *path;
1401 GpPen *pen;
1402 GpMatrix *m;
1403 INT count=-1;
1404
1406 expect(Ok, status);
1407 status = GdipCreatePen1(0xffffffff, 10.0, UnitPixel, &pen);
1408 expect(Ok, status);
1410 expect(Ok, status);
1411
1412 /* NULL arguments */
1413 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1414 expect(Ok, status);
1415 status = GdipWidenPath(NULL, NULL, NULL, 0.0);
1417 status = GdipWidenPath(path, pen, m, 0.0);
1418 expect(Ok, status);
1419 status = GdipWidenPath(path, pen, NULL, 1.0);
1420 expect(Ok, status);
1421 status = GdipWidenPath(path, NULL, m, 1.0);
1423 status = GdipWidenPath(NULL, pen, m, 1.0);
1425
1426 /* widen empty path */
1428 expect(Ok, status);
1429 status = GdipWidenPath(path, pen, m, 1.0);
1431
1432 /* horizontal line */
1434 expect(Ok, status);
1435 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1436 expect(Ok, status);
1437
1438 status = GdipWidenPath(path, pen, m, 1.0);
1439 expect(Ok, status);
1441
1442 /* horizontal 2x stretch */
1444 expect(Ok, status);
1445 status = GdipAddPathLine(path, 2.5, 10.0, 25.0, 10.0);
1446 expect(Ok, status);
1447
1449 expect(Ok, status);
1450
1451 status = GdipWidenPath(path, pen, m, 1.0);
1452 expect(Ok, status);
1454
1455 /* vertical 2x stretch */
1457 expect(Ok, status);
1458 status = GdipAddPathLine(path, 5.0, 5.0, 50.0, 5.0);
1459 expect(Ok, status);
1460
1462 expect(Ok, status);
1463
1464 status = GdipWidenPath(path, pen, m, 1.0);
1465 expect(Ok, status);
1467
1469 expect(Ok, status);
1470
1471 /* dashed line */
1473 expect(Ok, status);
1474 status = GdipAddPathLine(path, 5.0, 5.0, 50.0, 5.0);
1475 expect(Ok, status);
1476
1478 expect(Ok, status);
1479
1480 status = GdipWidenPath(path, pen, m, 1.0);
1481 expect(Ok, status);
1483
1485 expect(Ok, status);
1486
1487 /* dashed line less than 1 pixel wide */
1488 GdipDeletePen(pen);
1489 GdipCreatePen1(0xffffffff, 0.5, UnitPixel, &pen);
1491
1493 GdipAddPathLine(path, 5.0, 5.0, 9.5, 5.0);
1494
1495 status = GdipWidenPath(path, pen, m, 1.0);
1496 expect(Ok, status);
1498
1499 /* pen width in UnitWorld */
1500 GdipDeletePen(pen);
1501 status = GdipCreatePen1(0xffffffff, 10.0, UnitWorld, &pen);
1502 expect(Ok, status);
1503
1505 expect(Ok, status);
1506 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1507 expect(Ok, status);
1508
1509 status = GdipWidenPath(path, pen, m, 1.0);
1510 expect(Ok, status);
1512
1513 /* horizontal 2x stretch */
1515 expect(Ok, status);
1516 status = GdipAddPathLine(path, 2.5, 10.0, 25.0, 10.0);
1517 expect(Ok, status);
1518
1520 expect(Ok, status);
1521
1522 status = GdipWidenPath(path, pen, m, 1.0);
1523 expect(Ok, status);
1525
1526 /* vertical 2x stretch */
1528 expect(Ok, status);
1529 status = GdipAddPathLine(path, 5.0, 5.0, 50.0, 5.0);
1530 expect(Ok, status);
1531
1533 expect(Ok, status);
1534
1535 status = GdipWidenPath(path, pen, m, 1.0);
1536 expect(Ok, status);
1538
1540 expect(Ok, status);
1541
1542 /* pen width in UnitInch */
1543 GdipDeletePen(pen);
1544 status = GdipCreatePen1(0xffffffff, 10.0, UnitWorld, &pen);
1545 expect(Ok, status);
1546
1548 expect(Ok, status);
1549 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1550 expect(Ok, status);
1551
1552 status = GdipWidenPath(path, pen, m, 1.0);
1553 expect(Ok, status);
1555
1556 /* pen width = 0 pixels - native fails to widen but can draw with this pen */
1557 GdipDeletePen(pen);
1558 status = GdipCreatePen1(0xffffffff, 0.0, UnitPixel, &pen);
1559 expect(Ok, status);
1560
1562 expect(Ok, status);
1563 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1564 expect(Ok, status);
1565
1566 status = GdipWidenPath(path, pen, m, 1.0);
1567 expect(Ok, status);
1568
1570 expect(Ok, status);
1571 ok(count == 0 || broken(count == 4), "expected 0, got %i\n", count);
1572
1573 /* pen width = 0 pixels, UnitWorld - result is a path 1 unit wide */
1574 GdipDeletePen(pen);
1575 status = GdipCreatePen1(0xffffffff, 0.0, UnitWorld, &pen);
1576 expect(Ok, status);
1577
1579 expect(Ok, status);
1580 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1581 expect(Ok, status);
1582
1583 status = GdipWidenPath(path, pen, m, 1.0);
1584 expect(Ok, status);
1585
1587 expect(Ok, status);
1589
1591 GdipDeletePen(pen);
1593}
#define broken(x)
Definition: atltest.h:178
GpStatus WINGDIPAPI GdipWidenPath(GpPath *path, GpPen *pen, GpMatrix *matrix, REAL flatness)
GpStatus WINGDIPAPI GdipScaleMatrix(GpMatrix *matrix, REAL scaleX, REAL scaleY, GpMatrixOrder order)
Definition: matrix.c:288
GpStatus WINGDIPAPI GdipDeletePen(GpPen *pen)
Definition: pen.c:204
GpStatus WINGDIPAPI GdipSetPenDashStyle(GpPen *pen, GpDashStyle dash)
Definition: pen.c:688
@ DashStyleSolid
Definition: gdiplusenums.h:177
@ DashStyleDash
Definition: gdiplusenums.h:178
@ MatrixOrderAppend
Definition: gdiplusenums.h:188
@ UnitWorld
Definition: gdiplusenums.h:27
static path_test_t widenline_unit_path[]
static path_test_t widenline_thin_dash_path[]
static path_test_t widenline_path[]
static path_test_t widenline_dash_path[]
static path_test_t widenline_wide_path[]

Referenced by START_TEST().

◆ test_widen_cap()

static void test_widen_cap ( void  )
static

Definition at line 1797 of file graphicspath.c.

1798{
1799 struct
1800 {
1801 LineCap type;
1803 const path_test_t *expected;
1804 INT expected_size;
1805 BOOL dashed;
1806 }
1807 caps[] =
1808 {
1831 };
1832
1833 GpAdjustableArrowCap *arrowcap;
1835 GpPath *path;
1836 GpPen *pen;
1837
1838 int i;
1839
1841 expect(Ok, status);
1842
1843 for (i = 0; i < ARRAY_SIZE(caps); i++)
1844 {
1845 status = GdipCreatePen1(0xffffffff, caps[i].line_width, UnitPixel, &pen);
1846 expect(Ok, status);
1847 if (caps[i].dashed)
1848 {
1850 expect(Ok, status);
1851 }
1852
1854 expect(Ok, status);
1855 status = GdipAddPathLine(path, 5.0, 10.0, 50.0, 10.0);
1856 expect(Ok, status);
1857 status = GdipSetPenStartCap(pen, caps[i].type);
1858 expect(Ok, status);
1859 status = GdipSetPenEndCap(pen, caps[i].type);
1860 expect(Ok, status);
1861
1863 expect(Ok, status);
1864
1865 if (i == 9)
1866 {
1867 INT size;
1869 expect(Ok, status);
1870 ok(size == caps[i].expected_size || broken(size == 12), "unexpected path size %i\n", size);
1871
1872 if (size == 12)
1873 {
1874 GdipDeletePen(pen);
1875 continue;
1876 }
1877 }
1878
1879 ok_path_fudge(path, caps[i].expected, caps[i].expected_size, FALSE, 0.000005);
1880
1881 GdipDeletePen(pen);
1882 }
1883
1884 status = GdipCreatePen1(0xffffffff, 10.0, UnitPixel, &pen);
1885 expect(Ok, status);
1887 expect(Ok, status);
1888 status = GdipAddPathLine(path, 5.0, 10.0, 25.0, 10.0);
1889 expect(Ok, status);
1891 expect(Ok, status);
1892 status = GdipAddPathLine(path, 30.0, 10.0, 50.0, 10.0);
1893 expect(Ok, status);
1895 expect(Ok, status);
1897 expect(Ok, status);
1899 expect(Ok, status);
1902
1904 expect(Ok, status);
1905 status = GdipAddPathLine(path, 5.0, 10.0, 25.0, 10.0);
1906 expect(Ok, status);
1908 expect(Ok, status);
1909 status = GdipAddPathLine(path, 30.0, 10.0, 30.0, 30.0);
1910 expect(Ok, status);
1911 status = GdipCreateAdjustableArrowCap(4.0, 4.0, TRUE, &arrowcap);
1912 ok(status == Ok, "Failed to create adjustable cap, %d\n", status);
1914 ok(status == Ok, "Failed to set middle inset inadjustable cap, %d\n", status);
1916 ok(status == Ok, "Failed to create custom end cap, %d\n", status);
1918 ok(status == Ok, "Failed to create custom end cap, %d\n", status);
1919 status = GdipSetPenWidth(pen, 1.0);
1920 expect(Ok, status);
1922 expect(Ok, status);
1925
1926 GdipDeletePen(pen);
1927
1929}
GpStatus WINGDIPAPI GdipCreateAdjustableArrowCap(REAL height, REAL width, BOOL fill, GpAdjustableArrowCap **cap)
GpStatus WINGDIPAPI GdipSetAdjustableArrowCapMiddleInset(GpAdjustableArrowCap *cap, REAL middle)
GpStatus WINGDIPAPI GdipSetPenWidth(GpPen *pen, REAL width)
Definition: pen.c:784
GpStatus WINGDIPAPI GdipSetPenCustomEndCap(GpPen *pen, GpCustomLineCap *customCap)
Definition: pen.c:590
GpStatus WINGDIPAPI GdipSetPenEndCap(GpPen *pen, GpLineCap cap)
Definition: pen.c:709
GpStatus WINGDIPAPI GdipSetPenStartCap(GpPen *pen, GpLineCap cap)
Definition: pen.c:771
GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap *customCap)
Definition: pen.c:609
LineCap
Definition: gdiplusenums.h:60
@ LineCapTriangle
Definition: gdiplusenums.h:64
@ LineCapArrowAnchor
Definition: gdiplusenums.h:70
@ LineCapNoAnchor
Definition: gdiplusenums.h:66
@ LineCapSquare
Definition: gdiplusenums.h:62
@ LineCapSquareAnchor
Definition: gdiplusenums.h:67
@ LineCapRound
Definition: gdiplusenums.h:63
@ LineCapRoundAnchor
Definition: gdiplusenums.h:68
@ LineCapFlat
Definition: gdiplusenums.h:61
@ LineCapDiamondAnchor
Definition: gdiplusenums.h:69
#define FlatnessDefault
Definition: gdiplusenums.h:759
static path_test_t widenline_capdiamondanchor_path[]
static path_test_t widenline_capround_path[]
static path_test_t widenline_capsquareanchor_multifigure_path[]
static path_test_t widenline_capsquareanchor_thin_path[]
static path_test_t widenline_capsquareanchor_dashed_path[]
static path_test_t widenline_capsquareanchor_path[]
static path_test_t widenline_caparrowanchor_path[]
static path_test_t widenline_captriangle_path[]
static path_test_t widenline_caproundanchor_path[]
static path_test_t widenline_capflat_path[]
static path_test_t widenline_customarrow_multifigure_path[]
static path_test_t widenline_capsquare_path[]
const int line_width
Definition: patblt.cpp:81

Referenced by START_TEST().

◆ test_worldbounds()

static void test_worldbounds ( void  )
static

Definition at line 499 of file graphicspath.c.

500{
502 GpPath *path;
503 GpPen *pen;
505 GpRectF bounds;
506 GpPointF line2_points[10];
507 int i;
508
509 for(i = 0; i < 10; i ++){
510 line2_points[i].X = 200.0 + i * 50.0 * (i % 2);
511 line2_points[i].Y = 200.0 + i * 50.0 * !(i % 2);
512 }
513 GdipCreatePen1((ARGB)0xdeadbeef, 20.0, UnitWorld, &pen);
515 GdipCreateMatrix2(1.5, 0.0, 1.0, 1.2, 10.4, 10.2, &matrix);
516
518 GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
519 GdipAddPathLine2(path, &(line2_points[0]), 10);
521 expect(Ok, status);
523
524 expectf(200.0, bounds.X);
525 expectf(200.0, bounds.Y);
526 expectf(450.0, bounds.Width);
527 expectf(600.0, bounds.Height);
528
530 GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
531 GdipAddPathLine2(path, &(line2_points[0]), 10);
533 expect(Ok, status);
535
536 expectf(510.4, bounds.X);
537 expectf(250.2, bounds.Y);
538 expectf(1275.0, bounds.Width);
539 expectf(720.0, bounds.Height);
540
542 GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
543 GdipAddPathLine2(path, &(line2_points[0]), 10);
544 status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
545 expect(Ok, status);
547
548 expectf(100.0, bounds.X);
549 expectf(100.0, bounds.Y);
550 expectf(650.0, bounds.Width);
551 expectf(800.0, bounds.Height);
552
554 GdipAddPathLine2(path, &(line2_points[0]), 2);
555 status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
556 expect(Ok, status);
558
559 expectf(156.0, bounds.X);
560 expectf(156.0, bounds.Y);
561 expectf(138.0, bounds.Width);
562 expectf(88.0, bounds.Height);
563
564 line2_points[2].X = 2 * line2_points[1].X - line2_points[0].X;
565 line2_points[2].Y = 2 * line2_points[1].Y - line2_points[0].Y;
566
568 GdipAddPathLine2(path, &(line2_points[0]), 3);
569 status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
570 expect(Ok, status);
572
573 expectf(100.0, bounds.X);
574 expectf(100.0, bounds.Y);
575 expectf(300.0, bounds.Width);
576 expectf(200.0, bounds.Height);
577
579 GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 45.0, 20.0);
580 status = GdipGetPathWorldBounds(path, &bounds, NULL, pen);
581 expect(Ok, status);
583
584 expectf(386.7, bounds.X);
585 expectf(553.4, bounds.Y);
586 expectf(266.8, bounds.Width);
587 expectf(289.6, bounds.Height);
588
590 status = GdipGetPathWorldBounds(path, &bounds, matrix, pen);
591 expect(Ok, status);
593
594 expectf(0.0, bounds.X);
595 expectf(0.0, bounds.Y);
596 expectf(0.0, bounds.Width);
597 expectf(0.0, bounds.Height);
598
600 GdipAddPathLine2(path, &(line2_points[0]), 2);
601 status = GdipGetPathWorldBounds(path, &bounds, matrix, pen);
602 expect(Ok, status);
604
605 todo_wine{
606 expectf(427.9, bounds.X);
607 expectf(167.7, bounds.Y);
608 expectf(239.9, bounds.Width);
609 expectf(164.9, bounds.Height);
610 }
611
613 GdipCreateMatrix2(0.9, -0.5, -0.5, -1.2, 10.4, 10.2, &matrix);
615 GdipAddPathArc(path, 100.0, 100.0, 500.0, 700.0, 0.0, 100.0);
616 GdipAddPathLine2(path, &(line2_points[0]), 10);
618 expect(Ok, status);
621
622 expectf(-209.6, bounds.X);
623 expectf(-1274.8, bounds.Y);
624 expectf(705.0, bounds.Width);
625 expectf(945.0, bounds.Height);
626
627 GdipDeletePen(pen);
628}
GpStatus WINGDIPAPI GdipGetPathWorldBounds(GpPath *path, GpRectF *bounds, GDIPCONST GpMatrix *matrix, GDIPCONST GpPen *pen)
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
Definition: matrix.c:59
GLuint GLenum matrix
Definition: glext.h:9407
#define todo_wine
Definition: minitest.h:80
#define expectf(expected, got)
Definition: graphicspath.c:27

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 1064 of file graphicspath.c.

Referenced by test_addclosedcurve().

◆ addclosedcurve_path_default_tension

path_test_t addclosedcurve_path_default_tension[]
static
Initial value:
= {
{0.0, 0.0, PathPointTypeStart, 0, 0},
{-3.33, 0.0, PathPointTypeBezier, 0, 0},
{8.33, 6.66, PathPointTypeBezier, 0, 0},
{10.0, 10.0, PathPointTypeBezier, 0, 0},
{11.6, 13.3, PathPointTypeBezier, 0, 0},
{6.66, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0},
{13.3, 20.0, PathPointTypeBezier, 0, 0},
{31.6, 13.3, PathPointTypeBezier, 0, 0},
{30.0, 10.0, PathPointTypeBezier, 0, 0},
{28.3, 6.66, PathPointTypeBezier, 0, 0},
{3.33, 0.0, PathPointTypeBezier, 0, 0},
}

Definition at line 1079 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 910 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 934 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, 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 948 of file graphicspath.c.

Referenced by test_addcurve().

◆ addcurve_path4

path_test_t addcurve_path4[]
static
Initial value:
= {
{0.0, 0.0, PathPointTypeStart, 0, 0},
{3.33, 3.33, PathPointTypeBezier, 0, 0},
{6.66, 3.33, PathPointTypeBezier, 0, 0},
{10.0, 10.0, PathPointTypeBezier, 0, 0},
}

Definition at line 957 of file graphicspath.c.

Referenced by test_addcurve().

◆ addcurve_path5

path_test_t addcurve_path5[]
static
Initial value:
= {
{10.0, 10.0, PathPointTypeStart, 0, 0},
{13.3, 16.6, PathPointTypeBezier, 0, 0},
{3.33, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0}
}

Definition at line 963 of file graphicspath.c.

Referenced by test_addcurve().

◆ addcurve_path_default_tension

path_test_t addcurve_path_default_tension[]
static
Initial value:
= {
{0.0, 0.0, PathPointTypeStart, 0, 0},
{1.66, 1.66, PathPointTypeBezier, 0, 0},
{8.33, 6.66, PathPointTypeBezier, 0, 0},
{10.0, 10.0, PathPointTypeBezier, 0, 0},
{11.6, 13.3, PathPointTypeBezier, 0, 0},
{6.66, 20.0, PathPointTypeBezier, 0, 0},
{10.0, 20.0, PathPointTypeBezier, 0, 0},
{13.3, 20.0, PathPointTypeBezier, 0, 0},
{26.6, 11.6, PathPointTypeBezier, 0, 0},
{30.0, 10.0, PathPointTypeBezier, 0, 0}
}

Definition at line 922 of file graphicspath.c.

Referenced by test_addcurve().

◆ addpie_path

path_test_t addpie_path[]
static
Initial value:
= {
{50.0, 25.0, PathPointTypeStart, 0, 0},
{97.2, 33.3, PathPointTypeLine, 0, 0},
{91.8, 40.9, PathPointTypeBezier,0, 0},
{79.4, 46.8, PathPointTypeBezier,0, 0},
}

Definition at line 1178 of file graphicspath.c.

Referenced by test_addpie().

◆ addpie_path2

path_test_t addpie_path2[]
static
Initial value:
= {
}

Definition at line 1185 of file graphicspath.c.

Referenced by test_addpie().

◆ addpie_path3

path_test_t addpie_path3[]
static
Initial value:
= {
}

Definition at line 1188 of file graphicspath.c.

Referenced by test_addpie().

◆ arc_path

path_test_t arc_path[]
static

Definition at line 400 of file graphicspath.c.

Referenced by test_arc().

◆ arc_path2

path_test_t arc_path2[]
static
Initial value:
= {
{1.0, 0.0, PathPointTypeStart, 0, 0},
{1.0, 0.5, PathPointTypeLine, 0, 0},
{1.0, 0.776142, PathPointTypeBezier, 0, 0},
{0.776142, 1.0, PathPointTypeBezier, 0, 0},
{0.5, 1.0, PathPointTypeBezier, 0, 0}
}

Definition at line 440 of file graphicspath.c.

Referenced by test_arc().

◆ bezier_path

path_test_t bezier_path[]
static
Initial value:
= {
{10.0, 10.0, PathPointTypeStart, 0, 0},
{20.0, 10.0, PathPointTypeBezier, 0, 0},
{20.0, 20.0, PathPointTypeBezier, 0, 0},
{30.0, 20.0, PathPointTypeBezier, 0, 0},
{40.0, 20.0, PathPointTypeBezier, 0, 0},
{40.0, 30.0, PathPointTypeBezier, 0, 0},
{50.0, 30.0, PathPointTypeBezier, 0, 0},
{50.0, 10.0, PathPointTypeLine, 0, 0},
{60.0, 10.0, PathPointTypeBezier, 0, 0},
{60.0, 20.0, PathPointTypeBezier, 0, 0},
{70.0, 20.0, PathPointTypeBezier, 0, 0}
}

Definition at line 345 of file graphicspath.c.

Referenced by test_bezier(), and test_beziers().

◆ ellipse_path

path_test_t ellipse_path[]
static

Definition at line 680 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 1256 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 1223 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 1251 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 1266 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 288 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},
{39.00, 40.00, PathPointTypeLine, 0, 0}
}

Definition at line 750 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 630 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 789 of file graphicspath.c.

Referenced by test_polygon().

◆ rect_line_path

path_test_t rect_line_path[]
static
Initial value:
= {
{1.0, 4.0, PathPointTypeStart, 0, 0},
{17.0, 4.0, PathPointTypeLine, 0, 0},
{17.0, 68.0, PathPointTypeLine, 0, 0},
{1.0, 8.0, PathPointTypeStart, 0, 0},
{17.0, 8.0, PathPointTypeLine, 0, 0}
}

Definition at line 2188 of file graphicspath.c.

Referenced by test_rect_line().

◆ 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 838 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 1135 of file graphicspath.c.

Referenced by test_reverse().

◆ widenline_caparrowanchor_path

path_test_t widenline_caparrowanchor_path[]
static
Initial value:
= {
{15.0, 5.0, PathPointTypeStart, 0, 1},
{40.0, 5.0, PathPointTypeLine, 0, 1},
{40.0, 15.0, PathPointTypeLine, 0, 1},
{5.0, 10.0, PathPointTypeStart, 0, 0},
{22.320507, 0.0, PathPointTypeLine, 0, 0},
{22.320507, 20.0, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{50.0, 10.0, PathPointTypeStart, 0, 0},
{32.679489, 20.0, PathPointTypeLine, 0, 0},
{32.679489, 0.0, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
}

Definition at line 1700 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capdiamondanchor_path

path_test_t widenline_capdiamondanchor_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
{-5.0, 10.0, PathPointTypeStart, 0, 0},
{5.0, 0.0, PathPointTypeLine, 0, 0},
{15.0, 10.0, PathPointTypeLine, 0, 0},
{60.0, 10.0, PathPointTypeStart, 0, 0},
{50.0, 20.0, PathPointTypeLine, 0, 0},
{40.0, 10.0, PathPointTypeLine, 0, 0},
}

Definition at line 1685 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capflat_path

path_test_t widenline_capflat_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
}

Definition at line 1595 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capround_path

path_test_t widenline_capround_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{52.761421, 5.0, PathPointTypeBezier, 0, 0},
{55.0, 7.238576, PathPointTypeBezier, 0, 0},
{55.0, 10.0, PathPointTypeBezier, 0, 0},
{55.0, 12.761423, PathPointTypeBezier, 0, 0},
{52.761421, 15.0, PathPointTypeBezier, 0, 0},
{50.0, 15.0, PathPointTypeBezier, 0, 0},
{5.0, 15.0, PathPointTypeLine, 0, 0},
{2.238576, 15.0, PathPointTypeBezier, 0, 0},
{0.0, 12.761423, PathPointTypeBezier, 0, 0},
{0.0, 10.0, PathPointTypeBezier, 0, 0},
{0.0, 7.238576, PathPointTypeBezier, 0, 0},
{2.238576, 5.0, PathPointTypeBezier, 0, 0},
}

Definition at line 1609 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_caproundanchor_path

path_test_t widenline_caproundanchor_path[]
static

Definition at line 1652 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capsquare_path

path_test_t widenline_capsquare_path[]
static
Initial value:
= {
{0.0, 5.0, PathPointTypeStart, 0, 0},
{55.0, 5.0, PathPointTypeLine, 0, 0},
{55.0, 15.0, PathPointTypeLine, 0, 0},
}

Definition at line 1602 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capsquareanchor_dashed_path

path_test_t widenline_capsquareanchor_dashed_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{35.0, 5.0, PathPointTypeLine, 0, 0},
{35.0, 15.0, PathPointTypeLine, 0, 0},
{45.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
{12.071068, 2.928932, PathPointTypeStart, 0, 0},
{12.071068, 17.071066, PathPointTypeLine, 0, 0},
{-2.071068, 17.071066, PathPointTypeLine, 0, 0},
{-2.071068, 2.928932, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{42.928928, 17.071068, PathPointTypeStart, 0, 0},
{42.928928, 2.928932, PathPointTypeLine, 0, 0},
{57.071068, 2.928932, PathPointTypeLine, 0, 0},
{57.071068, 17.071068, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
}

Definition at line 1724 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capsquareanchor_multifigure_path

path_test_t widenline_capsquareanchor_multifigure_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{25.0, 5.0, PathPointTypeLine, 0, 0},
{25.0, 15.0, PathPointTypeLine, 0, 0},
{30.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
{12.071068, 2.928932, PathPointTypeStart, 0, 0},
{12.071068, 17.071066, PathPointTypeLine, 0, 0},
{-2.071068, 17.071066, PathPointTypeLine, 0, 0},
{-2.071068, 2.928932, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{17.928930, 17.071068, PathPointTypeStart, 0, 0},
{17.928930, 2.928932, PathPointTypeLine, 0, 0},
{32.071068, 2.928932, PathPointTypeLine, 0, 0},
{32.071068, 17.071068, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{37.071068, 2.928932, PathPointTypeStart, 0, 0},
{37.071068, 17.071066, PathPointTypeLine, 0, 0},
{22.928930, 17.071066, PathPointTypeLine, 0, 0},
{22.928930, 2.928932, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{42.928928, 17.071068, PathPointTypeStart, 0, 0},
{42.928928, 2.928932, PathPointTypeLine, 0, 0},
{57.071068, 2.928932, PathPointTypeLine, 0, 0},
{57.071068, 17.071068, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
}

Definition at line 1743 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capsquareanchor_path

path_test_t widenline_capsquareanchor_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
{12.071068, 2.928932, PathPointTypeStart, 0, 0},
{12.071068, 17.071066, PathPointTypeLine, 0, 0},
{-2.071068, 17.071066, PathPointTypeLine, 0, 0},
{-2.071068, 2.928932, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{42.928928, 17.071068, PathPointTypeStart, 0, 0},
{42.928928, 2.928932, PathPointTypeLine, 0, 0},
{57.071068, 2.928932, PathPointTypeLine, 0, 0},
{57.071068, 17.071068, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
}

Definition at line 1637 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_capsquareanchor_thin_path

path_test_t widenline_capsquareanchor_thin_path[]
static
Initial value:
= {
{6.414213, 8.585786, PathPointTypeStart, 0, 0},
{6.414213, 11.414213, PathPointTypeLine, 0, 0},
{3.585786, 11.414213, PathPointTypeLine, 0, 0},
{3.585786, 8.585786, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
{48.585785, 11.414213, PathPointTypeStart, 0, 0},
{48.585785, 8.585786, PathPointTypeLine, 0, 0},
{51.414211, 8.585786, PathPointTypeLine, 0, 0},
{51.414211, 11.414213, PathPointTypeLine|PathPointTypeCloseSubpath, 0, 0},
}

Definition at line 1713 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_captriangle_path

path_test_t widenline_captriangle_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{55.0, 10.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
{5.0, 15.0, PathPointTypeLine, 0, 0},
{0.0, 10.0, PathPointTypeLine, 0, 0},
}

Definition at line 1627 of file graphicspath.c.

Referenced by test_widen_cap().

◆ widenline_customarrow_multifigure_path

path_test_t widenline_customarrow_multifigure_path[]
static
Initial value:
= {
{6.0, 9.5, PathPointTypeStart},
{24.0, 9.5, PathPointTypeLine},
{24.0, 10.5, PathPointTypeLine},
{30.5, 11.0, PathPointTypeStart},
{30.5, 29.0, PathPointTypeLine},
{29.5, 29.0, PathPointTypeLine},
{13.0, 14.0, PathPointTypeStart},
{5.0, 10.0, PathPointTypeLine},
{13.0, 6.0, PathPointTypeLine},
{17.0, 6.0, PathPointTypeStart},
{25.0, 10.0, PathPointTypeLine},
{17.0, 14.0, PathPointTypeLine},
{26.0, 18.0, PathPointTypeStart},
{30.0, 10.0, PathPointTypeLine},
{34.0, 18.0, PathPointTypeLine},
{34.0, 22.0, PathPointTypeStart},
{30.0, 30.0, PathPointTypeLine},
{26.0, 22.0, PathPointTypeLine},
}

Definition at line 1770 of file graphicspath.c.

Referenced by test_widen_cap().

◆ 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 1368 of file graphicspath.c.

Referenced by test_widen().

◆ widenline_path

path_test_t widenline_path[]
static
Initial value:
= {
{5.0, 5.0, PathPointTypeStart, 0, 0},
{50.0, 5.0, PathPointTypeLine, 0, 0},
{50.0, 15.0, PathPointTypeLine, 0, 0},
}

Definition at line 1354 of file graphicspath.c.

Referenced by test_widen().

◆ widenline_thin_dash_path

path_test_t widenline_thin_dash_path[]
static
Initial value:
= {
{5.0, 4.75, PathPointTypeStart, 0, 0},
{8.0, 4.75, PathPointTypeLine, 0, 0},
{8.0, 5.25, PathPointTypeLine, 0, 0},
{9.0, 4.75, PathPointTypeStart, 0, 0},
{9.5, 4.75, PathPointTypeLine, 0, 0},
{9.5, 5.25, PathPointTypeLine, 0, 0},
}

Definition at line 1379 of file graphicspath.c.

Referenced by test_widen().

◆ widenline_unit_path

path_test_t widenline_unit_path[]
static
Initial value:
= {
{5.0, 9.5, PathPointTypeStart, 0, 0},
{50.0, 9.5, PathPointTypeLine, 0, 0},
{50.0, 10.5, PathPointTypeLine, 0, 0},
}

Definition at line 1390 of file graphicspath.c.

Referenced by test_widen().

◆ widenline_wide_path

path_test_t widenline_wide_path[]
static
Initial value:
= {
{5.0, 0.0, PathPointTypeStart, 0, 0},
{50.0, 0.0, PathPointTypeLine, 0, 0},
{50.0, 20.0, PathPointTypeLine, 0, 0},
}

Definition at line 1361 of file graphicspath.c.

Referenced by test_widen().