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
a4b3420e
Commit
a4b3420e
authored
May 13, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/layout: Use a helper to update layout metrics.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
52065a31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
layout.c
dlls/dwrite/layout.c
+14
-12
No files found.
dlls/dwrite/layout.c
View file @
a4b3420e
...
...
@@ -3592,17 +3592,21 @@ static HRESULT WINAPI dwritetextlayout_GetLineMetrics(IDWriteTextLayout3 *iface,
return
max_count
>=
This
->
metrics
.
lineCount
?
S_OK
:
E_NOT_SUFFICIENT_BUFFER
;
}
static
HRESULT
layout_update_metrics
(
struct
dwrite_textlayout
*
layout
)
{
return
layout_compute_effective_runs
(
layout
);
}
static
HRESULT
WINAPI
dwritetextlayout_GetMetrics
(
IDWriteTextLayout3
*
iface
,
DWRITE_TEXT_METRICS
*
metrics
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout3
(
iface
);
DWRITE_TEXT_METRICS1
metrics1
;
struct
dwrite_textlayout
*
layout
=
impl_from_IDWriteTextLayout3
(
iface
);
HRESULT
hr
;
TRACE
(
"
(%p)->(%p)
\n
"
,
This
,
metrics
);
TRACE
(
"
%p, %p.
\n
"
,
iface
,
metrics
);
hr
=
IDWriteTextLayout3_GetMetrics
(
iface
,
&
metrics1
);
hr
=
layout_update_metrics
(
layout
);
if
(
hr
==
S_OK
)
memcpy
(
metrics
,
&
metrics1
,
sizeof
(
*
metrics
));
memcpy
(
metrics
,
&
layout
->
metrics
,
sizeof
(
*
metrics
));
return
hr
;
}
...
...
@@ -3932,17 +3936,15 @@ static HRESULT WINAPI dwritetextlayout1_GetCharacterSpacing(IDWriteTextLayout3 *
static
HRESULT
WINAPI
dwritetextlayout2_GetMetrics
(
IDWriteTextLayout3
*
iface
,
DWRITE_TEXT_METRICS1
*
metrics
)
{
struct
dwrite_textlayout
*
This
=
impl_from_IDWriteTextLayout3
(
iface
);
struct
dwrite_textlayout
*
layout
=
impl_from_IDWriteTextLayout3
(
iface
);
HRESULT
hr
;
TRACE
(
"
(%p)->(%p)
\n
"
,
This
,
metrics
);
TRACE
(
"
%p, %p.
\n
"
,
iface
,
metrics
);
hr
=
layout_compute_effective_runs
(
This
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
SUCCEEDED
(
hr
=
layout_update_metrics
(
layout
)))
*
metrics
=
layout
->
metrics
;
*
metrics
=
This
->
metrics
;
return
S_OK
;
return
hr
;
}
static
HRESULT
WINAPI
dwritetextlayout2_SetVerticalGlyphOrientation
(
IDWriteTextLayout3
*
iface
,
DWRITE_VERTICAL_GLYPH_ORIENTATION
orientation
)
...
...
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