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
04ae4bfb
Commit
04ae4bfb
authored
Jul 12, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 13, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement GetMetrics() for trimming sign.
parent
e6d5c03f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
layout.c
dlls/dwrite/layout.c
+16
-3
layout.c
dlls/dwrite/tests/layout.c
+15
-1
No files found.
dlls/dwrite/layout.c
View file @
04ae4bfb
...
...
@@ -4042,11 +4042,24 @@ static HRESULT WINAPI dwritetrimmingsign_Draw(IDWriteInlineObject *iface, void *
return
IDWriteTextLayout_Draw
(
This
->
layout
,
context
,
renderer
,
originX
,
originY
);
}
static
HRESULT
WINAPI
dwritetrimmingsign_GetMetrics
(
IDWriteInlineObject
*
iface
,
DWRITE_INLINE_OBJECT_METRICS
*
metrics
)
static
HRESULT
WINAPI
dwritetrimmingsign_GetMetrics
(
IDWriteInlineObject
*
iface
,
DWRITE_INLINE_OBJECT_METRICS
*
ret
)
{
struct
dwrite_trimmingsign
*
This
=
impl_from_IDWriteInlineObject
(
iface
);
FIXME
(
"(%p)->(%p): stub
\n
"
,
This
,
metrics
);
memset
(
metrics
,
0
,
sizeof
(
*
metrics
));
DWRITE_TEXT_METRICS
metrics
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ret
);
hr
=
IDWriteTextLayout_GetMetrics
(
This
->
layout
,
&
metrics
);
if
(
FAILED
(
hr
))
{
memset
(
ret
,
0
,
sizeof
(
*
ret
));
return
hr
;
}
ret
->
width
=
metrics
.
width
;
ret
->
height
=
0
.
0
;
ret
->
baseline
=
0
.
0
;
ret
->
supportsSideways
=
FALSE
;
return
S_OK
;
}
...
...
dlls/dwrite/tests/layout.c
View file @
04ae4bfb
...
...
@@ -980,6 +980,7 @@ static const struct drawcall_entry drawellipsis_seq[] = {
static
void
test_CreateEllipsisTrimmingSign
(
void
)
{
DWRITE_INLINE_OBJECT_METRICS
metrics
;
DWRITE_BREAK_CONDITION
before
,
after
;
IDWriteTextFormat
*
format
;
IDWriteInlineObject
*
sign
;
...
...
@@ -1001,8 +1002,21 @@ static void test_CreateEllipsisTrimmingSign(void)
hr
=
IDWriteInlineObject_QueryInterface
(
sign
,
&
IID_IDWriteTextLayout
,
(
void
**
)
&
unk
);
ok
(
hr
==
E_NOINTERFACE
,
"got 0x%08x
\n
"
,
hr
);
if
(
0
)
/* crashes on native */
if
(
0
)
{
/* crashes on native */
hr
=
IDWriteInlineObject_GetBreakConditions
(
sign
,
NULL
,
NULL
);
hr
=
IDWriteInlineObject_GetMetrics
(
sign
,
NULL
);
}
metrics
.
width
=
0
.
0
;
metrics
.
height
=
123
.
0
;
metrics
.
baseline
=
123
.
0
;
metrics
.
supportsSideways
=
TRUE
;
hr
=
IDWriteInlineObject_GetMetrics
(
sign
,
&
metrics
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
metrics
.
width
>
0
.
0
,
"got %.2f
\n
"
,
metrics
.
width
);
ok
(
metrics
.
height
==
0
.
0
,
"got %.2f
\n
"
,
metrics
.
height
);
ok
(
metrics
.
baseline
==
0
.
0
,
"got %.2f
\n
"
,
metrics
.
baseline
);
ok
(
!
metrics
.
supportsSideways
,
"got %d
\n
"
,
metrics
.
supportsSideways
);
before
=
after
=
DWRITE_BREAK_CONDITION_CAN_BREAK
;
hr
=
IDWriteInlineObject_GetBreakConditions
(
sign
,
&
before
,
&
after
);
...
...
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