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
ebdad92d
Commit
ebdad92d
authored
Apr 07, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Store text format properties.
parent
113dd5d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
14 deletions
+41
-14
layout.c
dlls/dwrite/layout.c
+22
-14
layout.c
dlls/dwrite/tests/layout.c
+19
-0
No files found.
dlls/dwrite/layout.c
View file @
ebdad92d
...
...
@@ -801,36 +801,41 @@ static ULONG WINAPI dwritetextformat_Release(IDWriteTextFormat *iface)
static
HRESULT
WINAPI
dwritetextformat_SetTextAlignment
(
IDWriteTextFormat
*
iface
,
DWRITE_TEXT_ALIGNMENT
alignment
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
alignment
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
alignment
);
This
->
format
.
textalignment
=
alignment
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextformat_SetParagraphAlignment
(
IDWriteTextFormat
*
iface
,
DWRITE_PARAGRAPH_ALIGNMENT
alignment
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
alignment
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
alignment
);
This
->
format
.
paralign
=
alignment
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextformat_SetWordWrapping
(
IDWriteTextFormat
*
iface
,
DWRITE_WORD_WRAPPING
wrapping
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
wrapping
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
wrapping
);
This
->
format
.
wrapping
=
wrapping
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextformat_SetReadingDirection
(
IDWriteTextFormat
*
iface
,
DWRITE_READING_DIRECTION
direction
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
direction
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
direction
);
This
->
format
.
readingdir
=
direction
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextformat_SetFlowDirection
(
IDWriteTextFormat
*
iface
,
DWRITE_FLOW_DIRECTION
direction
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat
(
iface
);
FIXME
(
"(%p)->(%d): stub
\n
"
,
This
,
direction
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d)
\n
"
,
This
,
direction
);
This
->
format
.
flow
=
direction
;
return
S_OK
;
}
static
HRESULT
WINAPI
dwritetextformat_SetIncrementalTabStop
(
IDWriteTextFormat
*
iface
,
FLOAT
tabstop
)
...
...
@@ -848,12 +853,15 @@ static HRESULT WINAPI dwritetextformat_SetTrimming(IDWriteTextFormat *iface, DWR
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
dwritetextformat_SetLineSpacing
(
IDWriteTextFormat
*
iface
,
DWRITE_LINE_SPACING_METHOD
spacing
,
FLOAT
line_
spacing
,
FLOAT
baseline
)
static
HRESULT
WINAPI
dwritetextformat_SetLineSpacing
(
IDWriteTextFormat
*
iface
,
DWRITE_LINE_SPACING_METHOD
method
,
FLOAT
spacing
,
FLOAT
baseline
)
{
struct
dwrite_textformat
*
This
=
impl_from_IDWriteTextFormat
(
iface
);
FIXME
(
"(%p)->(%d %f %f): stub
\n
"
,
This
,
spacing
,
line_spacing
,
baseline
);
return
E_NOTIMPL
;
TRACE
(
"(%p)->(%d %f %f)
\n
"
,
This
,
method
,
spacing
,
baseline
);
This
->
format
.
spacingmethod
=
method
;
This
->
format
.
spacing
=
spacing
;
This
->
format
.
baseline
=
baseline
;
return
S_OK
;
}
static
DWRITE_TEXT_ALIGNMENT
WINAPI
dwritetextformat_GetTextAlignment
(
IDWriteTextFormat
*
iface
)
...
...
dlls/dwrite/tests/layout.c
View file @
ebdad92d
...
...
@@ -160,6 +160,25 @@ if (0) /* crashes on native */
ok
(
baseline
==
0
.
0
,
"got %f
\n
"
,
baseline
);
ok
(
method
==
DWRITE_LINE_SPACING_METHOD_DEFAULT
,
"got %d
\n
"
,
method
);
/* setters */
hr
=
IDWriteTextFormat_SetTextAlignment
(
format
,
DWRITE_TEXT_ALIGNMENT_LEADING
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextFormat_SetParagraphAlignment
(
format
,
DWRITE_PARAGRAPH_ALIGNMENT_NEAR
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextFormat_SetWordWrapping
(
format
,
DWRITE_WORD_WRAPPING_WRAP
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextFormat_SetReadingDirection
(
format
,
DWRITE_READING_DIRECTION_LEFT_TO_RIGHT
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextFormat_SetFlowDirection
(
format
,
DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
IDWriteTextFormat_SetLineSpacing
(
format
,
DWRITE_LINE_SPACING_METHOD_DEFAULT
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IDWriteTextFormat_Release
(
format
);
}
...
...
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