Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
375f7bfa
Commit
375f7bfa
authored
Oct 27, 2023
by
Bartosz Kosiorek
Committed by
Alexandre Julliard
Oct 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add default tension tests for GdipAddPath*Curve.
parent
8b5a60d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
1 deletion
+42
-1
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+42
-1
No files found.
dlls/gdiplus/tests/graphicspath.c
View file @
375f7bfa
...
...
@@ -75,7 +75,7 @@ typedef struct
int
todo
;
}
path_test_t
;
#define ok_path(a,b,c,d) _ok_path_fudge(a,b,c,d,
2
.0,__LINE__)
#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__)
static
void
_ok_path_fudge
(
GpPath
*
path
,
const
path_test_t
*
expected
,
INT
expected_size
,
BOOL
todo_size
,
REAL
fudge
,
int
line
)
...
...
@@ -919,6 +919,18 @@ static path_test_t addcurve_path[] = {
{
23
.
3
,
13
.
3
,
PathPointTypeBezier
,
0
,
0
},
/*8*/
{
30
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
}
/*9*/
};
static
path_test_t
addcurve_path_default_tension
[]
=
{
{
0
.
0
,
0
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
1
.
66
,
1
.
66
,
PathPointTypeBezier
,
0
,
1
},
/*1*/
{
8
.
33
,
6
.
66
,
PathPointTypeBezier
,
0
,
1
},
/*2*/
{
10
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*3*/
{
11
.
6
,
13
.
3
,
PathPointTypeBezier
,
0
,
1
},
/*4*/
{
6
.
66
,
20
.
0
,
PathPointTypeBezier
,
0
,
1
},
/*5*/
{
10
.
0
,
20
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*6*/
{
13
.
3
,
20
.
0
,
PathPointTypeBezier
,
0
,
1
},
/*7*/
{
26
.
6
,
11
.
6
,
PathPointTypeBezier
,
0
,
1
},
/*8*/
{
30
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
}
/*9*/
};
static
path_test_t
addcurve_path2
[]
=
{
{
100
.
0
,
120
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
123
.
0
,
10
.
0
,
PathPointTypeLine
,
0
,
0
},
/*1*/
...
...
@@ -975,6 +987,13 @@ static void test_addcurve(void)
ok_path
(
path
,
addcurve_path
,
ARRAY_SIZE
(
addcurve_path
),
FALSE
);
GdipDeletePath
(
path
);
/* add to empty path with default tension */
GdipCreatePath
(
FillModeAlternate
,
&
path
);
status
=
GdipAddPathCurve
(
path
,
points
,
4
);
expect
(
Ok
,
status
);
ok_path
(
path
,
addcurve_path_default_tension
,
ARRAY_SIZE
(
addcurve_path_default_tension
),
FALSE
);
GdipDeletePath
(
path
);
/* add to notempty path and opened figure */
GdipCreatePath
(
FillModeAlternate
,
&
path
);
GdipAddPathLine
(
path
,
100
.
0
,
120
.
0
,
123
.
0
,
10
.
0
);
...
...
@@ -1030,6 +1049,21 @@ static path_test_t addclosedcurve_path[] = {
{
6
.
7
,
0
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*11*/
{
0
.
0
,
0
.
0
,
PathPointTypeBezier
|
PathPointTypeCloseSubpath
,
0
,
0
}
/*12*/
};
static
path_test_t
addclosedcurve_path_default_tension
[]
=
{
{
0
.
0
,
0
.
0
,
PathPointTypeStart
,
0
,
0
},
/*0*/
{
-
3
.
33
,
0
.
0
,
PathPointTypeBezier
,
0
,
1
},
/*1*/
{
8
.
33
,
6
.
66
,
PathPointTypeBezier
,
0
,
1
},
/*2*/
{
10
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*3*/
{
11
.
6
,
13
.
3
,
PathPointTypeBezier
,
0
,
1
},
/*4*/
{
6
.
66
,
20
.
0
,
PathPointTypeBezier
,
0
,
1
},
/*5*/
{
10
.
0
,
20
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*6*/
{
13
.
3
,
20
.
0
,
PathPointTypeBezier
,
0
,
1
},
/*7*/
{
31
.
6
,
13
.
3
,
PathPointTypeBezier
,
0
,
1
},
/*8*/
{
30
.
0
,
10
.
0
,
PathPointTypeBezier
,
0
,
0
},
/*9*/
{
28
.
3
,
6
.
66
,
PathPointTypeBezier
,
0
,
1
},
/*10*/
{
3
.
33
,
0
.
0
,
PathPointTypeBezier
,
0
,
1
},
/*11*/
{
0
.
0
,
0
.
0
,
PathPointTypeBezier
|
PathPointTypeCloseSubpath
,
0
,
0
}
/*12*/
};
static
void
test_addclosedcurve
(
void
)
{
GpStatus
status
;
...
...
@@ -1062,6 +1096,13 @@ static void test_addclosedcurve(void)
expect
(
Ok
,
status
);
ok_path
(
path
,
addclosedcurve_path
,
ARRAY_SIZE
(
addclosedcurve_path
),
FALSE
);
GdipDeletePath
(
path
);
/* add to empty path with default tension */
GdipCreatePath
(
FillModeAlternate
,
&
path
);
status
=
GdipAddPathClosedCurve
(
path
,
points
,
4
);
expect
(
Ok
,
status
);
ok_path
(
path
,
addclosedcurve_path_default_tension
,
ARRAY_SIZE
(
addclosedcurve_path_default_tension
),
FALSE
);
GdipDeletePath
(
path
);
}
static
path_test_t
reverse_path
[]
=
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment