Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
b3ab012a
Commit
b3ab012a
authored
13 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
gdi32: Don't clip to the visible rectangle for screen DCs.
parent
fdef173c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/gdi32/clipping.c
+13
-15
13 additions, 15 deletions
dlls/gdi32/clipping.c
with
13 additions
and
15 deletions
dlls/gdi32/clipping.c
+
13
−
15
View file @
b3ab012a
...
...
@@ -32,11 +32,12 @@ WINE_DEFAULT_DEBUG_CHANNEL(clipping);
/* return the DC visible rectangle if not empty */
static
inline
BOOL
get_dc_visrect
(
DC
*
dc
,
RECT
*
rect
)
{
if
(
dc
->
header
.
type
!=
OBJ_MEMDC
)
return
FALSE
;
rect
->
left
=
0
;
rect
->
top
=
0
;
rect
->
right
=
dc
->
vis_rect
.
right
-
dc
->
vis_rect
.
left
;
rect
->
bottom
=
dc
->
vis_rect
.
bottom
-
dc
->
vis_rect
.
top
;
return
!
is_rect_empty
(
rect
)
;
return
TRUE
;
}
/***********************************************************************
...
...
@@ -114,19 +115,16 @@ void update_dc_clipping( DC * dc )
*/
static
inline
void
create_default_clip_region
(
DC
*
dc
)
{
UINT
width
,
heigh
t
;
RECT
rec
t
;
if
(
dc
->
header
.
type
==
OBJ_MEMDC
)
{
width
=
dc
->
vis_rect
.
right
-
dc
->
vis_rect
.
left
;
height
=
dc
->
vis_rect
.
bottom
-
dc
->
vis_rect
.
top
;
}
else
if
(
!
get_dc_visrect
(
dc
,
&
rect
))
{
width
=
GetDeviceCaps
(
dc
->
hSelf
,
DESKTOPHORZRES
);
height
=
GetDeviceCaps
(
dc
->
hSelf
,
DESKTOPVERTRES
);
rect
.
left
=
0
;
rect
.
top
=
0
;
rect
.
right
=
GetDeviceCaps
(
dc
->
hSelf
,
DESKTOPHORZRES
);
rect
.
bottom
=
GetDeviceCaps
(
dc
->
hSelf
,
DESKTOPVERTRES
);
}
dc
->
hClipRgn
=
CreateRectRgn
(
0
,
0
,
width
,
heigh
t
);
dc
->
hClipRgn
=
CreateRectRgn
Indirect
(
&
rec
t
);
}
...
...
@@ -363,9 +361,9 @@ BOOL WINAPI PtVisible( HDC hdc, INT x, INT y )
pt
.
y
=
y
;
LPtoDP
(
hdc
,
&
pt
,
1
);
update_dc
(
dc
);
ret
=
(
get_dc_visrect
(
dc
,
&
visrect
)
&&
pt
.
x
>=
visrect
.
left
&&
pt
.
x
<
visrect
.
right
&&
pt
.
y
>=
visrect
.
top
&&
pt
.
y
<
visrect
.
bottom
);
ret
=
(
!
get_dc_visrect
(
dc
,
&
visrect
)
||
(
pt
.
x
>=
visrect
.
left
&&
pt
.
x
<
visrect
.
right
&&
pt
.
y
>=
visrect
.
top
&&
pt
.
y
<
visrect
.
bottom
)
)
;
if
(
ret
&&
get_dc_region
(
dc
))
ret
=
PtInRegion
(
get_dc_region
(
dc
),
pt
.
x
,
pt
.
y
);
release_dc_ptr
(
dc
);
return
ret
;
...
...
@@ -387,7 +385,7 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
LPtoDP
(
hdc
,
(
POINT
*
)
&
tmpRect
,
2
);
update_dc
(
dc
);
ret
=
(
get_dc_visrect
(
dc
,
&
visrect
)
&&
intersect_rect
(
&
visrect
,
&
visrect
,
&
tmpRect
));
ret
=
(
!
get_dc_visrect
(
dc
,
&
visrect
)
||
intersect_rect
(
&
visrect
,
&
visrect
,
&
tmpRect
));
if
(
ret
&&
get_dc_region
(
dc
))
ret
=
RectInRegion
(
get_dc_region
(
dc
),
&
tmpRect
);
release_dc_ptr
(
dc
);
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment