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
6944803c
Commit
6944803c
authored
Jul 18, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d2d1: Implement D2D1MakeRotateMatrix().
parent
c9031922
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
d2d1.spec
dlls/d2d1/d2d1.spec
+1
-1
factory.c
dlls/d2d1/factory.c
+19
-0
d2d1.idl
include/d2d1.idl
+1
-0
No files found.
dlls/d2d1/d2d1.spec
View file @
6944803c
@ stdcall D2D1CreateFactory(long ptr ptr ptr)
@ st
ub D2D1MakeRotateMatrix
@ st
dcall D2D1MakeRotateMatrix(float float float ptr)
@ stub D2D1MakeSkewMatrix
@ stub D2D1IsMatrixInvertible
@ stub D2D1InvertMatrix
...
...
dlls/d2d1/factory.c
View file @
6944803c
...
...
@@ -264,3 +264,22 @@ HRESULT WINAPI D2D1CreateFactory(D2D1_FACTORY_TYPE factory_type, REFIID iid,
return
hr
;
}
void
WINAPI
D2D1MakeRotateMatrix
(
float
angle
,
D2D1_POINT_2F
center
,
D2D1_MATRIX_3X2_F
*
matrix
)
{
float
theta
,
sin_theta
,
cos_theta
;
TRACE
(
"angle %.8e, center {%.8e, %.8e}, matrix %p.
\n
"
,
angle
,
center
.
x
,
center
.
y
,
matrix
);
theta
=
angle
*
(
M_PI
/
180
.
0
f
);
sin_theta
=
sinf
(
theta
);
cos_theta
=
cosf
(
theta
);
/* translate(center) * rotate(theta) * translate(-center) */
matrix
->
_11
=
cos_theta
;
matrix
->
_12
=
sin_theta
;
matrix
->
_21
=
-
sin_theta
;
matrix
->
_22
=
cos_theta
;
matrix
->
_31
=
center
.
x
-
center
.
x
*
cos_theta
+
center
.
y
*
sin_theta
;
matrix
->
_32
=
center
.
y
-
center
.
x
*
sin_theta
-
center
.
y
*
cos_theta
;
}
include/d2d1.idl
View file @
6944803c
...
...
@@ -1248,3 +1248,4 @@ interface ID2D1Factory : IUnknown
[
local
]
HRESULT
__stdcall
D2D1CreateFactory
(
D2D1_FACTORY_TYPE
factory_type
,
REFIID
iid
,
const
D2D1_FACTORY_OPTIONS
*
factory_options
,
void
**
factory
)
;
[
local
]
void
__stdcall
D2D1MakeRotateMatrix
(
float
angle
,
D2D1_POINT_2F
center
,
D2D1_MATRIX_3X2_F
*
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