Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d7379712
Commit
d7379712
authored
Jan 16, 2011
by
Vincent Povirk
Committed by
Alexandre Julliard
Jan 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Rewrite GdipCreateMatrix3.
parent
9fd1e236
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
26 deletions
+26
-26
matrix.c
dlls/gdiplus/matrix.c
+8
-8
matrix.c
dlls/gdiplus/tests/matrix.c
+18
-18
No files found.
dlls/gdiplus/matrix.c
View file @
d7379712
...
...
@@ -85,20 +85,20 @@ GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22,
GpStatus
WINGDIPAPI
GdipCreateMatrix3
(
GDIPCONST
GpRectF
*
rect
,
GDIPCONST
GpPointF
*
pt
,
GpMatrix
**
matrix
)
{
REAL
m11
,
m12
,
m21
,
m22
,
dx
,
dy
;
TRACE
(
"(%p, %p, %p)
\n
"
,
rect
,
pt
,
matrix
);
if
(
!
matrix
||
!
pt
)
return
InvalidParameter
;
*
matrix
=
GdipAlloc
(
sizeof
(
GpMatrix
));
if
(
!*
matrix
)
return
OutOfMemory
;
memcpy
((
*
matrix
)
->
matrix
,
rect
,
4
*
sizeof
(
REAL
));
m11
=
(
pt
[
1
].
X
-
pt
[
0
].
X
)
/
rect
->
Width
;
m21
=
(
pt
[
2
].
X
-
pt
[
0
].
X
)
/
rect
->
Height
;
dx
=
pt
[
0
].
X
-
m11
*
rect
->
X
-
m21
*
rect
->
Y
;
m12
=
(
pt
[
1
].
Y
-
pt
[
0
].
Y
)
/
rect
->
Width
;
m22
=
(
pt
[
2
].
Y
-
pt
[
0
].
Y
)
/
rect
->
Height
;
dy
=
pt
[
0
].
Y
-
m12
*
rect
->
X
-
m22
*
rect
->
Y
;
(
*
matrix
)
->
matrix
[
4
]
=
pt
->
X
;
(
*
matrix
)
->
matrix
[
5
]
=
pt
->
Y
;
return
Ok
;
return
GdipCreateMatrix2
(
m11
,
m12
,
m21
,
m22
,
dx
,
dy
,
matrix
);
}
GpStatus
WINGDIPAPI
GdipCreateMatrix3I
(
GDIPCONST
GpRect
*
rect
,
GDIPCONST
GpPoint
*
pt
,
...
...
dlls/gdiplus/tests/matrix.c
View file @
d7379712
...
...
@@ -249,12 +249,12 @@ static void test_constructor3(void)
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
]);
expectf
(
1
.
0
,
values
[
0
]);
expectf
(
0
.
0
,
values
[
1
]);
expectf
(
0
.
0
,
values
[
2
]);
expectf
(
1
.
0
,
values
[
3
]);
expectf
(
0
.
0
,
values
[
4
]);
expectf
(
0
.
0
,
values
[
5
]);
GdipDeleteMatrix
(
matrix
);
...
...
@@ -271,12 +271,12 @@ static void test_constructor3(void)
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
]);
expectf
(
2
.
0
,
values
[
0
]);
expectf
(
0
.
0
,
values
[
1
]);
expectf
(
0
.
0
,
values
[
2
]);
expectf
(
1
.
0
,
values
[
3
]);
expectf
(
0
.
0
,
values
[
4
]);
expectf
(
0
.
0
,
values
[
5
]);
GdipDeleteMatrix
(
matrix
);
...
...
@@ -293,12 +293,12 @@ static void test_constructor3(void)
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
]);
expectf
(
1
.
0
,
values
[
0
]);
expectf
(
1
.
0
,
values
[
1
]);
expectf
(
0
.
0
,
values
[
2
]);
expectf
(
1
.
0
,
values
[
3
]);
expectf
(
0
.
0
,
values
[
4
]);
expectf
(
0
.
0
,
values
[
5
]);
GdipDeleteMatrix
(
matrix
);}
...
...
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