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
f4bc213c
Commit
f4bc213c
authored
Jul 18, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Jul 18, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Use an internal version of LPtoDP that takes a DC * where possible.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
af5014f4
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
34 additions
and
20 deletions
+34
-20
bitblt.c
dlls/gdi32/bitblt.c
+4
-4
clipping.c
dlls/gdi32/clipping.c
+3
-3
dc.c
dlls/gdi32/dc.c
+1
-1
dib.c
dlls/gdi32/dib.c
+2
-2
font.c
dlls/gdi32/font.c
+5
-5
gdi_private.h
dlls/gdi32/gdi_private.h
+3
-0
mapping.c
dlls/gdi32/mapping.c
+16
-5
No files found.
dlls/gdi32/bitblt.c
View file @
f4bc213c
...
...
@@ -112,7 +112,7 @@ static BOOL get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
rect
.
top
=
dst
->
log_y
;
rect
.
right
=
dst
->
log_x
+
dst
->
log_width
;
rect
.
bottom
=
dst
->
log_y
+
dst
->
log_height
;
LPtoDP
(
dc_dst
->
hSelf
,
(
POINT
*
)
&
rect
,
2
);
lp_to_dp
(
dc_dst
,
(
POINT
*
)
&
rect
,
2
);
dst
->
x
=
rect
.
left
;
dst
->
y
=
rect
.
top
;
dst
->
width
=
rect
.
right
-
rect
.
left
;
...
...
@@ -134,7 +134,7 @@ static BOOL get_vis_rectangles( DC *dc_dst, struct bitblt_coords *dst,
rect
.
top
=
src
->
log_y
;
rect
.
right
=
src
->
log_x
+
src
->
log_width
;
rect
.
bottom
=
src
->
log_y
+
src
->
log_height
;
LPtoDP
(
dc_src
->
hSelf
,
(
POINT
*
)
&
rect
,
2
);
lp_to_dp
(
dc_src
,
(
POINT
*
)
&
rect
,
2
);
src
->
x
=
rect
.
left
;
src
->
y
=
rect
.
top
;
src
->
width
=
rect
.
right
-
rect
.
left
;
...
...
@@ -420,7 +420,7 @@ BOOL nulldrv_GradientFill( PHYSDEV dev, TRIVERTEX *vert_array, ULONG nvert,
pts
[
i
].
x
=
vert_array
[
i
].
x
;
pts
[
i
].
y
=
vert_array
[
i
].
y
;
}
LPtoDP
(
dev
->
h
dc
,
pts
,
nvert
);
lp_to_dp
(
dc
,
pts
,
nvert
);
/* compute bounding rect of all the rectangles/triangles */
reset_bounds
(
&
dst
.
visrect
);
...
...
@@ -496,7 +496,7 @@ COLORREF nulldrv_GetPixel( PHYSDEV dev, INT x, INT y )
src
.
visrect
.
left
=
x
;
src
.
visrect
.
top
=
y
;
LPtoDP
(
dev
->
h
dc
,
(
POINT
*
)
&
src
.
visrect
,
1
);
lp_to_dp
(
dc
,
(
POINT
*
)
&
src
.
visrect
,
1
);
src
.
visrect
.
right
=
src
.
visrect
.
left
+
1
;
src
.
visrect
.
bottom
=
src
.
visrect
.
top
+
1
;
src
.
x
=
src
.
visrect
.
left
;
...
...
dlls/gdi32/clipping.c
View file @
f4bc213c
...
...
@@ -50,7 +50,7 @@ static inline RECT get_clip_rect( DC * dc, int left, int top, int right, int bot
rect
.
top
=
top
;
rect
.
right
=
right
;
rect
.
bottom
=
bottom
;
LPtoDP
(
dc
->
hSelf
,
(
POINT
*
)
&
rect
,
2
);
lp_to_dp
(
dc
,
(
POINT
*
)
&
rect
,
2
);
if
(
dc
->
layout
&
LAYOUT_RTL
)
{
int
tmp
=
rect
.
left
;
...
...
@@ -375,7 +375,7 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
pt
.
x
=
x
;
pt
.
y
=
y
;
LPtoDP
(
h
dc
,
&
pt
,
1
);
lp_to_dp
(
dc
,
&
pt
,
1
);
update_dc
(
dc
);
ret
=
(
!
get_dc_device_rect
(
dc
,
&
visrect
)
||
(
pt
.
x
>=
visrect
.
left
&&
pt
.
x
<
visrect
.
right
&&
...
...
@@ -398,7 +398,7 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
TRACE
(
"%p %s
\n
"
,
hdc
,
wine_dbgstr_rect
(
rect
));
tmpRect
=
*
rect
;
LPtoDP
(
h
dc
,
(
POINT
*
)
&
tmpRect
,
2
);
lp_to_dp
(
dc
,
(
POINT
*
)
&
tmpRect
,
2
);
order_rect
(
&
tmpRect
);
update_dc
(
dc
);
...
...
dlls/gdi32/dc.c
View file @
f4bc213c
...
...
@@ -1535,7 +1535,7 @@ UINT WINAPI SetBoundsRect(HDC hdc, const RECT* rect, UINT flags)
{
RECT
rc
=
*
rect
;
LPtoDP
(
h
dc
,
(
POINT
*
)
&
rc
,
2
);
lp_to_dp
(
dc
,
(
POINT
*
)
&
rc
,
2
);
add_bounds_rect
(
&
dc
->
bounds
,
&
rc
);
}
...
...
dlls/gdi32/dib.c
View file @
f4bc213c
...
...
@@ -490,7 +490,7 @@ INT nulldrv_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst, INT he
rect
.
top
=
yDst
;
rect
.
right
=
xDst
+
widthDst
;
rect
.
bottom
=
yDst
+
heightDst
;
LPtoDP
(
dc
->
hSelf
,
(
POINT
*
)
&
rect
,
2
);
lp_to_dp
(
dc
,
(
POINT
*
)
&
rect
,
2
);
dst
.
x
=
rect
.
left
;
dst
.
y
=
rect
.
top
;
dst
.
width
=
rect
.
right
-
rect
.
left
;
...
...
@@ -848,7 +848,7 @@ INT nulldrv_SetDIBitsToDevice( PHYSDEV dev, INT x_dst, INT y_dst, DWORD cx, DWOR
pt
.
x
=
x_dst
;
pt
.
y
=
y_dst
;
LPtoDP
(
dev
->
h
dc
,
&
pt
,
1
);
lp_to_dp
(
dc
,
&
pt
,
1
);
dst
.
x
=
pt
.
x
;
dst
.
y
=
pt
.
y
;
dst
.
width
=
cx
;
...
...
dlls/gdi32/font.c
View file @
f4bc213c
...
...
@@ -87,7 +87,7 @@ static inline INT INTERNAL_YWSTODS(DC *dc, INT height)
pt
[
0
].
x
=
pt
[
0
].
y
=
0
;
pt
[
1
].
x
=
0
;
pt
[
1
].
y
=
height
;
LPtoDP
(
dc
->
hSelf
,
pt
,
2
);
lp_to_dp
(
dc
,
pt
,
2
);
return
pt
[
1
].
y
-
pt
[
0
].
y
;
}
...
...
@@ -2258,7 +2258,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
if
(
lprect
&&
(
flags
&
(
ETO_OPAQUE
|
ETO_CLIPPED
)))
{
rc
=
*
lprect
;
LPtoDP
(
h
dc
,
(
POINT
*
)
&
rc
,
2
);
lp_to_dp
(
dc
,
(
POINT
*
)
&
rc
,
2
);
order_rect
(
&
rc
);
if
(
flags
&
ETO_OPAQUE
)
physdev
->
funcs
->
pExtTextOut
(
physdev
,
0
,
0
,
ETO_OPAQUE
,
&
rc
,
NULL
,
0
,
NULL
);
...
...
@@ -2273,7 +2273,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
pt
.
x
=
x
;
pt
.
y
=
y
;
LPtoDP
(
h
dc
,
&
pt
,
1
);
lp_to_dp
(
dc
,
&
pt
,
1
);
x
=
pt
.
x
;
y
=
pt
.
y
;
...
...
@@ -2335,7 +2335,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
desired
[
1
].
x
=
cosEsc
*
total
.
x
+
sinEsc
*
total
.
y
;
desired
[
1
].
y
=
-
sinEsc
*
total
.
x
+
cosEsc
*
total
.
y
;
LPtoDP
(
h
dc
,
desired
,
2
);
lp_to_dp
(
dc
,
desired
,
2
);
desired
[
1
].
x
-=
desired
[
0
].
x
;
desired
[
1
].
y
-=
desired
[
0
].
y
;
...
...
@@ -2365,7 +2365,7 @@ BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
desired
[
0
].
x
=
desired
[
0
].
y
=
0
;
desired
[
1
].
x
=
sz
.
cx
;
desired
[
1
].
y
=
0
;
LPtoDP
(
h
dc
,
desired
,
2
);
lp_to_dp
(
dc
,
desired
,
2
);
desired
[
1
].
x
-=
desired
[
0
].
x
;
desired
[
1
].
y
-=
desired
[
0
].
y
;
...
...
dlls/gdi32/gdi_private.h
View file @
f4bc213c
...
...
@@ -309,6 +309,9 @@ extern BOOL GDI_dec_ref_count( HGDIOBJ handle ) DECLSPEC_HIDDEN;
extern
void
GDI_hdc_using_object
(
HGDIOBJ
obj
,
HDC
hdc
)
DECLSPEC_HIDDEN
;
extern
void
GDI_hdc_not_using_object
(
HGDIOBJ
obj
,
HDC
hdc
)
DECLSPEC_HIDDEN
;
/* mapping.c */
extern
void
lp_to_dp
(
DC
*
dc
,
POINT
*
points
,
INT
count
)
DECLSPEC_HIDDEN
;
/* metafile.c */
extern
HMETAFILE
MF_Create_HMETAFILE
(
METAHEADER
*
mh
)
DECLSPEC_HIDDEN
;
extern
METAHEADER
*
MF_CreateMetaHeaderDisk
(
METAHEADER
*
mr
,
LPCVOID
filename
,
BOOL
unicode
)
DECLSPEC_HIDDEN
;
...
...
dlls/gdi32/mapping.c
View file @
f4bc213c
...
...
@@ -350,13 +350,12 @@ BOOL WINAPI DPtoLP( HDC hdc, LPPOINT points, INT count )
/***********************************************************************
* LPtoDP (GDI32.@)
* lp_to_dp
*
* Internal version of LPtoDP that takes a DC *.
*/
BOOL
WINAPI
LPtoDP
(
HDC
hdc
,
LPPOINT
points
,
INT
count
)
void
lp_to_dp
(
DC
*
dc
,
POINT
*
points
,
INT
count
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
while
(
count
--
)
{
double
x
=
points
->
x
;
...
...
@@ -369,6 +368,18 @@ BOOL WINAPI LPtoDP( HDC hdc, LPPOINT points, INT count )
dc
->
xformWorld2Vport
.
eDy
+
0
.
5
);
points
++
;
}
}
/***********************************************************************
* LPtoDP (GDI32.@)
*/
BOOL
WINAPI
LPtoDP
(
HDC
hdc
,
POINT
*
points
,
INT
count
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
lp_to_dp
(
dc
,
points
,
count
);
release_dc_ptr
(
dc
);
return
TRUE
;
}
...
...
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