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
d58166d4
Commit
d58166d4
authored
Aug 24, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Aug 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite: Don't use drawing effect for trimming signs.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7316c962
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
layout.c
dlls/dwrite/layout.c
+1
-6
layout.c
dlls/dwrite/tests/layout.c
+10
-2
No files found.
dlls/dwrite/layout.c
View file @
d58166d4
...
...
@@ -5030,20 +5030,15 @@ static HRESULT WINAPI dwritetrimmingsign_Draw(IDWriteInlineObject *iface, void *
FLOAT
originX
,
FLOAT
originY
,
BOOL
is_sideways
,
BOOL
is_rtl
,
IUnknown
*
effect
)
{
struct
dwrite_trimmingsign
*
This
=
impl_from_IDWriteInlineObject
(
iface
);
DWRITE_TEXT_RANGE
range
=
{
0
,
~
0u
};
DWRITE_TEXT_METRICS
metrics
;
DWRITE_LINE_METRICS
line
;
UINT32
line_count
;
HRESULT
hr
;
TRACE
(
"(%p)->(%p %p %.2f %.2f %d %d %p)
\n
"
,
This
,
context
,
renderer
,
originX
,
originY
,
is_sideways
,
is_rtl
,
effect
);
IDWriteTextLayout_SetDrawingEffect
(
This
->
layout
,
effect
,
range
);
IDWriteTextLayout_GetLineMetrics
(
This
->
layout
,
&
line
,
1
,
&
line_count
);
IDWriteTextLayout_GetMetrics
(
This
->
layout
,
&
metrics
);
hr
=
IDWriteTextLayout_Draw
(
This
->
layout
,
context
,
renderer
,
originX
,
originY
-
line
.
baseline
);
IDWriteTextLayout_SetDrawingEffect
(
This
->
layout
,
NULL
,
range
);
return
hr
;
return
IDWriteTextLayout_Draw
(
This
->
layout
,
context
,
renderer
,
originX
,
originY
-
line
.
baseline
);
}
static
HRESULT
WINAPI
dwritetrimmingsign_GetMetrics
(
IDWriteInlineObject
*
iface
,
DWRITE_INLINE_OBJECT_METRICS
*
ret
)
...
...
dlls/dwrite/tests/layout.c
View file @
d58166d4
...
...
@@ -1228,12 +1228,13 @@ static void test_GetLocaleName(void)
}
static
const
struct
drawcall_entry
drawellipsis_seq
[]
=
{
{
DRAW_GLYPHRUN
,
{
0x2026
,
0
},
{
'e'
,
'n'
,
'-'
,
'
u'
,
's
'
,
0
},
1
},
{
DRAW_GLYPHRUN
,
{
0x2026
,
0
},
{
'e'
,
'n'
,
'-'
,
'
g'
,
'b
'
,
0
},
1
},
{
DRAW_LAST_KIND
}
};
static
void
test_CreateEllipsisTrimmingSign
(
void
)
{
static
const
WCHAR
engbW
[]
=
{
'e'
,
'n'
,
'-'
,
'G'
,
'B'
,
0
};
DWRITE_INLINE_OBJECT_METRICS
metrics
;
DWRITE_BREAK_CONDITION
before
,
after
;
IDWriteTextFormat
*
format
;
...
...
@@ -1245,7 +1246,7 @@ static void test_CreateEllipsisTrimmingSign(void)
factory
=
create_factory
();
hr
=
IDWriteFactory_CreateTextFormat
(
factory
,
tahomaW
,
NULL
,
DWRITE_FONT_WEIGHT_NORMAL
,
DWRITE_FONT_STYLE_NORMAL
,
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
,
en
us
W
,
&
format
);
DWRITE_FONT_STRETCH_NORMAL
,
10
.
0
,
en
gb
W
,
&
format
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
EXPECT_REF
(
format
,
1
);
...
...
@@ -1286,12 +1287,19 @@ if (0) {/* crashes on native */
effect
=
create_test_effect
();
EXPECT_REF
(
effect
,
1
);
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteInlineObject_Draw
(
sign
,
NULL
,
&
testrenderer
,
0
.
0
f
,
0
.
0
f
,
FALSE
,
FALSE
,
effect
);
ok
(
hr
==
S_OK
,
"Failed to draw trimming sign, hr %#x.
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
drawellipsis_seq
,
"ellipsis sign draw with effect test"
,
FALSE
);
EXPECT_REF
(
effect
,
1
);
IUnknown_Release
(
effect
);
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteInlineObject_Draw
(
sign
,
NULL
,
&
testrenderer
,
0
.
0
f
,
0
.
0
f
,
FALSE
,
FALSE
,
(
void
*
)
0xdeadbeef
);
ok
(
hr
==
S_OK
,
"Failed to draw trimming sign, hr %#x.
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
drawellipsis_seq
,
"ellipsis sign draw with effect test"
,
FALSE
);
IDWriteInlineObject_Release
(
sign
);
/* non-orthogonal flow/reading combination */
...
...
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