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
90273a6e
Commit
90273a6e
authored
Dec 22, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix clipping to the DIB rectangle in GetPixel().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3eea7ff3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
graphics.c
dlls/gdi32/dibdrv/graphics.c
+6
-4
No files found.
dlls/gdi32/dibdrv/graphics.c
View file @
90273a6e
...
...
@@ -1108,6 +1108,7 @@ COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y )
dibdrv_physdev
*
pdev
=
get_dibdrv_pdev
(
dev
);
DC
*
dc
=
get_physdev_dc
(
dev
);
POINT
pt
;
RECT
rect
;
DWORD
pixel
;
TRACE
(
"(%p, %d, %d)
\n
"
,
dev
,
x
,
y
);
...
...
@@ -1115,10 +1116,11 @@ COLORREF dibdrv_GetPixel( PHYSDEV dev, INT x, INT y )
pt
.
x
=
x
;
pt
.
y
=
y
;
lp_to_dp
(
dc
,
&
pt
,
1
);
if
(
pt
.
x
<
0
||
pt
.
x
>=
pdev
->
dib
.
rect
.
right
-
pdev
->
dib
.
rect
.
left
||
pt
.
y
<
0
||
pt
.
y
>=
pdev
->
dib
.
rect
.
bottom
-
pdev
->
dib
.
rect
.
top
)
return
CLR_INVALID
;
rect
.
left
=
pt
.
x
;
rect
.
top
=
pt
.
y
;
rect
.
right
=
rect
.
left
+
1
;
rect
.
bottom
=
rect
.
top
+
1
;
if
(
!
clip_rect_to_dib
(
&
pdev
->
dib
,
&
rect
))
return
CLR_INVALID
;
pixel
=
pdev
->
dib
.
funcs
->
get_pixel
(
&
pdev
->
dib
,
pt
.
x
,
pt
.
y
);
return
pdev
->
dib
.
funcs
->
pixel_to_colorref
(
&
pdev
->
dib
,
pixel
);
...
...
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