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
2ff31091
Commit
2ff31091
authored
Jul 11, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Export a function to compute the DC clip box.
parent
662d3322
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
clipping.c
dlls/gdi32/clipping.c
+22
-9
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
No files found.
dlls/gdi32/clipping.c
View file @
2ff31091
...
...
@@ -53,6 +53,27 @@ static inline RECT get_clip_rect( DC * dc, int left, int top, int right, int bot
}
/***********************************************************************
* get_clip_box
*
* Get the clipping rectangle in device coordinates.
*/
int
get_clip_box
(
DC
*
dc
,
RECT
*
rect
)
{
int
ret
=
ERROR
;
HRGN
rgn
,
clip
=
get_clip_region
(
dc
);
if
(
!
clip
)
return
GetRgnBox
(
dc
->
hVisRgn
,
rect
);
if
((
rgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
)))
{
CombineRgn
(
rgn
,
dc
->
hVisRgn
,
clip
,
RGN_AND
);
ret
=
GetRgnBox
(
rgn
,
rect
);
DeleteObject
(
rgn
);
}
return
ret
;
}
/***********************************************************************
* CLIPPING_UpdateGCRegion
*
* Update the GC clip region when the ClipRgn or VisRgn have changed.
...
...
@@ -379,19 +400,11 @@ BOOL WINAPI RectVisible( HDC hdc, const RECT* rect )
INT
WINAPI
GetClipBox
(
HDC
hdc
,
LPRECT
rect
)
{
INT
ret
;
HRGN
clip
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
ERROR
;
update_dc
(
dc
);
if
((
clip
=
get_clip_region
(
dc
)))
{
HRGN
hrgn
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
CombineRgn
(
hrgn
,
dc
->
hVisRgn
,
clip
,
RGN_AND
);
ret
=
GetRgnBox
(
hrgn
,
rect
);
DeleteObject
(
hrgn
);
}
else
ret
=
GetRgnBox
(
dc
->
hVisRgn
,
rect
);
ret
=
get_clip_box
(
dc
,
rect
);
if
(
dc
->
layout
&
LAYOUT_RTL
)
{
int
tmp
=
rect
->
left
;
...
...
dlls/gdi32/gdi_private.h
View file @
2ff31091
...
...
@@ -439,6 +439,7 @@ extern BOOL BITMAP_SetOwnerDC( HBITMAP hbitmap, PHYSDEV physdev ) DECLSPEC_HIDDE
extern
INT
BITMAP_GetWidthBytes
(
INT
bmWidth
,
INT
bpp
)
DECLSPEC_HIDDEN
;
/* clipping.c */
extern
int
get_clip_box
(
DC
*
dc
,
RECT
*
rect
)
DECLSPEC_HIDDEN
;
extern
void
CLIPPING_UpdateGCRegion
(
DC
*
dc
)
DECLSPEC_HIDDEN
;
/* Return the total clip region (if any) */
...
...
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