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
8af1ce0b
Commit
8af1ce0b
authored
Jun 22, 2005
by
Felix Nawothnig
Committed by
Alexandre Julliard
Jun 22, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Use smaller numbers as coordinates for mapping tests to avoid
rounding-errors. - Simplify calculation of mapped coordinates for MM_TEXT.
parent
c79f4e21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
metafile.c
dlls/gdi/tests/metafile.c
+6
-17
No files found.
dlls/gdi/tests/metafile.c
View file @
8af1ce0b
...
...
@@ -445,26 +445,15 @@ static void test_mf_PatternBrush(void)
static
INT
CALLBACK
EmfMmTextEnumProc
(
HDC
hdc
,
HANDLETABLE
*
lpHTable
,
const
ENHMETARECORD
*
lpEMFR
,
INT
nObj
,
LPARAM
lpData
)
{
POINT
mapping
[
2
]
=
{
{
0
,
0
},
{
10
00
,
100
0
}
};
POINT
mapping
[
2
]
=
{
{
0
,
0
},
{
10
,
1
0
}
};
LPtoDP
(
hdc
,
mapping
,
2
);
trace
(
"Meta record: iType = %ld, (%ld,%ld)-(%ld,%ld)
\n
"
,
lpEMFR
->
iType
,
mapping
[
0
].
x
,
mapping
[
0
].
y
,
mapping
[
1
].
x
,
mapping
[
1
].
y
);
if
(
lpEMFR
->
iType
==
EMR_LINETO
)
{
FLOAT
xSrcPixSize
,
ySrcPixSize
,
xscale
,
yscale
;
INT
xframe
=
LINE_X
*
(
float
)
GetDeviceCaps
(
hdc
,
HORZSIZE
)
*
100
.
0
f
/
(
float
)
GetDeviceCaps
(
hdc
,
HORZRES
);
INT
yframe
=
LINE_Y
*
(
float
)
GetDeviceCaps
(
hdc
,
VERTSIZE
)
*
100
.
0
f
/
(
float
)
GetDeviceCaps
(
hdc
,
VERTRES
);
INT
x0
=
0
;
INT
y0
=
0
;
INT
x1
;
INT
y1
;
xSrcPixSize
=
(
FLOAT
)
GetDeviceCaps
(
hdc
,
HORZSIZE
)
/
GetDeviceCaps
(
hdc
,
HORZRES
);
ySrcPixSize
=
(
FLOAT
)
GetDeviceCaps
(
hdc
,
VERTSIZE
)
/
GetDeviceCaps
(
hdc
,
VERTRES
);
xscale
=
(
FLOAT
)
1000
*
100
.
0
/
xframe
*
xSrcPixSize
;
yscale
=
(
FLOAT
)
1000
*
100
.
0
/
yframe
*
ySrcPixSize
;
x1
=
(
INT
)
floor
(
xscale
*
100
.
0
+
0
.
5
f
);
y1
=
(
INT
)
floor
(
yscale
*
100
.
0
+
0
.
5
f
);
INT
x1
=
(
INT
)
floor
(
10
*
100
.
0
/
LINE_X
+
0
.
5
);
INT
y1
=
(
INT
)
floor
(
10
*
100
.
0
/
LINE_Y
+
0
.
5
);
ok
(
mapping
[
0
].
x
==
x0
&&
mapping
[
0
].
y
==
y0
&&
mapping
[
1
].
x
==
x1
&&
mapping
[
1
].
y
==
y1
,
"(%ld,%ld)->(%ld,%ld), expected (%d,%d)->(%d,%d)
\n
"
,
mapping
[
0
].
x
,
mapping
[
0
].
y
,
mapping
[
1
].
x
,
mapping
[
1
].
y
,
...
...
@@ -476,15 +465,15 @@ static INT CALLBACK EmfMmTextEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHM
static
INT
CALLBACK
EmfMmAnisotropicEnumProc
(
HDC
hdc
,
HANDLETABLE
*
lpHTable
,
const
ENHMETARECORD
*
lpEMFR
,
INT
nObj
,
LPARAM
lpData
)
{
POINT
mapping
[
2
]
=
{
{
0
,
0
},
{
10
00
,
100
0
}
};
POINT
mapping
[
2
]
=
{
{
0
,
0
},
{
10
,
1
0
}
};
LPtoDP
(
hdc
,
mapping
,
2
);
trace
(
"Meta record: iType = %ld, (%ld,%ld)-(%ld,%ld)
\n
"
,
lpEMFR
->
iType
,
mapping
[
0
].
x
,
mapping
[
0
].
y
,
mapping
[
1
].
x
,
mapping
[
1
].
y
);
if
(
lpEMFR
->
iType
==
EMR_LINETO
)
{
INT
x0
=
MulDiv
(
0
,
GetDeviceCaps
(
hdc
,
HORZSIZE
)
*
100
,
GetDeviceCaps
(
hdc
,
HORZRES
));
INT
y0
=
MulDiv
(
0
,
GetDeviceCaps
(
hdc
,
VERTSIZE
)
*
100
,
GetDeviceCaps
(
hdc
,
VERTRES
));
INT
x1
=
MulDiv
(
10
00
,
GetDeviceCaps
(
hdc
,
HORZSIZE
)
*
100
,
GetDeviceCaps
(
hdc
,
HORZRES
));
INT
y1
=
MulDiv
(
10
00
,
GetDeviceCaps
(
hdc
,
VERTSIZE
)
*
100
,
GetDeviceCaps
(
hdc
,
VERTRES
));
INT
x1
=
MulDiv
(
10
,
GetDeviceCaps
(
hdc
,
HORZSIZE
)
*
100
,
GetDeviceCaps
(
hdc
,
HORZRES
));
INT
y1
=
MulDiv
(
10
,
GetDeviceCaps
(
hdc
,
VERTSIZE
)
*
100
,
GetDeviceCaps
(
hdc
,
VERTRES
));
ok
(
mapping
[
0
].
x
==
x0
&&
mapping
[
0
].
y
==
y0
&&
mapping
[
1
].
x
==
x1
&&
mapping
[
1
].
y
==
y1
,
"(%ld,%ld)->(%ld,%ld), expected (%d,%d)->(%d,%d)
\n
"
,
mapping
[
0
].
x
,
mapping
[
0
].
y
,
mapping
[
1
].
x
,
mapping
[
1
].
y
,
...
...
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