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
9db50228
Commit
9db50228
authored
Nov 18, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 19, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement SetCurrentTransform() for bitmap render target.
parent
c457d0f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
gdiinterop.c
dlls/dwrite/gdiinterop.c
+13
-5
font.c
dlls/dwrite/tests/font.c
+19
-0
No files found.
dlls/dwrite/gdiinterop.c
View file @
9db50228
...
...
@@ -31,6 +31,13 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
dwrite
);
static
const
DWRITE_MATRIX
identity
=
{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
};
struct
gdiinterop
{
IDWriteGdiInterop
IDWriteGdiInterop_iface
;
IDWriteFactory
*
factory
;
...
...
@@ -171,8 +178,11 @@ static HRESULT WINAPI rendertarget_GetCurrentTransform(IDWriteBitmapRenderTarget
static
HRESULT
WINAPI
rendertarget_SetCurrentTransform
(
IDWriteBitmapRenderTarget
*
iface
,
DWRITE_MATRIX
const
*
transform
)
{
struct
rendertarget
*
This
=
impl_from_IDWriteBitmapRenderTarget
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
transform
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
transform
);
This
->
m
=
transform
?
*
transform
:
identity
;
return
S_OK
;
}
static
HRESULT
WINAPI
rendertarget_GetSize
(
IDWriteBitmapRenderTarget
*
iface
,
SIZE
*
size
)
...
...
@@ -233,9 +243,7 @@ static HRESULT create_rendertarget(HDC hdc, UINT32 width, UINT32 height, IDWrite
return
hr
;
}
target
->
m
.
m11
=
target
->
m
.
m22
=
1
.
0
;
target
->
m
.
m12
=
target
->
m
.
m21
=
0
.
0
;
target
->
m
.
dx
=
target
->
m
.
dy
=
0
.
0
;
target
->
m
=
identity
;
target
->
pixels_per_dip
=
1
.
0
;
*
ret
=
&
target
->
IDWriteBitmapRenderTarget_iface
;
...
...
dlls/dwrite/tests/font.c
View file @
9db50228
...
...
@@ -666,6 +666,25 @@ if (0) /* crashes on native */
ok
(
m
.
m11
==
1
.
0
&&
m
.
m22
==
1
.
0
&&
m
.
m12
==
0
.
0
&&
m
.
m21
==
0
.
0
,
"got %.1f,%.1f,%.1f,%.1f
\n
"
,
m
.
m11
,
m
.
m22
,
m
.
m12
,
m
.
m21
);
ok
(
m
.
dx
==
0
.
0
&&
m
.
dy
==
0
.
0
,
"got %.1f,%.1f
\n
"
,
m
.
dx
,
m
.
dy
);
memset
(
&
m
,
0
,
sizeof
(
m
));
hr
=
IDWriteBitmapRenderTarget_SetCurrentTransform
(
target
,
&
m
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
memset
(
&
m
,
0xcc
,
sizeof
(
m
));
hr
=
IDWriteBitmapRenderTarget_GetCurrentTransform
(
target
,
&
m
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
m
.
m11
==
0
.
0
&&
m
.
m22
==
0
.
0
&&
m
.
m12
==
0
.
0
&&
m
.
m21
==
0
.
0
,
"got %.1f,%.1f,%.1f,%.1f
\n
"
,
m
.
m11
,
m
.
m22
,
m
.
m12
,
m
.
m21
);
ok
(
m
.
dx
==
0
.
0
&&
m
.
dy
==
0
.
0
,
"got %.1f,%.1f
\n
"
,
m
.
dx
,
m
.
dy
);
hr
=
IDWriteBitmapRenderTarget_SetCurrentTransform
(
target
,
NULL
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
memset
(
&
m
,
0xcc
,
sizeof
(
m
));
hr
=
IDWriteBitmapRenderTarget_GetCurrentTransform
(
target
,
&
m
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok
(
m
.
m11
==
1
.
0
&&
m
.
m22
==
1
.
0
&&
m
.
m12
==
0
.
0
&&
m
.
m21
==
0
.
0
,
"got %.1f,%.1f,%.1f,%.1f
\n
"
,
m
.
m11
,
m
.
m22
,
m
.
m12
,
m
.
m21
);
ok
(
m
.
dx
==
0
.
0
&&
m
.
dy
==
0
.
0
,
"got %.1f,%.1f
\n
"
,
m
.
dx
,
m
.
dy
);
/* pixels per dip */
pdip
=
IDWriteBitmapRenderTarget_GetPixelsPerDip
(
target
);
ok
(
pdip
==
1
.
0
,
"got %.2f
\n
"
,
pdip
);
...
...
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