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
250237e1
Commit
250237e1
authored
Nov 17, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Reimplement LPtoDP16/DPtoLP16 on top of the 32-bit functions.
parent
9a145d13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
16 deletions
+40
-16
gdi16.c
dlls/gdi32/gdi16.c
+40
-16
No files found.
dlls/gdi32/gdi16.c
View file @
250237e1
...
...
@@ -3564,17 +3564,29 @@ VOID WINAPI SetMagicColors16(HDC16 hDC, COLORREF color, UINT16 index)
*/
BOOL16
WINAPI
DPtoLP16
(
HDC16
hdc
,
LPPOINT16
points
,
INT16
count
)
{
DC
*
dc
=
get_dc_ptr
(
HDC_32
(
hdc
)
);
if
(
!
dc
)
return
FALSE
;
POINT
points32
[
8
],
*
pt32
=
points32
;
int
i
;
BOOL
ret
;
while
(
count
--
)
if
(
count
>
8
)
{
points
->
x
=
MulDiv
(
points
->
x
-
dc
->
vportOrgX
,
dc
->
wndExtX
,
dc
->
vportExtX
)
+
dc
->
wndOrgX
;
points
->
y
=
MulDiv
(
points
->
y
-
dc
->
vportOrgY
,
dc
->
wndExtY
,
dc
->
vportExtY
)
+
dc
->
wndOrgY
;
points
++
;
if
(
!
(
pt32
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
pt32
)
)))
return
FALSE
;
}
release_dc_ptr
(
dc
);
return
TRUE
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
pt32
[
i
].
x
=
points
[
i
].
x
;
pt32
[
i
].
y
=
points
[
i
].
y
;
}
if
((
ret
=
DPtoLP
(
HDC_32
(
hdc
),
pt32
,
count
)))
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
points
[
i
].
x
=
pt32
[
i
].
x
;
points
[
i
].
y
=
pt32
[
i
].
y
;
}
}
if
(
pt32
!=
points32
)
HeapFree
(
GetProcessHeap
(),
0
,
pt32
);
return
ret
;
}
...
...
@@ -3583,17 +3595,29 @@ BOOL16 WINAPI DPtoLP16( HDC16 hdc, LPPOINT16 points, INT16 count )
*/
BOOL16
WINAPI
LPtoDP16
(
HDC16
hdc
,
LPPOINT16
points
,
INT16
count
)
{
DC
*
dc
=
get_dc_ptr
(
HDC_32
(
hdc
)
);
if
(
!
dc
)
return
FALSE
;
POINT
points32
[
8
],
*
pt32
=
points32
;
int
i
;
BOOL
ret
;
while
(
count
--
)
if
(
count
>
8
)
{
points
->
x
=
MulDiv
(
points
->
x
-
dc
->
wndOrgX
,
dc
->
vportExtX
,
dc
->
wndExtX
)
+
dc
->
vportOrgX
;
points
->
y
=
MulDiv
(
points
->
y
-
dc
->
wndOrgY
,
dc
->
vportExtY
,
dc
->
wndExtY
)
+
dc
->
vportOrgY
;
points
++
;
if
(
!
(
pt32
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
pt32
)
)))
return
FALSE
;
}
release_dc_ptr
(
dc
);
return
TRUE
;
for
(
i
=
0
;
i
<
count
;
i
++
)
{
pt32
[
i
].
x
=
points
[
i
].
x
;
pt32
[
i
].
y
=
points
[
i
].
y
;
}
if
((
ret
=
LPtoDP
(
HDC_32
(
hdc
),
pt32
,
count
)))
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
points
[
i
].
x
=
pt32
[
i
].
x
;
points
[
i
].
y
=
pt32
[
i
].
y
;
}
}
if
(
pt32
!=
points32
)
HeapFree
(
GetProcessHeap
(),
0
,
pt32
);
return
ret
;
}
...
...
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