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
cbe6e717
Commit
cbe6e717
authored
Jan 25, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Fix the mapping test to handle the more precise LOMETRIC settings on Vista.
parent
6996a9c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
6 deletions
+22
-6
mapping.c
dlls/gdi32/tests/mapping.c
+22
-6
No files found.
dlls/gdi32/tests/mapping.c
View file @
cbe6e717
...
...
@@ -75,8 +75,9 @@ static void test_world_transform(void)
{
BOOL
is_win9x
;
HDC
hdc
;
INT
ret
,
size_cx
,
size_cy
,
res_x
,
res_y
;
INT
ret
,
size_cx
,
size_cy
,
res_x
,
res_y
,
dpi_x
,
dpi_y
;
XFORM
xform
;
SIZE
size
;
SetLastError
(
0xdeadbeef
);
GetWorldTransform
(
0
,
NULL
);
...
...
@@ -88,7 +89,10 @@ static void test_world_transform(void)
size_cy
=
GetDeviceCaps
(
hdc
,
VERTSIZE
);
res_x
=
GetDeviceCaps
(
hdc
,
HORZRES
);
res_y
=
GetDeviceCaps
(
hdc
,
VERTRES
);
trace
(
"dc size %d x %d, resolution %d x %d
\n
"
,
size_cx
,
size_cy
,
res_x
,
res_y
);
dpi_x
=
GetDeviceCaps
(
hdc
,
LOGPIXELSX
);
dpi_y
=
GetDeviceCaps
(
hdc
,
LOGPIXELSY
);
trace
(
"dc size %d x %d, resolution %d x %d dpi %d x %d
\n
"
,
size_cx
,
size_cy
,
res_x
,
res_y
,
dpi_x
,
dpi_y
);
expect_viewport_ext
(
hdc
,
1
,
1
);
expect_window_ext
(
hdc
,
1
,
1
);
...
...
@@ -101,13 +105,19 @@ static void test_world_transform(void)
if
(
is_win9x
)
{
expect_viewport_ext
(
hdc
,
GetDeviceCaps
(
hdc
,
LOGPIXELSX
),
GetDeviceCaps
(
hdc
,
LOGPIXELSY
)
);
expect_viewport_ext
(
hdc
,
dpi_x
,
dpi_y
);
expect_window_ext
(
hdc
,
254
,
-
254
);
}
else
{
expect_viewport_ext
(
hdc
,
res_x
,
-
res_y
);
expect_window_ext
(
hdc
,
size_cx
*
10
,
size_cy
*
10
);
ok
(
GetWindowExtEx
(
hdc
,
&
size
),
"GetWindowExtEx failed
\n
"
);
ok
(
size
.
cx
==
size_cx
*
10
||
size
.
cx
==
MulDiv
(
res_x
,
254
,
dpi_x
),
/* Vista uses a more precise method */
"expected cx %d or %d, got %d
\n
"
,
size_cx
*
10
,
MulDiv
(
res_x
,
254
,
dpi_x
),
size
.
cx
);
ok
(
size
.
cy
==
size_cy
*
10
||
size
.
cy
==
MulDiv
(
res_y
,
254
,
dpi_y
),
/* Vista uses a more precise method */
"expected cy %d or %d, got %d
\n
"
,
size_cy
*
10
,
MulDiv
(
res_y
,
254
,
dpi_y
),
size
.
cy
);
}
expect_world_trasform
(
hdc
,
1
.
0
,
1
.
0
);
expect_LPtoDP
(
hdc
,
MulDiv
(
1000
/
10
,
res_x
,
size_cx
),
-
MulDiv
(
1000
/
10
,
res_y
,
size_cy
));
...
...
@@ -154,9 +164,15 @@ static void test_world_transform(void)
ok
(
ret
==
MM_TEXT
,
"expected MM_TEXT, got %d
\n
"
,
ret
);
expect_viewport_ext
(
hdc
,
res_x
,
-
res_y
);
expect_window_ext
(
hdc
,
size_cx
*
10
,
size_cy
*
10
);
ok
(
GetWindowExtEx
(
hdc
,
&
size
),
"GetWindowExtEx failed
\n
"
);
ok
(
size
.
cx
==
size_cx
*
10
||
size
.
cx
==
MulDiv
(
res_x
,
254
,
dpi_x
),
/* Vista uses a more precise method */
"expected cx %d or %d, got %d
\n
"
,
size_cx
*
10
,
MulDiv
(
res_x
,
254
,
dpi_x
),
size
.
cx
);
ok
(
size
.
cy
==
size_cy
*
10
||
size
.
cy
==
MulDiv
(
res_y
,
254
,
dpi_y
),
/* Vista uses a more precise method */
"expected cy %d or %d, got %d
\n
"
,
size_cy
*
10
,
MulDiv
(
res_y
,
254
,
dpi_y
),
size
.
cy
);
expect_world_trasform
(
hdc
,
20
.
0
,
20
.
0
);
expect_LPtoDP
(
hdc
,
MulDiv
(
1000
*
2
,
res_x
,
size_cx
),
-
MulDiv
(
1000
*
2
,
res_y
,
size_
cy
));
expect_LPtoDP
(
hdc
,
MulDiv
(
20000
,
res_x
,
size
.
cx
),
-
MulDiv
(
20000
,
res_y
,
size
.
cy
));
SetLastError
(
0xdeadbeef
);
ret
=
SetMapMode
(
hdc
,
MM_TEXT
);
...
...
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