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
ef73b788
Commit
ef73b788
authored
Jan 28, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Inline object origin is at top-left corner, not baseline.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fbcf1531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
layout.c
dlls/dwrite/layout.c
+13
-13
No files found.
dlls/dwrite/layout.c
View file @
ef73b788
...
...
@@ -196,15 +196,15 @@ struct layout_effective_run {
struct
layout_effective_inline
{
struct
list
entry
;
IDWriteInlineObject
*
object
;
IUnknown
*
effect
;
FLOAT
origin_x
;
FLOAT
origin_y
;
FLOAT
align_dx
;
FLOAT
width
;
BOOL
is_sideways
;
BOOL
is_rtl
;
UINT32
line
;
const
struct
layout_run
*
run
;
/* nominal run this one is based on */
IUnknown
*
effect
;
/* original reference is kept only at range level */
FLOAT
origin_x
;
/* left X position */
FLOAT
origin_y
;
/* left top corner Y position */
FLOAT
align_dx
;
/* adjustment from text alignment */
FLOAT
width
;
/* object width as it's reported it */
BOOL
is_sideways
;
/* vertical flow direction flag passed to Draw */
BOOL
is_rtl
;
/* bidi flag passed to Draw */
UINT32
line
;
/* 0-based line index in line metrics array */
};
struct
layout_underline
{
...
...
@@ -1089,7 +1089,7 @@ static HRESULT layout_add_effective_run(struct dwrite_textlayout *layout, const
if
(
!
inlineobject
)
return
E_OUTOFMEMORY
;
inlineobject
->
object
=
r
->
u
.
object
.
object
;
inlineobject
->
run
=
r
;
inlineobject
->
width
=
get_cluster_range_width
(
layout
,
first_cluster
,
first_cluster
+
cluster_count
);
inlineobject
->
origin_x
=
is_rtl
?
origin_x
-
inlineobject
->
width
:
origin_x
;
inlineobject
->
origin_y
=
0
.
0
f
;
/* set after line is built */
...
...
@@ -1471,7 +1471,7 @@ static void layout_apply_par_alignment(struct dwrite_textlayout *layout)
}
while
(
inrun
&&
inrun
->
line
==
line
)
{
inrun
->
origin_y
=
origin_y
;
inrun
->
origin_y
=
origin_y
-
inrun
->
run
->
baseline
;
inrun
=
layout_get_next_inline_run
(
layout
,
inrun
);
}
}
...
...
@@ -1773,7 +1773,7 @@ static HRESULT layout_compute_effective_runs(struct dwrite_textlayout *layout)
/* Same for inline runs */
while
(
inrun
&&
inrun
->
line
==
line
)
{
inrun
->
origin_y
=
origin_y
;
inrun
->
origin_y
=
origin_y
-
inrun
->
run
->
baseline
;
inrun
=
layout_get_next_inline_run
(
layout
,
inrun
);
}
...
...
@@ -3178,7 +3178,7 @@ static HRESULT WINAPI dwritetextlayout_Draw(IDWriteTextLayout2 *iface,
context
,
inlineobject
->
origin_x
+
inlineobject
->
align_dx
+
origin_x
,
SNAP_COORD
(
inlineobject
->
origin_y
+
origin_y
),
inlineobject
->
object
,
inlineobject
->
run
->
u
.
object
.
object
,
inlineobject
->
is_sideways
,
inlineobject
->
is_rtl
,
inlineobject
->
effect
);
...
...
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