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
4addd20a
Commit
4addd20a
authored
Jun 15, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dwrite/tests: Test to show that GetCurrentTransform/GetPixelsPerDip are not…
dwrite/tests: Test to show that GetCurrentTransform/GetPixelsPerDip are not really used from Draw().
parent
d1f9067c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
12 deletions
+49
-12
layout.c
dlls/dwrite/tests/layout.c
+49
-12
No files found.
dlls/dwrite/tests/layout.c
View file @
4addd20a
...
...
@@ -406,20 +406,15 @@ static HRESULT WINAPI testrenderer_IsPixelSnappingDisabled(IDWriteTextRenderer *
static
HRESULT
WINAPI
testrenderer_GetCurrentTransform
(
IDWriteTextRenderer
*
iface
,
void
*
client_drawingcontext
,
DWRITE_MATRIX
*
transform
)
{
transform
->
m11
=
1
.
0
;
transform
->
m12
=
0
.
0
;
transform
->
m21
=
0
.
0
;
transform
->
m22
=
1
.
0
;
transform
->
dx
=
0
.
0
;
transform
->
dy
=
0
.
0
;
return
S_OK
;
ok
(
0
,
"unexpected call
\n
"
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
testrenderer_GetPixelsPerDip
(
IDWriteTextRenderer
*
iface
,
void
*
client_drawingcontext
,
FLOAT
*
pixels_per_dip
)
{
*
pixels_per_dip
=
1
.
0
;
return
S_OK
;
ok
(
0
,
"unexpected call
\n
"
)
;
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
testrenderer_DrawGlyphRun
(
IDWriteTextRenderer
*
iface
,
...
...
@@ -1174,7 +1169,12 @@ static const struct drawcall_entry draw_seq5[] = {
{
DRAW_LAST_KIND
}
};
static
const
struct
drawcall_entry
draw_seq6
[]
=
{
static
const
struct
drawcall_entry
empty_seq
[]
=
{
{
DRAW_LAST_KIND
}
};
static
const
struct
drawcall_entry
draw_single_run_seq
[]
=
{
{
DRAW_GLYPHRUN
,
{
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
}
},
{
DRAW_LAST_KIND
}
};
...
...
@@ -1183,12 +1183,12 @@ static void test_Draw(void)
static
const
WCHAR
strW
[]
=
{
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
str2W
[]
=
{
0x202a
,
0x202c
,
'a'
,
'b'
,
0
};
static
const
WCHAR
ruW
[]
=
{
'r'
,
'u'
,
0
};
IDWriteInlineObject
*
inlineobj
;
IDWriteTextFormat
*
format
;
IDWriteTextLayout
*
layout
;
DWRITE_TEXT_RANGE
range
;
IDWriteFactory
*
factory
;
DWRITE_MATRIX
m
;
HRESULT
hr
;
factory
=
create_factory
();
...
...
@@ -1285,7 +1285,44 @@ static void test_Draw(void)
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_seq6
,
"draw test 6"
,
FALSE
);
ok_sequence
(
sequences
,
RENDERER_ID
,
empty_seq
,
"draw test 6"
,
FALSE
);
IDWriteTextLayout_Release
(
layout
);
/* different parameter combinations with gdi-compatible layout */
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
format
,
100
.
0
,
100
.
0
,
1
.
0
,
NULL
,
TRUE
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_single_run_seq
,
"draw test 7"
,
FALSE
);
IDWriteTextLayout_Release
(
layout
);
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
format
,
100
.
0
,
100
.
0
,
1
.
0
,
NULL
,
FALSE
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_single_run_seq
,
"draw test 8"
,
FALSE
);
IDWriteTextLayout_Release
(
layout
);
m
.
m11
=
m
.
m22
=
2
.
0
;
m
.
m12
=
m
.
m21
=
m
.
dx
=
m
.
dy
=
0
.
0
;
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
format
,
100
.
0
,
100
.
0
,
1
.
0
,
&
m
,
TRUE
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_single_run_seq
,
"draw test 9"
,
FALSE
);
IDWriteTextLayout_Release
(
layout
);
m
.
m11
=
m
.
m22
=
2
.
0
;
m
.
m12
=
m
.
m21
=
m
.
dx
=
m
.
dy
=
0
.
0
;
hr
=
IDWriteFactory_CreateGdiCompatibleTextLayout
(
factory
,
strW
,
6
,
format
,
100
.
0
,
100
.
0
,
1
.
0
,
&
m
,
FALSE
,
&
layout
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
flush_sequence
(
sequences
,
RENDERER_ID
);
hr
=
IDWriteTextLayout_Draw
(
layout
,
NULL
,
&
testrenderer
,
0
.
0
,
0
.
0
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
ok_sequence
(
sequences
,
RENDERER_ID
,
draw_single_run_seq
,
"draw test 10"
,
FALSE
);
IDWriteTextLayout_Release
(
layout
);
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