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
4fff9a7a
Commit
4fff9a7a
authored
Oct 30, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Nov 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Add a test for GdipCreateMatrix3.
parent
bb444e81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
83 additions
and
0 deletions
+83
-0
matrix.c
dlls/gdiplus/tests/matrix.c
+83
-0
No files found.
dlls/gdiplus/tests/matrix.c
View file @
4fff9a7a
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
#include "wine/test.h"
#include "wine/test.h"
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got)
static
void
test_constructor_destructor
(
void
)
static
void
test_constructor_destructor
(
void
)
{
{
...
@@ -220,6 +221,87 @@ static void test_shear(void)
...
@@ -220,6 +221,87 @@ static void test_shear(void)
GdipDeleteMatrix
(
matrix
);
GdipDeleteMatrix
(
matrix
);
}
}
static
void
test_constructor3
(
void
)
{
/* MSDN is on crack. GdipCreateMatrix3 makes a matrix that transforms the
* corners of the given rectangle to the three points given. */
GpMatrix
*
matrix
;
REAL
values
[
6
];
GpRectF
rc
;
GpPointF
pt
[
3
];
GpStatus
stat
;
rc
.
X
=
10
;
rc
.
Y
=
10
;
rc
.
Width
=
10
;
rc
.
Height
=
10
;
pt
[
0
].
X
=
10
;
pt
[
0
].
Y
=
10
;
pt
[
1
].
X
=
20
;
pt
[
1
].
Y
=
10
;
pt
[
2
].
X
=
10
;
pt
[
2
].
Y
=
20
;
stat
=
GdipCreateMatrix3
(
&
rc
,
pt
,
&
matrix
);
expect
(
Ok
,
stat
);
stat
=
GdipGetMatrixElements
(
matrix
,
values
);
expect
(
Ok
,
stat
);
todo_wine
expectf
(
1
.
0
,
values
[
0
]);
todo_wine
expectf
(
0
.
0
,
values
[
1
]);
todo_wine
expectf
(
0
.
0
,
values
[
2
]);
todo_wine
expectf
(
1
.
0
,
values
[
3
]);
todo_wine
expectf
(
0
.
0
,
values
[
4
]);
todo_wine
expectf
(
0
.
0
,
values
[
5
]);
GdipDeleteMatrix
(
matrix
);
pt
[
0
].
X
=
20
;
pt
[
0
].
Y
=
10
;
pt
[
1
].
X
=
40
;
pt
[
1
].
Y
=
10
;
pt
[
2
].
X
=
20
;
pt
[
2
].
Y
=
20
;
stat
=
GdipCreateMatrix3
(
&
rc
,
pt
,
&
matrix
);
expect
(
Ok
,
stat
);
stat
=
GdipGetMatrixElements
(
matrix
,
values
);
expect
(
Ok
,
stat
);
todo_wine
expectf
(
2
.
0
,
values
[
0
]);
todo_wine
expectf
(
0
.
0
,
values
[
1
]);
todo_wine
expectf
(
0
.
0
,
values
[
2
]);
todo_wine
expectf
(
1
.
0
,
values
[
3
]);
todo_wine
expectf
(
0
.
0
,
values
[
4
]);
todo_wine
expectf
(
0
.
0
,
values
[
5
]);
GdipDeleteMatrix
(
matrix
);
pt
[
0
].
X
=
10
;
pt
[
0
].
Y
=
20
;
pt
[
1
].
X
=
20
;
pt
[
1
].
Y
=
30
;
pt
[
2
].
X
=
10
;
pt
[
2
].
Y
=
30
;
stat
=
GdipCreateMatrix3
(
&
rc
,
pt
,
&
matrix
);
expect
(
Ok
,
stat
);
stat
=
GdipGetMatrixElements
(
matrix
,
values
);
expect
(
Ok
,
stat
);
todo_wine
expectf
(
1
.
0
,
values
[
0
]);
todo_wine
expectf
(
1
.
0
,
values
[
1
]);
todo_wine
expectf
(
0
.
0
,
values
[
2
]);
todo_wine
expectf
(
1
.
0
,
values
[
3
]);
todo_wine
expectf
(
0
.
0
,
values
[
4
]);
todo_wine
expectf
(
0
.
0
,
values
[
5
]);
GdipDeleteMatrix
(
matrix
);}
START_TEST
(
matrix
)
START_TEST
(
matrix
)
{
{
struct
GdiplusStartupInput
gdiplusStartupInput
;
struct
GdiplusStartupInput
gdiplusStartupInput
;
...
@@ -237,6 +319,7 @@ START_TEST(matrix)
...
@@ -237,6 +319,7 @@ START_TEST(matrix)
test_isinvertible
();
test_isinvertible
();
test_invert
();
test_invert
();
test_shear
();
test_shear
();
test_constructor3
();
GdiplusShutdown
(
gdiplusToken
);
GdiplusShutdown
(
gdiplusToken
);
}
}
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