Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b2a0fbc1
Commit
b2a0fbc1
authored
Feb 02, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 03, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Implement SetLineSpacing() for layout.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bac7e9c6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
13 deletions
+31
-13
layout.c
dlls/dwrite/layout.c
+31
-13
No files found.
dlls/dwrite/layout.c
View file @
b2a0fbc1
...
...
@@ -410,6 +410,21 @@ static inline HRESULT format_set_flowdirection(struct dwrite_textformat_data *fo
return
S_OK
;
}
static
inline
HRESULT
format_set_linespacing
(
struct
dwrite_textformat_data
*
format
,
DWRITE_LINE_SPACING_METHOD
method
,
FLOAT
spacing
,
FLOAT
baseline
,
BOOL
*
changed
)
{
if
(
spacing
<
0
.
0
f
||
(
UINT32
)
method
>
DWRITE_LINE_SPACING_METHOD_UNIFORM
)
return
E_INVALIDARG
;
if
(
changed
)
*
changed
=
format
->
spacingmethod
!=
method
||
format
->
spacing
!=
spacing
||
format
->
baseline
!=
baseline
;
format
->
spacingmethod
=
method
;
format
->
spacing
=
spacing
;
format
->
baseline
=
baseline
;
return
S_OK
;
}
static
HRESULT
get_fontfallback_from_format
(
const
struct
dwrite_textformat_data
*
format
,
IDWriteFontFallback
**
fallback
)
{
*
fallback
=
format
->
fallback
;
...
...
@@ -3725,12 +3740,23 @@ static HRESULT WINAPI dwritetextformat1_layout_SetTrimming(IDWriteTextFormat1 *i
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritetextformat1_layout_SetLineSpacing
(
IDWriteTextFormat1
*
iface
,
DWRITE_LINE_SPACING_METHOD
spacing
,
FLOAT
line_
spacing
,
FLOAT
baseline
)
static
HRESULT
WINAPI
dwritetextformat1_layout_SetLineSpacing
(
IDWriteTextFormat1
*
iface
,
DWRITE_LINE_SPACING_METHOD
method
,
FLOAT
spacing
,
FLOAT
baseline
)
{
struct
dwrite_textlayout
*
This
=
impl_layout_form_IDWriteTextFormat1
(
iface
);
FIXME
(
"(%p)->(%d %f %f): stub
\n
"
,
This
,
spacing
,
line_spacing
,
baseline
);
return
E_NOTIMPL
;
BOOL
changed
;
HRESULT
hr
;
TRACE
(
"(%p)->(%d %f %f)
\n
"
,
This
,
method
,
spacing
,
baseline
);
hr
=
format_set_linespacing
(
&
This
->
format
,
method
,
spacing
,
baseline
,
&
changed
);
if
(
FAILED
(
hr
))
return
hr
;
if
(
changed
)
This
->
recompute
=
RECOMPUTE_EVERYTHING
;
return
S_OK
;
}
static
DWRITE_TEXT_ALIGNMENT
WINAPI
dwritetextformat1_layout_GetTextAlignment
(
IDWriteTextFormat1
*
iface
)
...
...
@@ -4726,16 +4752,8 @@ static HRESULT WINAPI dwritetextformat_SetLineSpacing(IDWriteTextFormat1 *iface,
FLOAT
spacing
,
FLOAT
baseline
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat1
(
iface
);
TRACE
(
"(%p)->(%d %f %f)
\n
"
,
This
,
method
,
spacing
,
baseline
);
if
(
spacing
<
0
.
0
f
||
(
UINT32
)
method
>
DWRITE_LINE_SPACING_METHOD_UNIFORM
)
return
E_INVALIDARG
;
This
->
format
.
spacingmethod
=
method
;
This
->
format
.
spacing
=
spacing
;
This
->
format
.
baseline
=
baseline
;
return
S_OK
;
return
format_set_linespacing
(
&
This
->
format
,
method
,
spacing
,
baseline
,
NULL
);
}
static
DWRITE_TEXT_ALIGNMENT
WINAPI
dwritetextformat_GetTextAlignment
(
IDWriteTextFormat1
*
iface
)
...
...
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