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
c843e71b
Commit
c843e71b
authored
Aug 13, 2012
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 13, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement IDWriteBitmapRenderTarget_GetSize.
parent
292fd912
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
gdiinterop.c
dlls/dwrite/gdiinterop.c
+8
-2
font.c
dlls/dwrite/tests/font.c
+16
-0
No files found.
dlls/dwrite/gdiinterop.c
View file @
c843e71b
...
...
@@ -36,6 +36,7 @@ struct rendertarget {
IDWriteBitmapRenderTarget
IDWriteBitmapRenderTarget_iface
;
LONG
ref
;
SIZE
size
;
HDC
hdc
;
};
...
...
@@ -135,8 +136,10 @@ static HRESULT WINAPI rendertarget_SetCurrentTransform(IDWriteBitmapRenderTarget
static
HRESULT
WINAPI
rendertarget_GetSize
(
IDWriteBitmapRenderTarget
*
iface
,
SIZE
*
size
)
{
struct
rendertarget
*
This
=
impl_from_IDWriteBitmapRenderTarget
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
size
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
size
);
*
size
=
This
->
size
;
return
S_OK
;
}
static
HRESULT
WINAPI
rendertarget_Resize
(
IDWriteBitmapRenderTarget
*
iface
,
UINT32
width
,
UINT32
height
)
...
...
@@ -175,6 +178,9 @@ static HRESULT create_rendertarget(HDC hdc, UINT32 width, UINT32 height, IDWrite
This
->
IDWriteBitmapRenderTarget_iface
.
lpVtbl
=
&
rendertargetvtbl
;
This
->
ref
=
1
;
This
->
size
.
cx
=
width
;
This
->
size
.
cy
=
height
;
This
->
hdc
=
CreateCompatibleDC
(
hdc
);
memset
(
bmi
,
0
,
sizeof
(
bmibuf
));
...
...
dlls/dwrite/tests/font.c
View file @
c843e71b
...
...
@@ -158,6 +158,7 @@ static void test_CreateBitmapRenderTarget(void)
DIBSECTION
ds
;
HBITMAP
hbm
;
HRESULT
hr
;
SIZE
size
;
HDC
hdc
;
int
ret
;
...
...
@@ -168,6 +169,15 @@ static void test_CreateBitmapRenderTarget(void)
hr
=
IDWriteGdiInterop_CreateBitmapRenderTarget
(
interop
,
NULL
,
0
,
0
,
&
target
);
EXPECT_HR
(
hr
,
S_OK
);
if
(
0
)
/* crashes on native */
hr
=
IDWriteBitmapRenderTarget_GetSize
(
target
,
NULL
);
size
.
cx
=
size
.
cy
=
-
1
;
hr
=
IDWriteBitmapRenderTarget_GetSize
(
target
,
&
size
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
size
.
cx
==
0
,
"got %d
\n
"
,
size
.
cx
);
ok
(
size
.
cy
==
0
,
"got %d
\n
"
,
size
.
cy
);
target2
=
NULL
;
hr
=
IDWriteGdiInterop_CreateBitmapRenderTarget
(
interop
,
NULL
,
0
,
0
,
&
target2
);
EXPECT_HR
(
hr
,
S_OK
);
...
...
@@ -213,6 +223,12 @@ static void test_CreateBitmapRenderTarget(void)
ok
(
ds
.
dsBm
.
bmBitsPixel
==
32
,
"got %d
\n
"
,
ds
.
dsBm
.
bmBitsPixel
);
ok
(
ds
.
dsBm
.
bmBits
!=
NULL
,
"got %p
\n
"
,
ds
.
dsBm
.
bmBits
);
size
.
cx
=
size
.
cy
=
-
1
;
hr
=
IDWriteBitmapRenderTarget_GetSize
(
target
,
&
size
);
EXPECT_HR
(
hr
,
S_OK
);
ok
(
size
.
cx
==
10
,
"got %d
\n
"
,
size
.
cx
);
ok
(
size
.
cy
==
5
,
"got %d
\n
"
,
size
.
cy
);
IDWriteBitmapRenderTarget_Release
(
target
);
IDWriteGdiInterop_Release
(
interop
);
...
...
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