135#define COPY_RECTS(dest, src, nRects) \
137 PRECTL xDest = (dest); \
138 PRECTL xSrc = (src); \
139 UINT xRects = (nRects); \
140 while (xRects-- > 0) { \
141 *(xDest++) = *(xSrc++); \
145#define COPY_RECTS(dest, src, nRects) RtlCopyMemory(dest, src, (nRects) * sizeof(RECTL))
148#define EMPTY_REGION(pReg) { \
149 (pReg)->rdh.nCount = 0; \
150 (pReg)->rdh.rcBound.left = (pReg)->rdh.rcBound.top = 0; \
151 (pReg)->rdh.rcBound.right = (pReg)->rdh.rcBound.bottom = 0; \
152 (pReg)->rdh.iType = RDH_RECTANGLES; \
155#define REGION_NOT_EMPTY(pReg) pReg->rdh.nCount
157#define INRECT(r, x, y) \
158 ( ( ((r).right > x)) && \
159 ( ((r).left <= x)) && \
160 ( ((r).bottom > y)) && \
166#define EXTENTCHECK(r1, r2) \
167 ((r1)->right > (r2)->left && \
168 (r1)->left < (r2)->right && \
169 (r1)->bottom > (r2)->top && \
170 (r1)->top < (r2)->bottom)
191#define BRESINITPGON(dy, x1, x2, xStart, d, m, m1, incr1, incr2) { \
200 dx = (x2) - xStart; \
204 incr1 = -2 * dx + 2 * (dy) * m1; \
205 incr2 = -2 * dx + 2 * (dy) * m; \
206 d = 2 * m * (dy) - 2 * dx - 2 * (dy); \
210 incr1 = 2 * dx - 2 * (dy) * m1; \
211 incr2 = 2 * dx - 2 * (dy) * m; \
212 d = -2 * m * (dy) + 2 * dx; \
217#define BRESINCRPGON(d, minval, m, m1, incr1, incr2) { \
254#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres) \
255 BRESINITPGON(dmaj, min1, min2, bres.minor_axis, bres.d, \
256 bres.m, bres.m1, bres.incr1, bres.incr2)
258#define BRESINCRPGONSTRUCT(bres) \
259 BRESINCRPGON(bres.d, bres.minor_axis, bres.m, bres.m1, bres.incr1, bres.incr2)
311#define COUNTERCLOCKWISE -1
342#define SLLSPERBLOCK 25
362#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET) { \
363 if (pAET->ymax == y) { \
364 pPrevAET->next = pAET->next; \
365 pAET = pPrevAET->next; \
368 pAET->back = pPrevAET; \
371 BRESINCRPGONSTRUCT(pAET->bres); \
384#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y) { \
385 if (pAET->ymax == y) { \
386 pPrevAET->next = pAET->next; \
387 pAET = pPrevAET->next; \
389 pAET->back = pPrevAET; \
392 BRESINCRPGONSTRUCT(pAET->bres); \
404#define LARGE_COORDINATE INT_MAX
405#define SMALL_COORDINATE INT_MIN
424 cjNewSize = cRects *
sizeof(
RECTL);
429 if (2 * prgn->rdh.nRgnSize > cjNewSize)
431 cjNewSize = 2 * prgn->rdh.nRgnSize;
436 if (pvBuffer ==
NULL)
442 COPY_RECTS(pvBuffer, prgn->Buffer, prgn->rdh.nCount);
445 if (prgn->Buffer != &prgn->rdh.rcBound)
451 prgn->Buffer = pvBuffer;
452 prgn->rdh.nRgnSize = cjNewSize;
464 if (cRects > prgn->rdh.nRgnSize /
sizeof(
RECTL))
483 NT_ASSERT((prgn->rdh.nCount + 1) *
sizeof(
RECT) <= prgn->rdh.nRgnSize);
485 prcl = &prgn->Buffer[prgn->rdh.nCount];
515#define NUMPTSTOBUFFER 200
517#define RGN_DEFAULT_RECTS 2
532IntDumpRegion(HRGN
hRgn)
539 DbgPrint(
"IntDumpRegion called with invalid region!\n");
543 DbgPrint(
"IntDumpRegion(%x): %d,%d-%d,%d %d\n",
545 Data->rdh.rcBound.left,
546 Data->rdh.rcBound.top,
547 Data->rdh.rcBound.right,
548 Data->rdh.rcBound.bottom,
585 if (
dst->rdh.nRgnSize <
src->rdh.nCount *
sizeof(
RECT))
591 src->rdh.nCount *
sizeof(
RECT),
597 if ((
dst->Buffer !=
NULL) && (
dst->Buffer != &
dst->rdh.rcBound))
602 dst->rdh.nRgnSize =
src->rdh.nCount *
sizeof(
RECT);
605 dst->rdh.nCount =
src->rdh.nCount;
606 dst->rdh.rcBound.left =
src->rdh.rcBound.left;
607 dst->rdh.rcBound.top =
src->rdh.rcBound.top;
608 dst->rdh.rcBound.right =
src->rdh.rcBound.right;
609 dst->rdh.rcBound.bottom =
src->rdh.rcBound.bottom;
610 dst->rdh.iType =
src->rdh.iType;
623 RECTL *pRect, *pRectEnd, *pExtents;
646 pExtents->
top = pRect->
top;
650 while (pRect <= pRectEnd)
674 ULONG i,
j, clipa, clipb, nRgnSize;
688 for (clipa = 0; clipa < rgnSrc->
rdh.
nCount; clipa++)
698 for (clipb = clipa; clipb < rgnSrc->
rdh.
nCount; clipb++)
705 if (clipb == clipa)
goto empty;
712 nRgnSize = (clipb - clipa) *
sizeof(
RECT);
713 if ((rgnDst != rgnSrc) && (rgnDst->
rdh.
nRgnSize < nRgnSize))
731 for (
i = clipa,
j = 0;
i < clipb ;
i++)
824 pPrevRect = pReg->
Buffer + prevStart;
825 prevNumRects = curStart - prevStart;
830 pCurRect = pReg->
Buffer + curStart;
831 bandtop = pCurRect->
top;
832 for (curNumRects = 0;
833 (pCurRect != pRegEnd) && (pCurRect->
top == bandtop);
839 if (pCurRect != pRegEnd)
846 while ((pRegEnd-1)->top == pRegEnd->
top)
851 curStart = pRegEnd - pReg->
Buffer;
855 if ((curNumRects == prevNumRects) && (curNumRects != 0))
857 pCurRect -= curNumRects;
869 if ((pPrevRect->
left != pCurRect->
left) ||
880 while (prevNumRects != 0);
883 pCurRect -= curNumRects;
884 pPrevRect -= curNumRects;
896 while (curNumRects != 0);
906 if (pCurRect == pRegEnd)
908 curStart = prevStart;
914 *pPrevRect++ = *pCurRect++;
916 while (pCurRect != pRegEnd);
985 oldRects = newReg->
Buffer;
1038 while ((r1BandEnd != r1End) && (r1BandEnd->
top ==
r1->top))
1044 while ((r2BandEnd != r2End) && (r2BandEnd->
top ==
r2->top))
1055 if (
r1->top <
r2->top)
1058 bot =
min(
r1->bottom,
r2->top);
1060 if ((
top != bot) && (nonOverlap1Func !=
NULL))
1062 if (!(*nonOverlap1Func)(newReg,
r1, r1BandEnd,
top, bot))
return FALSE;
1067 else if (
r2->top <
r1->top)
1070 bot =
min(
r2->bottom,
r1->top);
1072 if ((
top != bot) && (nonOverlap2Func !=
NULL))
1074 if (!(*nonOverlap2Func)(newReg,
r2, r2BandEnd,
top, bot) )
return FALSE;
1095 ybot =
min(
r1->bottom,
r2->bottom);
1099 if (!(*overlapFunc)(newReg,
r1, r1BandEnd,
r2, r2BandEnd, ytop, ybot))
return FALSE;
1109 if (
r1->bottom == ybot)
1113 if (
r2->bottom == ybot)
1118 while ((
r1 != r1End) && (
r2 != r2End));
1124 if (nonOverlap1Func !=
NULL)
1129 while ((r1BandEnd < r1End) && (r1BandEnd->
top ==
r1->top))
1134 if (!(*nonOverlap1Func)(newReg,
1142 while (
r1 != r1End);
1145 else if ((
r2 != r2End) && (nonOverlap2Func !=
NULL))
1150 while ((r2BandEnd < r2End) && (r2BandEnd->
top ==
r2->top))
1155 if (!(*nonOverlap2Func)(newReg,
1163 while (
r2 != r2End);
1189 newReg->
Buffer = prev_rects;
1250 while ((
r1 != r1End) && (
r2 != r2End))
1271 if (
r1->right <
r2->right)
1275 else if (
r2->right <
r1->right)
1381 if ((prgn->rdh.nCount != 0) &&
1382 (prgn->Buffer[prgn->rdh.nCount - 1].top ==
top) &&
1383 (prgn->Buffer[prgn->rdh.nCount - 1].bottom ==
bottom) &&
1384 (prgn->Buffer[prgn->rdh.nCount - 1].right >=
left))
1386 if (prgn->Buffer[prgn->rdh.nCount - 1].right <
right)
1388 prgn->Buffer[prgn->rdh.nCount - 1].right =
right;
1426 while ((
r1 != r1End) && (
r2 != r2End))
1428 if (
r1->left <
r2->left)
1447 while (
r1 != r1End);
1476 if ((reg1 == reg2) || (reg1->
rdh.
nCount == 0) ||
1616 while ((
r1 != r1End) && (
r2 != r2End))
1623 else if (
r2->left <=
left)
1642 else if (
r2->left <
r1->right)
1700 while (
r1 != r1End);
1846 if ( !newReg || !reg1 || !reg2 )
return FALSE;
1874 prgn->rdh.nCount = 1;
1921 prgn->rdh.nCount =
i;
1923 prgn->rdh.nRgnSize = prgn->rdh.nCount *
sizeof(
RECT);
1924 NT_ASSERT(prgn->Buffer == &prgn->rdh.rcBound);
1928 if (prgn->Buffer ==
NULL)
1930 prgn->rdh.nRgnSize = 0;
1935 COPY_RECTS(prgn->Buffer, arcl, prgn->rdh.nCount);
1966 if ((
cx == 0) && (
cy == 0))
1979 if ((prgnSrc->rdh.rcBound.left < (
MIN_COORD +
cx)) ||
1981 (prgnSrc->rdh.rcBound.right > (
MAX_COORD -
cx)) ||
2038 if (prgnFrame ==
NULL)
2046 if (prgnSrc ==
NULL)
2081 if (prgn->rdh.nCount < 1)
2109 prgn->rdh.nCount * 2,
2121 for (
i = 0;
i < prgn->rdh.nCount;
i++)
2131 DPRINT1(
"NULL Set in Union Rects\n");
2137 for (
i = 0;
i < prgn->rdh.nCount - 1;
i++)
2139 NT_ASSERT(prgn->Buffer[
i].top <= prgn->Buffer[
i].bottom);
2140 NT_ASSERT(prgn->Buffer[
i + 1].top >= prgn->Buffer[
i].top);
2157 pcPoints = (
PULONG)&ppt[4 * prgn->rdh.nCount];
2158 for (
i = 0;
i < prgn->rdh.nCount;
i++)
2162 ppt[4 *
i + 0].
x = prgn->Buffer[
i].left;
2163 ppt[4 *
i + 0].
y = prgn->Buffer[
i].top;
2164 ppt[4 *
i + 1].
x = prgn->Buffer[
i].right;
2165 ppt[4 *
i + 1].
y = prgn->Buffer[
i].top;
2166 ppt[4 *
i + 2].
x = prgn->Buffer[
i].right;
2167 ppt[4 *
i + 2].
y = prgn->Buffer[
i].bottom;
2168 ppt[4 *
i + 3].
x = prgn->Buffer[
i].left;
2169 ppt[4 *
i + 3].
y = prgn->Buffer[
i].bottom;
2178 prgn->rdh.nCount * 2,
2215 DPRINT1(
"Could not allocate a palette.\n");
2221 if ((nReg == 0) || (nReg == 1))
2230 nReg *
sizeof(
RECT),
2234 DPRINT1(
"Could not allocate region buffer\n");
2254 DPRINT1(
"Could not insert palette into handle table.\n");
2276 if (prgnattr ==
NULL)
2278 DPRINT1(
"Could not allocate RGN attr\n");
2325 NT_ASSERT((prgn->prgnattr == &prgn->rgnattr) ||
2329 prgnattr = prgn->prgnattr;
2350 DPRINT1(
"Region attribute is corrupted, ignoring\n");
2385 prgnattr = prgn->prgnattr;
2386 if (prgnattr != &prgn->rgnattr)
2390 prgnattr->
Rect.
left = prgn->rdh.rcBound.left;
2391 prgnattr->
Rect.
top = prgn->rdh.rcBound.top;
2392 prgnattr->
Rect.
right = prgn->rdh.rcBound.right;
2393 prgnattr->
Rect.
bottom = prgn->rdh.rcBound.bottom;
2475 if (prgnattr != &prgn->
rgnattr)
2498 if (prgnDest ==
NULL)
2500 DPRINT(
"IntGdiCombineRgn: hDest unavailable\n");
2504 if (prgnSrc1 ==
NULL)
2506 DPRINT(
"IntGdiCombineRgn: hSrc1 unavailable\n");
2518 if (prgnSrc2 ==
NULL)
2520 DPRINT1(
"IntGdiCombineRgn requires hSrc2 != NULL for combine mode %d!\n", iCombineMode);
2525 switch (iCombineMode)
2612 PRECTL pCurRect, pRectEnd;
2642 for (pCurRect = Rgn->
Buffer, pRectEnd = pCurRect +
2643 Rgn->
rdh.
nCount; pCurRect < pRectEnd; pCurRect++)
2677 if (LeftRect > RightRect)
2680 LeftRect = RightRect;
2684 if (TopRect > BottomRect)
2687 TopRect = BottomRect;
2691 if ((LeftRect != RightRect) && (TopRect != BottomRect))
2721 if ((
cx == 0) && (
cy == 0))
2727 if (prgn->rdh.nCount == 0)
2776 prcl = prgn->Buffer;
2777 for (
i = 0;
i < prgn->rdh.nCount;
i++)
2786 if (prgn->Buffer != &prgn->rdh.rcBound)
2788 prgn->rdh.rcBound.left +=
cx;
2789 prgn->rdh.rcBound.right +=
cx;
2790 prgn->rdh.rcBound.top +=
cy;
2791 prgn->rdh.rcBound.bottom +=
cy;
2821 pPrevSLL = &
ET->scanlines;
2822 pSLL = pPrevSLL->
next;
2823 while (pSLL && (pSLL->
scanline < scanline))
2830 if ((!pSLL) || (pSLL->
scanline > scanline))
2837 if (tmpSLLBlock ==
NULL)
2839 DPRINT1(
"REGION_InsertEdgeInETL(): Can't alloc SLLB\n");
2844 (*SLLBlock)->next = tmpSLLBlock;
2846 *SLLBlock = tmpSLLBlock;
2850 pSLL = &((*SLLBlock)->SLLs[(*iSLLBlock)++]);
2854 pPrevSLL->
next = pSLL;
2909 ETEs->
back = pPrevAET;
2910 pPrevAET->
next = ETEs;
2944 register INT inside = 1;
2945 register INT isInside = 0;
2957 if ((!inside && !isInside) ||
2958 ( inside && isInside))
2995 pETEchase = pETEchase->
back;
2998 if (pETEchase != pETEinsert)
3000 pETEchaseBackTMP = pETEchase->
back;
3001 pETEinsert->
back->next = AET;
3005 pETEinsert->
next = pETEchase;
3006 pETEchase->
back->next = pETEinsert;
3007 pETEchase->
back = pETEinsert;
3008 pETEinsert->
back = pETEchaseBackTMP;
3031 tmpSLLBlock = pSLLBlock->
next;
3033 pSLLBlock = tmpSLLBlock;
3046 INT numFullPtBlocks,
3058 extents = &
reg->rdh.rcBound;
3060 numRects = ((numFullPtBlocks *
NUMPTSTOBUFFER) + iCurPtBlock) >> 1;
3077 if (
reg->Buffer != &
reg->rdh.rcBound)
3082 reg->rdh.nCount = numRects;
3083 CurPtBlock = FirstPtBlock;
3084 rects =
reg->Buffer - 1;
3088 for ( ; numFullPtBlocks >= 0; numFullPtBlocks--)
3092 if (numFullPtBlocks == 0)
3093 i = iCurPtBlock >> 1;
3100 if ((numRects &&
pts->
x == rects->
left) &&
3103 ((numRects == 1) || (rects[-1].
top != rects->
top)) &&
3123 CurPtBlock = CurPtBlock->
next;
3128 extents->
top =
reg->Buffer->top;
3139 reg->rdh.nCount = numRects;
3181 const POINT *PrevPt, *CurrPt, *EndPt;
3199 for (poly = 0; poly < nbpolygons; poly++)
3216 if (PrevPt->
y > CurrPt->
y)
3243 if (PrevPt->
y >
ET->ymax)
3244 ET->ymax = PrevPt->
y;
3245 if (PrevPt->
y <
ET->ymin)
3246 ET->ymin = PrevPt->
y;
3278 UINT numFullPtBlocks = 0;
3290 if (((cPolygons == 1) && ((pcPoints[0] == 4) ||
3291 ((pcPoints[0] == 5) && (ppt[4].
x == ppt[0].
x) && (ppt[4].
y == ppt[0].
y)))) &&
3292 (((ppt[0].
y == ppt[1].
y) &&
3293 (ppt[1].
x == ppt[2].
x) &&
3294 (ppt[2].
y == ppt[3].
y) &&
3295 (ppt[3].
x == ppt[0].
x)) ||
3296 ((ppt[0].
x == ppt[1].
x) &&
3297 (ppt[1].
y == ppt[2].
y) &&
3298 (ppt[2].
x == ppt[3].
x) &&
3299 (ppt[3].
y == ppt[0].
y))))
3302 min(ppt[0].
x, ppt[2].
x),
3303 min(ppt[0].
y, ppt[2].
y),
3304 max(ppt[0].
x, ppt[2].
x),
3305 max(ppt[0].
y, ppt[2].
y));
3309 for (poly =
total = 0; poly < cPolygons; poly++)
3310 total += pcPoints[poly];
3317 DPRINT1(
"Failed to allocate %lu edge entries\n",
total);
3323 pSLL =
ET.scanlines.next;
3324 curPtBlock = &FirstPtBlock;
3329 for (
y =
ET.ymin;
y <
ET.ymax;
y++)
3353 if (tmpPtBlock ==
NULL)
3355 DPRINT1(
"Can't alloc tmpPtBlock\n");
3359 curPtBlock->
next = tmpPtBlock;
3360 curPtBlock = tmpPtBlock;
3375 for (
y =
ET.ymin;
y <
ET.ymax;
y++)
3408 if (tmpPtBlock ==
NULL)
3413 curPtBlock->
next = tmpPtBlock;
3414 curPtBlock = tmpPtBlock;
3442 for (curPtBlock = FirstPtBlock.
next; numFullPtBlocks-- > 0;)
3444 tmpPtBlock = curPtBlock->
next;
3446 curPtBlock = tmpPtBlock;
3531 if ((hrgnDst ==
NULL) ||
3535 DPRINT1(
"NtGdiCombineRgn invalid parameters: %p, %p, %p, %d\n",
3547 DPRINT1(
"NtGdiCombineRgn failed to lock regions: %p, %p, %p, %d\n",
3554 if (aprgn[1] != aprgn[0])
3556 if ((aprgn[2] !=
NULL) && (aprgn[2] != aprgn[0]) && (aprgn[2] != aprgn[1]))
3565 if (aprgn[2] !=
NULL)
3655 if ((ellipse_width < 2) || (ellipse_height < 2))
3665 obj->rdh.rcBound.top =
top;
3668 rects =
obj->Buffer;
3672 a = ellipse_width - 1;
3673 b = ellipse_height - 1;
3681 y = ellipse_height / 2;
3686 while (
x <= ellipse_width / 2)
3702 for (
i = 0;
i < ellipse_height / 2;
i++)
3709 for (;
i < ellipse_height;
i++)
3714 rects[ellipse_height / 2].
top =
top + ellipse_height / 2;
3734 if ((hSrcRgn1 ==
NULL) || (hSrcRgn2 ==
NULL))
3740 if (hSrcRgn1 == hSrcRgn2)
3752 ahrgn[0] = hSrcRgn1;
3753 ahrgn[1] = hSrcRgn2;
3756 DPRINT1(
"NtGdiEqualRgn failed to lock regions: %p, %p\n",
3757 hSrcRgn1, hSrcRgn2);
3785 if ((tRect1 ==
NULL) || (tRect2 ==
NULL))
3792 (tRect1[
i].
top != tRect2[
i].
top) ||
3823 DPRINT(
"NtGdiExtCreateRegion\n");
3864 for(
i=0;
i<nCount;
i++)
3978 DPRINT1(
"NtGdiOffsetRgn: failed to lock region %p\n",
hrgn);
4011 DPRINT1(
"NtGdiPtInRegion: hrgn error\n");
4036 rcTemp = *prclUnsafe;
4040 DPRINT1(
"NtGdiRectInRegion: Exception accessing the rect\n");
4122 lpRgnData->rdh.nRgnSize = cjRects;
struct _RGNDATAHEADER RGNDATAHEADER
static LPHIST_ENTRY Bottom
#define ERROR_NOT_ENOUGH_MEMORY
#define NT_SUCCESS(StatCode)
static const WCHAR empty[]
#define ERROR_INVALID_PARAMETER
#define ERROR_INVALID_HANDLE
static const WCHAR Cleanup[]
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID NTAPI ProbeForRead(IN CONST VOID *Address, IN SIZE_T Length, IN ULONG Alignment)
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
#define GDI_HANDLE_GET_TYPE(h)
@ GDILoObjType_LO_REGION_TYPE
VOID NTAPI GdiPoolFree(PGDI_POOL pPool, PVOID pvAlloc)
PVOID NTAPI GdiPoolAllocate(PGDI_POOL pPool)
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
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
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 GLint GLint j
#define EXCEPTION_EXECUTE_HANDLER
#define ExFreePoolWithTag(_P, _T)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define _Out_writes_bytes_to_opt_(s, c)
__kernel_entry W32KAPI INT APIENTRY NtGdiCombineRgn(_In_ HRGN hrgnDst, _In_ HRGN hrgnSrc1, _In_opt_ HRGN hrgnSrc2, _In_ INT iMode)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiSetRectRgn(_In_ HRGN hrgn, _In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiRectInRegion(_In_ HRGN hrgn, _Inout_ LPRECT prcl)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiPtInRegion(_In_ HRGN hrgn, _In_ INT x, _In_ INT y)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateEllipticRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiExtCreateRegion(_In_opt_ LPXFORM px, _In_ DWORD cj, _In_reads_bytes_(cj) LPRGNDATA prgndata)
__kernel_entry W32KAPI HRGN APIENTRY NtGdiCreateRectRgn(_In_ INT xLeft, _In_ INT yTop, _In_ INT xRight, _In_ INT yBottom)
__kernel_entry W32KAPI INT APIENTRY NtGdiOffsetRgn(_In_ HRGN hrgn, _In_ INT cx, _In_ INT cy)
#define GDI_OBJ_HMGR_POWNED
PVOID NTAPI PsGetCurrentProcessWin32Process(VOID)
_Out_opt_ int _Out_opt_ int * cy
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
PULONG MinorVersion OPTIONAL
struct _EDGE_TABLE_ENTRY * nextWETE
struct _EDGE_TABLE_ENTRY * back
struct _EDGE_TABLE_ENTRY * next
struct _POINTBLOCK * next
POINT pts[NUMPTSTOBUFFER]
struct _GDI_POOL * pPoolRgnAttr
_Notnull_ PRGN_ATTR prgnattr
struct _SCANLINE_LISTBLOCK * next
SCANLINE_LIST SLLs[SLLSPERBLOCK]
struct _SCANLINE_LIST * next
EDGE_TABLE_ENTRY * edgelist
#define _PRAGMA_WARNING_SUPPRESS(x)
#define __WARNING_MAYBE_UNINIT_VAR
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
VOID FASTCALL SetLastNtError(_In_ NTSTATUS Status)
BOOL NTAPI GreSetObjectOwner(HGDIOBJ hobj, ULONG ulOwner)
VOID NTAPI GDIOBJ_vFreeObject(POBJ pobj)
HGDIOBJ NTAPI GDIOBJ_hInsertObject(POBJ pobj, ULONG ulOwner)
VOID NTAPI GDIOBJ_vSetObjectAttr(POBJ pobj, PVOID pvObjAttr)
BOOL NTAPI GreDeleteObject(HGDIOBJ hobj)
BOOL NTAPI GDIOBJ_bLockMultipleObjects(IN ULONG ulCount, IN HGDIOBJ *ahObj, OUT PGDIOBJ *apObj, IN UCHAR objt)
PGDIOBJ NTAPI GDIOBJ_LockObject(HGDIOBJ hobj, UCHAR objt)
ULONG NTAPI GreGetObjectOwner(HGDIOBJ hobj)
POBJ NTAPI GDIOBJ_AllocateObject(UCHAR objt, ULONG cjSize, FLONG fl)
BOOL NTAPI GreIsHandleValid(HGDIOBJ hobj)
VOID NTAPI GDIOBJ_vUnlockObject(POBJ pobj)
VOID NTAPI GDIOBJ_vDeleteObject(POBJ pobj)
VOID FASTCALL RECTL_vMakeWellOrdered(_Inout_ RECTL *prcl)
BOOL FASTCALL RECTL_bUnionRect(_Out_ RECTL *prclDst, _In_ const RECTL *prcl1, _In_ const RECTL *prcl2)
FORCEINLINE VOID RECTL_vSetEmptyRect(_Out_ RECTL *prcl)
INT FASTCALL REGION_Complexity(PREGION prgn)
static VOID FASTCALL REGION_CreateETandAET(const ULONG *Count, INT nbpolygons, const POINT *pts, EDGE_TABLE *ET, EDGE_TABLE_ENTRY *AET, EDGE_TABLE_ENTRY *pETEs, SCANLINE_LISTBLOCK *pSLLBlock)
HRGN APIENTRY NtGdiCreateRoundRectRgn(INT left, INT top, INT right, INT bottom, INT ellipse_width, INT ellipse_height)
static BOOL REGION_bGrowBufferSize(_Inout_ PREGION prgn, _In_ UINT cRects)
struct _EDGE_TABLE_ENTRY EDGE_TABLE_ENTRY
static INT FASTCALL REGION_PtsToRegion(INT numFullPtBlocks, INT iCurPtBlock, POINTBLOCK *FirstPtBlock, PREGION reg)
VOID FASTCALL REGION_Delete(PREGION pRgn)
BOOL FASTCALL REGION_UnionRectWithRgn(PREGION rgn, const RECTL *rect)
static BOOL REGION_bMakeSimpleFrameRgn(_Inout_ PREGION prgn, _In_ PRECTL prclSrc, _In_ INT cx, _In_ INT cy)
BOOL FASTCALL IntRectInRegion(HRGN hRgn, LPRECTL rc)
struct _POINTBLOCK POINTBLOCK
PREGION FASTCALL REGION_LockRgn(_In_ HRGN hrgn)
#define COPY_RECTS(dest, src, nRects)
static VOID FASTCALL REGION_FreeStorage(SCANLINE_LISTBLOCK *pSLLBlock)
static BOOL FASTCALL REGION_UnionRegion(PREGION newReg, PREGION reg1, PREGION reg2)
struct _SCANLINE_LIST SCANLINE_LIST
BOOL FASTCALL REGION_bXformRgn(_Inout_ PREGION prgn, _In_ PMATRIX pmx)
BOOL FASTCALL REGION_RectInRegion(PREGION Rgn, const RECTL *rect)
static BOOL FASTCALL REGION_UnionO(PREGION pReg, PRECTL r1, PRECTL r1End, PRECTL r2, PRECTL r2End, INT top, INT bottom)
static BOOL FASTCALL REGION_XorRegion(PREGION dr, PREGION sra, PREGION srb)
BOOL FASTCALL IntGdiSetRegionOwner(HRGN hRgn, DWORD OwnerMask)
#define EXTENTCHECK(r1, r2)
BOOL FASTCALL REGION_SetPolyPolygonRgn(_Inout_ PREGION prgn, _In_ const POINT *ppt, _In_ const ULONG *pcPoints, _In_ ULONG cPolygons, _In_ INT iMode)
BOOL APIENTRY NtGdiEqualRgn(HRGN hSrcRgn1, HRGN hSrcRgn2)
static BOOL FASTCALL REGION_SubtractO(PREGION pReg, PRECTL r1, PRECTL r1End, PRECTL r2, PRECTL r2End, INT top, INT bottom)
static BOOL FASTCALL REGION_SubtractNonO1(PREGION pReg, PRECTL r, PRECTL rEnd, INT top, INT bottom)
static VOID FASTCALL REGION_SetExtents(PREGION pReg)
BOOL NTAPI REGION_bAllocRgnAttr(PREGION prgn)
#define EVALUATEEDGEEVENODD(pAET, pPrevAET, y)
VOID FASTCALL REGION_SetRectRgn(PREGION rgn, INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
INT FASTCALL REGION_CropRegion(PREGION rgnDst, PREGION rgnSrc, const RECTL *rect)
#define EMPTY_REGION(pReg)
static VOID FASTCALL REGION_loadAET(EDGE_TABLE_ENTRY *AET, EDGE_TABLE_ENTRY *ETEs)
INT APIENTRY IntGdiGetRgnBox(HRGN hRgn, PRECTL pRect)
BOOL(FASTCALL * nonOverlapProcp)(PREGION, PRECT, PRECT, INT, INT)
VOID FASTCALL REGION_UnlockRgn(_In_ PREGION prgn)
static VOID FASTCALL REGION_InsertEdgeInET(EDGE_TABLE *ET, EDGE_TABLE_ENTRY *ETE, INT scanline, SCANLINE_LISTBLOCK **SLLBlock, INT *iSLLBlock)
INT FASTCALL REGION_SubtractRectFromRgn(PREGION prgnDest, PREGION prgnSrc, const RECTL *prcl)
struct _SCANLINE_LISTBLOCK SCANLINE_LISTBLOCK
BOOL FASTCALL REGION_PtInRegion(PREGION prgn, INT X, INT Y)
HRGN NTAPI GreCreatePolyPolygonRgn(_In_ const POINT *ppt, _In_ const ULONG *pcPoints, _In_ ULONG cPolygons, _In_ INT iMode)
#define BRESINITPGONSTRUCT(dmaj, min1, min2, bres)
static BOOL FASTCALL REGION_IntersectO(PREGION pReg, PRECTL r1, PRECTL r1End, PRECTL r2, PRECTL r2End, INT top, INT bottom)
static BOOL FASTCALL REGION_IntersectRegion(PREGION newReg, PREGION reg1, PREGION reg2)
INT FASTCALL REGION_GetRgnBox(PREGION Rgn, PRECTL pRect)
BOOL(FASTCALL * overlapProcp)(PREGION, PRECT, PRECT, PRECT, PRECT, INT, INT)
static BOOL FASTCALL REGION_RegionOp(PREGION newReg, PREGION reg1, PREGION reg2, overlapProcp overlapFunc, nonOverlapProcp nonOverlap1Func, nonOverlapProcp nonOverlap2Func)
FORCEINLINE VOID REGION_vAddRect(_Inout_ PREGION prgn, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
static VOID FASTCALL REGION_computeWAET(EDGE_TABLE_ENTRY *AET)
BOOL FASTCALL REGION_bCopy(PREGION dst, PREGION src)
PREGION FASTCALL IntSysCreateRectpRgn(INT LeftRect, INT TopRect, INT RightRect, INT BottomRect)
static __inline BOOL REGION_bAddRect(_Inout_ PREGION prgn, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
static VOID REGION_vSyncRegion(_In_ PREGION prgn)
static __inline BOOL REGION_bMergeRect(_Inout_ PREGION prgn, _In_ LONG left, _In_ LONG top, _In_ LONG right, _In_ LONG bottom)
PREGION FASTCALL REGION_AllocUserRgnWithHandle(INT nRgn)
static INT FASTCALL REGION_Coalesce(PREGION pReg, INT prevStart, INT curStart)
#define REGION_NOT_EMPTY(pReg)
PREGION FASTCALL REGION_AllocRgnWithHandle(INT nReg)
static BOOL FASTCALL REGION_InsertionSort(EDGE_TABLE_ENTRY *AET)
static BOOL FASTCALL REGION_UnionNonO(PREGION pReg, PRECTL r, PRECTL rEnd, INT top, INT bottom)
HRGN FASTCALL GreCreateFrameRgn(HRGN hrgn, INT cx, INT cy)
static __inline BOOL REGION_bEnsureBufferSize(_Inout_ PREGION prgn, _In_ UINT cRects)
static BOOL FASTCALL REGION_SubtractRegion(PREGION regD, PREGION regM, PREGION regS)
BOOL FASTCALL REGION_bOffsetRgn(_Inout_ PREGION prgn, _In_ INT cx, _In_ INT cy)
#define EVALUATEEDGEWINDING(pAET, pPrevAET, y, fixWAET)
static BOOL REGION_bMakeFrameRegion(_Inout_ PREGION prgnDest, _Inout_ PREGION prgnSrc, _In_ INT cx, _In_ INT cy)
static BOOL FASTCALL REGION_CopyRegion(PREGION dst, PREGION src)
INT FASTCALL IntGdiCombineRgn(PREGION prgnDest, PREGION prgnSrc1, PREGION prgnSrc2, INT iCombineMode)
BOOL FASTCALL REGION_bIntersectRegion(PREGION newReg, PREGION reg1, PREGION reg2)
VOID NTAPI REGION_vCleanup(PVOID ObjectBody)
INT APIENTRY NtGdiGetRgnBox(HRGN hRgn, PRECTL pRect)
_In_ SURFOBJ _In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ RECTL _In_ RECTL * prclSrc
_In_ ULONG _In_ CLIPOBJ _In_ RECTL * prcl
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
_In_ HANDLE _In_ HANDLE hrgnSrc2