#include <precomp.h>
#include <debug.h>
Go to the source code of this file.
|
static VOID FASTCALL | SortRects (PRECT pRect, INT nCount) |
|
BOOL FASTCALL | DeleteRegion (_In_ HRGN hrgn) |
|
INT FASTCALL | MirrorRgnByWidth (_In_ HRGN hrgn, _In_ INT Width, _Out_opt_ HRGN *phrgn) |
|
INT WINAPI | MirrorRgnDC (_In_ HDC hdc, _In_ HRGN hrgn, _Out_opt_ HRGN *phrn) |
|
FORCEINLINE ULONG | IntSetNullRgn (_Inout_ PRGN_ATTR prgnattr) |
|
FORCEINLINE ULONG | IntSetRectRgn (_Inout_ PRGN_ATTR prgnattr, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom) |
|
INT WINAPI | CombineRgn (_In_ HRGN hrgnDest, _In_ HRGN hrgnSrc1, _In_ HRGN hrgnSrc2, _In_ INT iCombineMode) |
|
HRGN WINAPI | CreateEllipticRgnIndirect (const RECT *prc) |
|
HRGN WINAPI | CreatePolygonRgn (const POINT *lppt, int cPoints, int fnPolyFillMode) |
|
HRGN WINAPI | CreatePolyPolygonRgn (const POINT *lppt, const INT *lpPolyCounts, int nCount, int fnPolyFillMode) |
|
HRGN WINAPI | CreateRectRgn (int x1, int y1, int x2, int y2) |
|
HRGN WINAPI | CreateRectRgnIndirect (const RECT *prc) |
|
INT WINAPI | ExcludeClipRect (_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom) |
|
HRGN WINAPI | ExtCreateRegion (CONST XFORM *lpXform, DWORD nCount, CONST RGNDATA *lpRgnData) |
|
INT WINAPI | ExtSelectClipRgn (_In_ HDC hdc, _In_ HRGN hrgn, _In_ INT iMode) |
|
int WINAPI | GetClipRgn (HDC hdc, HRGN hrgn) |
|
int WINAPI | GetMetaRgn (HDC hdc, HRGN hrgn) |
|
DWORD WINAPI | GetRegionData (HRGN hrgn, DWORD nCount, LPRGNDATA lpRgnData) |
|
INT WINAPI | GetRgnBox (HRGN hrgn, LPRECT prcOut) |
|
INT WINAPI | IntersectClipRect (_In_ HDC hdc, _In_ INT nLeft, _In_ INT nTop, _In_ INT nRight, _In_ INT nBottom) |
|
BOOL WINAPI | MirrorRgn (HWND hwnd, HRGN hrgn) |
|
INT WINAPI | OffsetClipRgn (HDC hdc, INT nXOffset, INT nYOffset) |
|
INT WINAPI | OffsetRgn (HRGN hrgn, int nXOffset, int nYOffset) |
|
BOOL WINAPI | PtInRegion (IN HRGN hrgn, int x, int y) |
|
BOOL WINAPI | RectInRegion (HRGN hrgn, LPCRECT prcl) |
|
int WINAPI | SelectClipRgn (_In_ HDC hdc, _In_ HRGN hrgn) |
|
BOOL WINAPI | SetRectRgn (_In_ HRGN hrgn, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom) |
|
int WINAPI | SetMetaRgn (HDC hDC) |
|
◆ INRECT
Value:
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLdouble GLdouble GLdouble r
Definition at line 14 of file region.c.
◆ MAX_COORD
◆ MIN_COORD
◆ NDEBUG
◆ CombineRgn()
Definition at line 195 of file region.c.
200{
205
206
209
210
211 if ((prngattrDest ==
NULL) || (prngattrSrc1 ==
NULL) ||
213 {
215 }
216
217
219 {
220
222 {
223
225 }
226
227
228
234 }
235
236
238
239
241 {
243 }
244
245
247 {
248
251 {
252
254 }
255
256
258 {
259
261 }
262
263
269 }
270
271
273 {
274
276 {
277
279 }
280
281
284 {
285
291 }
292
293
294
295
296
298 {
299
301 }
302
303
304
305
306
307
309 {
310
316 }
317
318
320 }
321
322
324 {
325
327 {
328
330 {
331
333 }
334
335
341 }
342
343
345 {
346
352 }
353
354
357 {
358
361 {
362
363 if (iCombineMode ==
RGN_OR)
364 {
365
371 }
372 else
373 {
374
376 }
377 }
378
379
382 {
383
385 }
386
387
388 if (iCombineMode ==
RGN_OR)
389 {
390
396 }
397
398
400 {
401
407 }
409 {
410
416 }
417
418
420 }
421
422
425 {
426
429 {
430
432 }
433
434
435 if (iCombineMode ==
RGN_OR)
436 {
437
443 }
444
445
447 {
448
454 }
456 {
457
463 }
464
465
467 }
468
469
470 if (iCombineMode ==
RGN_OR)
471 {
472
474 {
475
479 {
480
486 }
487 }
488 else
489 {
490
494 {
495
501 }
502 }
503 }
504
505
507 }
508
509 DPRINT1(
"Invalid iCombineMode %d\n", iCombineMode);
512}
#define ERROR_INVALID_PARAMETER
FORCEINLINE PRGN_ATTR GdiGetRgnAttr(HRGN hrgn)
__kernel_entry W32KAPI INT APIENTRY NtGdiCombineRgn(_In_ HRGN hrgnDst, _In_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ INT iMode)
FORCEINLINE ULONG IntSetRectRgn(_Inout_ PRGN_ATTR prgnattr, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
FORCEINLINE ULONG IntSetNullRgn(_Inout_ PRGN_ATTR prgnattr)
_In_ HANDLE _In_ HANDLE hrgnSrc2
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI SubtractRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
◆ CreateEllipticRgnIndirect()
Definition at line 520 of file region.c.
523{
524
526
527}
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateEllipticRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
◆ CreatePolygonRgn()
Definition at line 534 of file region.c.
535{
537}
#define UlongToHandle(ul)
__kernel_entry W32KAPI ULONG_PTR APIENTRY NtGdiPolyPolyDraw(_In_ HDC hdc, _In_ PPOINT ppt, _In_reads_(ccpt) PULONG pcpt, _In_ ULONG ccpt, _In_ INT iFunc)
◆ CreatePolyPolygonRgn()
◆ CreateRectRgn()
Definition at line 557 of file region.c.
558{
561 int tmp;
562
563
565 {
569 }
570
572 {
576 }
577
582 {
585 }
586
589 {
590 DPRINT1(
"PEB Handle Cache Test return hrgn %p, should be NULL!\n",
hrgn);
592 }
593
596
599
601 {
602 DPRINT1(
"No Attr for Region handle!!!\n");
605 }
606
608
610
612}
HGDIOBJ FASTCALL hGetPEBHandle(HANDLECACHETYPE, COLORREF)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateRectRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
BOOL FASTCALL DeleteRegion(_In_ HRGN hrgn)
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG x2
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG y1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG _In_ LONG _In_ LONG _In_ LONG y2
◆ CreateRectRgnIndirect()
Definition at line 619 of file region.c.
622{
623
625
626}
HRGN WINAPI CreateRectRgn(_In_ int, _In_ int, _In_ int, _In_ int)
◆ DeleteRegion()
Definition at line 64 of file region.c.
66{
68
69 if ( Rgn_Attr )
70 {
72
74 if (pgO)
75 {
78 }
79 }
81}
FORCEINLINE PVOID GdiAllocBatchCommand(HDC hdc, USHORT Cmd)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDeleteObjectApp(_In_ HANDLE hobj)
Referenced by CreateRectRgn().
◆ ExcludeClipRect()
Definition at line 633 of file region.c.
639{
641
643}
#define HANDLE_METADC(_RetType, _Func, dwError, hdc,...)
__kernel_entry W32KAPI INT APIENTRY NtGdiExcludeClipRect(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
INT WINAPI ExcludeClipRect(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
Referenced by ExcludeClipRect().
◆ ExtCreateRegion()
Definition at line 650 of file region.c.
655{
656 if (lpRgnData)
657 {
658 if ((!lpXform) && (lpRgnData->rdh.nCount == 1))
659 {
662 }
664 }
667}
__kernel_entry W32KAPI HRGN APIENTRY NtGdiExtCreateRegion(_In_opt_ LPXFORM px, _In_ DWORD cj, _In_reads_bytes_(cj) LPRGNDATA prgndata)
Referenced by MirrorRgnByWidth().
◆ ExtSelectClipRgn()
Definition at line 674 of file region.c.
678{
681
683
684#if 0
686 {
688 {
690 {
691 if ( NewRgn )
hrgn = NewRgn;
692 }
693 }
694 }
695#endif
696
698 {
701
702
704 if ( pdcattr )
705 {
707
708
710
713 {
715 {
717 if (pgO)
718 {
720
721 if (
hrgn && pRgn_Attr )
722 {
724
730
731
733 }
734 else
735 {
738 }
740 return Ret;
741 }
742 }
743 }
744 }
745 }
747
749
750 return Ret;
751}
DWORD WINAPI GetLayout(_In_ HDC hdc)
FORCEINLINE PDC_ATTR GdiGetDcAttr(HDC hdc)
#define GDI_HANDLE_GET_INDEX(h)
__kernel_entry W32KAPI INT APIENTRY NtGdiExtSelectClipRgn(_In_ HDC hdc, _In_opt_ HRGN hrgn, _In_ INT iMode)
#define GDI_ENTRY_VALIDATE_VIS
INT WINAPI ExtSelectClipRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ INT iMode)
INT WINAPI MirrorRgnDC(_In_ HDC hdc, _In_ HRGN hrgn, _Out_opt_ HRGN *phrn)
Referenced by ExtSelectClipRgn(), and SelectClipRgn().
◆ GetClipRgn()
Definition at line 758 of file region.c.
762{
764
765
767 {
768
770 return -1;
771 }
772
774
775
776
777
778
779 return Ret;
780}
__kernel_entry W32KAPI INT APIENTRY NtGdiGetRandomRgn(_In_ HDC hdc, _In_ HRGN hrgn, _In_ INT iRgn)
◆ GetMetaRgn()
◆ GetRegionData()
Definition at line 799 of file region.c.
802{
803 if (!lpRgnData)
804 {
805 nCount = 0;
806 }
807
808 return NtGdiGetRegionData(
hrgn,nCount,lpRgnData);
809}
◆ GetRgnBox()
Definition at line 817 of file region.c.
819{
821
824
826 {
831 }
832 else
833 {
836
838 }
840}
#define RtlCopyMemory(Destination, Source, Length)
INT APIENTRY NtGdiGetRgnBox(HRGN hRgn, PRECTL pRect)
◆ IntersectClipRect()
Definition at line 847 of file region.c.
853{
856}
__kernel_entry W32KAPI INT APIENTRY NtGdiIntersectClipRect(_In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
INT WINAPI IntersectClipRect(_In_ HDC hdc, _In_ INT nLeft, _In_ INT nTop, _In_ INT nRight, _In_ INT nBottom)
Referenced by IntersectClipRect().
◆ IntSetNullRgn()
◆ IntSetRectRgn()
Definition at line 168 of file region.c.
174{
177
178 if ((xLeft == xRight) || (yTop == yBottom))
180
182 prgnattr->Rect.left = xLeft;
183 prgnattr->Rect.top = yTop;
184 prgnattr->Rect.right = xRight;
185 prgnattr->Rect.bottom = yBottom;
188}
Referenced by CombineRgn(), and CreateRectRgn().
◆ MirrorRgn()
Definition at line 863 of file region.c.
864{
871}
INT FASTCALL MirrorRgnByWidth(_In_ HRGN hrgn, _In_ INT Width, _Out_opt_ HRGN *phrgn)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
Referenced by GetWindowRgn().
◆ MirrorRgnByWidth()
Definition at line 85 of file region.c.
89{
90 INT cRgnDSize, Ret = 0;
92
93 cRgnDSize = NtGdiGetRegionData(
hrgn, 0,
NULL);
94
95 if (cRgnDSize)
96 {
98 if (pRgnData)
99 {
101 {
102 HRGN hRgnex;
108 {
111 {
112 SaveL = pRect[
i].
left;
115 }
116 }
119 if (hRgnex)
120 {
121 if (phrgn)
122 {
123 *phrgn = hRgnex;
124 }
125 else
126 {
129 }
130 Ret = 1;
131 }
132 }
134 }
135 }
136 return Ret;
137}
#define HeapFree(x, y, z)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
HRGN WINAPI ExtCreateRegion(CONST XFORM *lpXform, DWORD nCount, CONST RGNDATA *lpRgnData)
static VOID FASTCALL SortRects(PRECT pRect, INT nCount)
int WINAPI CombineRgn(_In_opt_ HRGN hrgnDest, _In_opt_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ int fnCombineMode)
DWORD WINAPI GetRegionData(_In_ HRGN hrgn, _In_ DWORD nCount, _Out_writes_bytes_to_opt_(nCount, return) LPRGNDATA lpRgnData)
Referenced by MirrorRgn(), and MirrorRgnDC().
◆ MirrorRgnDC()
Definition at line 141 of file region.c.
145{
148 return 0;
149
151}
BOOL WINAPI GdiValidateHandle(HGDIOBJ)
#define GDI_OBJECT_TYPE_DC
#define GDI_HANDLE_GET_TYPE(h)
__kernel_entry W32KAPI LONG APIENTRY NtGdiGetDeviceWidth(_In_ HDC hdc)
Referenced by ExtSelectClipRgn().
◆ OffsetClipRgn()
Definition at line 878 of file region.c.
882{
885}
__kernel_entry W32KAPI INT APIENTRY NtGdiOffsetClipRgn(_In_ HDC hdc, _In_ INT x, _In_ INT y)
INT WINAPI OffsetClipRgn(HDC hdc, INT nXOffset, INT nYOffset)
Referenced by OffsetClipRgn().
◆ OffsetRgn()
Definition at line 893 of file region.c.
896{
899
902
905
908
909 rc = pRgn_Attr->
Rect;
910
912 {
914 {
917 rc.
right += nXOffset;
919
920
925 {
926 DPRINT(
"OffsetRgn ERROR\n");
928 }
929
930 pRgn_Attr->
Rect = rc;
932 }
933 }
935}
__kernel_entry W32KAPI INT APIENTRY NtGdiOffsetRgn(_In_ HRGN hrgn, _In_ INT cx, _In_ INT cy)
◆ PtInRegion()
Definition at line 942 of file region.c.
945{
947
950
953
956
958}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPtInRegion(_In_ HRGN hrgn, _In_ INT x, _In_ INT y)
◆ RectInRegion()
Definition at line 965 of file region.c.
967{
970
973
976
979
980
981
983 {
986 }
987 else
988 {
991 }
993 {
996 }
997 else
998 {
1001 }
1002
1007 {
1009 }
1010
1012}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiRectInRegion(_In_ HRGN hrgn, _Inout_ LPRECT prcl)
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
◆ SelectClipRgn()
◆ SetMetaRgn()
Definition at line 1087 of file region.c.
1088{
1090 {
1093 {
1095 {
1097 }
1098 }
1099 else
1100 {
1103 }
1104 }
1106}
#define ERROR_INVALID_HANDLE
BOOL EMFDC_SetMetaRgn(LDC *dc_attr)
PLDC FASTCALL GdiGetLDC(HDC hDC)
@ GDILoObjType_LO_METADC16_TYPE
@ GDILoObjType_LO_DC_TYPE
__kernel_entry W32KAPI INT APIENTRY NtGdiSetMetaRgn(_In_ HDC hdc)
◆ SetRectRgn()
Definition at line 1031 of file region.c.
1037{
1039
1040
1042 if (prngattr ==
NULL)
1043 {
1045 }
1046
1047
1048 if ((xLeft == xRight) || (yTop == yBottom))
1049 {
1052 }
1053
1054 if (xLeft > xRight)
1055 {
1058 }
1059 else
1060 {
1063 }
1064
1065 if (yTop > yBottom)
1066 {
1069 }
1070 else
1071 {
1074 }
1075
1078
1080}
__kernel_entry W32KAPI BOOL APIENTRY NtGdiSetRectRgn(_In_ HRGN hrgn, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
◆ SortRects()
Definition at line 23 of file region.c.
24{
27
28 if (nCount > 0)
29 {
32 do
33 {
36 {
39 do
40 {
41 if ( pRect[
a].
top != pRect[
b].
top )
break;
43 {
47 }
50 }
52 }
54 }
56 }
57}
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
Referenced by MirrorRgnByWidth().