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
91352c5a
Commit
91352c5a
authored
Feb 16, 2016
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Add test for matrix transform in GdipWidenPath.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c51212e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
93 additions
and
0 deletions
+93
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+93
-0
No files found.
dlls/gdiplus/tests/graphicspath.c
View file @
91352c5a
...
...
@@ -1055,6 +1055,13 @@ static path_test_t widenline_path[] = {
{
5
.
0
,
15
.
0
,
PathPointTypeLine
|
PathPointTypeCloseSubpath
,
0
,
0
}
/*3*/
};
static
path_test_t
widenline_wide_path
[]
=
{
{
5
.
0
,
0
.
0
,
PathPointTypeStart
,
0
,
1
},
/*0*/
{
50
.
0
,
0
.
0
,
PathPointTypeLine
,
0
,
1
},
/*1*/
{
50
.
0
,
20
.
0
,
PathPointTypeLine
,
0
,
1
},
/*2*/
{
5
.
0
,
20
.
0
,
PathPointTypeLine
|
PathPointTypeCloseSubpath
,
0
,
1
}
/*3*/
};
static
void
test_widen
(
void
)
{
GpStatus
status
;
...
...
@@ -1099,6 +1106,92 @@ static void test_widen(void)
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_path
,
sizeof
(
widenline_path
)
/
sizeof
(
path_test_t
),
FALSE
);
/* horizontal 2x stretch */
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathLine
(
path
,
2
.
5
,
10
.
0
,
25
.
0
,
10
.
0
);
expect
(
Ok
,
status
);
status
=
GdipScaleMatrix
(
m
,
2
.
0
,
1
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipWidenPath
(
path
,
pen
,
m
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_path
,
sizeof
(
widenline_path
)
/
sizeof
(
path_test_t
),
FALSE
);
/* vertical 2x stretch */
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathLine
(
path
,
5
.
0
,
5
.
0
,
50
.
0
,
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipScaleMatrix
(
m
,
0
.
5
,
2
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipWidenPath
(
path
,
pen
,
m
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_path
,
sizeof
(
widenline_path
)
/
sizeof
(
path_test_t
),
FALSE
);
status
=
GdipScaleMatrix
(
m
,
1
.
0
,
0
.
5
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
/* pen width in UnitWorld */
GdipDeletePen
(
pen
);
status
=
GdipCreatePen1
(
0xffffffff
,
10
.
0
,
UnitWorld
,
&
pen
);
expect
(
Ok
,
status
);
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathLine
(
path
,
5
.
0
,
10
.
0
,
50
.
0
,
10
.
0
);
expect
(
Ok
,
status
);
status
=
GdipWidenPath
(
path
,
pen
,
m
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_path
,
sizeof
(
widenline_path
)
/
sizeof
(
path_test_t
),
FALSE
);
/* horizontal 2x stretch */
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathLine
(
path
,
2
.
5
,
10
.
0
,
25
.
0
,
10
.
0
);
expect
(
Ok
,
status
);
status
=
GdipScaleMatrix
(
m
,
2
.
0
,
1
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipWidenPath
(
path
,
pen
,
m
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_path
,
sizeof
(
widenline_path
)
/
sizeof
(
path_test_t
),
FALSE
);
/* vertical 2x stretch */
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathLine
(
path
,
5
.
0
,
5
.
0
,
50
.
0
,
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipScaleMatrix
(
m
,
0
.
5
,
2
.
0
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
status
=
GdipWidenPath
(
path
,
pen
,
m
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_wide_path
,
sizeof
(
widenline_wide_path
)
/
sizeof
(
path_test_t
),
FALSE
);
status
=
GdipScaleMatrix
(
m
,
1
.
0
,
0
.
5
,
MatrixOrderAppend
);
expect
(
Ok
,
status
);
/* pen width in UnitInch */
GdipDeletePen
(
pen
);
status
=
GdipCreatePen1
(
0xffffffff
,
10
.
0
,
UnitWorld
,
&
pen
);
expect
(
Ok
,
status
);
status
=
GdipResetPath
(
path
);
expect
(
Ok
,
status
);
status
=
GdipAddPathLine
(
path
,
5
.
0
,
10
.
0
,
50
.
0
,
10
.
0
);
expect
(
Ok
,
status
);
status
=
GdipWidenPath
(
path
,
pen
,
m
,
1
.
0
);
expect
(
Ok
,
status
);
ok_path
(
path
,
widenline_path
,
sizeof
(
widenline_path
)
/
sizeof
(
path_test_t
),
FALSE
);
GdipDeleteMatrix
(
m
);
GdipDeletePen
(
pen
);
GdipDeletePath
(
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