0b00d4e8b21e585e2ad139c85311fc0b574ce36b
3 #undef WIN32_LEAN_AND_MEAN
7 #include <win32k/region.h>
8 #include <win32k/cliprgn.h>
9 #include <win32k/coord.h>
12 #include <win32k/debug1.h>
15 CLIPPING_UpdateGCRegion(DC
* Dc
)
17 if (Dc
->w
.hGCClipRgn
== NULL
)
19 Dc
->w
.hGCClipRgn
= W32kCreateRectRgn(0, 0, 0, 0);
22 if (Dc
->w
.hClipRgn
== NULL
)
24 W32kCombineRgn(Dc
->w
.hGCClipRgn
, Dc
->w
.hVisRgn
, 0, RGN_COPY
);
28 W32kCombineRgn(Dc
->w
.hGCClipRgn
, Dc
->w
.hClipRgn
, Dc
->w
.hVisRgn
,
33 HRGN WINAPI
SaveVisRgn(HDC hdc
)
36 PROSRGNDATA obj
, copyObj
;
37 PDC dc
= DC_HandleToPtr(hdc
);
41 obj
= RGNDATA_LockRgn(dc
->w
.hVisRgn
);
43 if(!(copy
= W32kCreateRectRgn(0, 0, 0, 0)))
45 RGNDATA_UnlockRgn(dc
->w
.hVisRgn
);
49 W32kCombineRgn(copy
, dc
->w
.hVisRgn
, 0, RGN_COPY
);
50 copyObj
= RGNDATA_LockRgn(copy
);
51 /* copyObj->header.hNext = obj->header.hNext;
52 header.hNext = copy; */
58 W32kSelectVisRgn(HDC hdc
, HRGN hrgn
)
65 if (!(dc
= DC_HandleToPtr(hdc
)))
68 dc
->w
.flags
&= ~DC_DIRTY
;
70 retval
= W32kCombineRgn(dc
->w
.hVisRgn
, hrgn
, 0, RGN_COPY
);
71 CLIPPING_UpdateGCRegion(dc
);
77 int STDCALL
W32kExcludeClipRect(HDC hDC
,
86 int STDCALL
W32kExtSelectClipRgn(HDC hDC
,
93 int STDCALL
W32kGetClipBox(HDC hDC
,
99 if (!(dc
= DC_HandleToPtr(hDC
)))
101 retval
= UnsafeW32kGetRgnBox(dc
->w
.hGCClipRgn
, rc
);
102 rc
->left
-= dc
->w
.DCOrgX
;
103 rc
->right
-= dc
->w
.DCOrgX
;
104 rc
->top
-= dc
->w
.DCOrgY
;
105 rc
->bottom
-= dc
->w
.DCOrgY
;
107 DC_ReleasePtr( hDC
);
108 W32kDPtoLP(hDC
, (LPPOINT
)rc
, 2);
112 int STDCALL
W32kGetMetaRgn(HDC hDC
,
118 int STDCALL
W32kIntersectClipRect(HDC hDC
,
127 int STDCALL
W32kOffsetClipRgn(HDC hDC
,
134 BOOL STDCALL
W32kPtVisible(HDC hDC
,
141 BOOL STDCALL
W32kRectVisible(HDC hDC
,
147 BOOL STDCALL
W32kSelectClipPath(HDC hDC
,
153 int STDCALL
W32kSelectClipRgn(HDC hDC
,
159 int STDCALL
W32kSetMetaRgn(HDC hDC
)