mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 02:42:59 +00:00
[gdi32]
- Run full Attribute and GdiBatch for Region support. Leaving Enh/Meta and mirroring support for regions. svn path=/trunk/; revision=44943
This commit is contained in:
parent
e94d3dc399
commit
c2773414b9
1 changed files with 25 additions and 35 deletions
|
@ -104,7 +104,6 @@ BOOL
|
||||||
FASTCALL
|
FASTCALL
|
||||||
DeleteRegion( HRGN hRgn )
|
DeleteRegion( HRGN hRgn )
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR Rgn_Attr;
|
PRGN_ATTR Rgn_Attr;
|
||||||
|
|
||||||
if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
|
if ((GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr)) &&
|
||||||
|
@ -128,7 +127,6 @@ DeleteRegion( HRGN hRgn )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return NtGdiDeleteObjectApp((HGDIOBJ) hRgn);
|
return NtGdiDeleteObjectApp((HGDIOBJ) hRgn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +202,6 @@ CombineRgn(HRGN hDest,
|
||||||
HRGN hSrc2,
|
HRGN hSrc2,
|
||||||
INT CombineMode)
|
INT CombineMode)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR pRgn_Attr_Dest = NULL;
|
PRGN_ATTR pRgn_Attr_Dest = NULL;
|
||||||
PRGN_ATTR pRgn_Attr_Src1 = NULL;
|
PRGN_ATTR pRgn_Attr_Src1 = NULL;
|
||||||
PRGN_ATTR pRgn_Attr_Src2 = NULL;
|
PRGN_ATTR pRgn_Attr_Src2 = NULL;
|
||||||
|
@ -218,9 +215,8 @@ CombineRgn(HRGN hDest,
|
||||||
!pRgn_Attr_Dest ||
|
!pRgn_Attr_Dest ||
|
||||||
!pRgn_Attr_Src1 ||
|
!pRgn_Attr_Src1 ||
|
||||||
pRgn_Attr_Src1->Flags > SIMPLEREGION )
|
pRgn_Attr_Src1->Flags > SIMPLEREGION )
|
||||||
#endif
|
|
||||||
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
|
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
|
||||||
#if 0
|
|
||||||
/* Handle COPY and use only src1. */
|
/* Handle COPY and use only src1. */
|
||||||
if ( CombineMode == RGN_COPY )
|
if ( CombineMode == RGN_COPY )
|
||||||
{
|
{
|
||||||
|
@ -274,19 +270,29 @@ CombineRgn(HRGN hDest,
|
||||||
DPRINT1("RGN_COPY was handled! CombineMode %d\n",CombineMode);
|
DPRINT1("RGN_COPY was handled! CombineMode %d\n",CombineMode);
|
||||||
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
|
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
|
||||||
}
|
}
|
||||||
|
/* Now handle DIFF. */
|
||||||
|
if ( pRgn_Attr_Src1->Flags == NULLREGION )
|
||||||
|
{
|
||||||
|
if (SetRectRgn( hDest, 0, 0, 0, 0))
|
||||||
|
return NULLREGION;
|
||||||
|
goto ERROR_Exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ( pRgn_Attr_Src1->Flags != NULLREGION &&
|
if ( pRgn_Attr_Src2->Flags != NULLREGION )
|
||||||
pRgn_Attr_Src2->Flags != NULLREGION )
|
|
||||||
{
|
{
|
||||||
Complexity = ComplexityFromRects( &pRgn_Attr_Src1->Rect, &pRgn_Attr_Src2->Rect);
|
Complexity = ComplexityFromRects( &pRgn_Attr_Src1->Rect, &pRgn_Attr_Src2->Rect);
|
||||||
/* If same or overlapping and norm just go K. */
|
|
||||||
if (Complexity == SAME_RGN || Complexity == OVERLAPPING_RGN)
|
if ( Complexity != DIFF_RGN )
|
||||||
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
|
{
|
||||||
|
if ( Complexity != INVERTED_RGN)
|
||||||
|
/* If same or overlapping and norm just go K. */
|
||||||
|
return NtGdiCombineRgn(hDest, hSrc1, hSrc2, CombineMode);
|
||||||
|
|
||||||
|
if (SetRectRgn( hDest, 0, 0, 0, 0))
|
||||||
|
return NULLREGION;
|
||||||
|
goto ERROR_Exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* Just NULL rgn. */
|
|
||||||
if (SetRectRgn( hDest, 0, 0, 0, 0))
|
|
||||||
return NULLREGION;
|
|
||||||
goto ERROR_Exit;
|
|
||||||
}
|
}
|
||||||
else /* Handle OR or XOR. */
|
else /* Handle OR or XOR. */
|
||||||
{
|
{
|
||||||
|
@ -389,7 +395,6 @@ ERROR_Exit:
|
||||||
/* Even on error the flag is set dirty and force server side to redraw. */
|
/* Even on error the flag is set dirty and force server side to redraw. */
|
||||||
pRgn_Attr_Dest->AttrFlags |= ATTR_RGN_DIRTY;
|
pRgn_Attr_Dest->AttrFlags |= ATTR_RGN_DIRTY;
|
||||||
return ERROR;
|
return ERROR;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -634,13 +639,11 @@ WINAPI
|
||||||
GetRgnBox(HRGN hrgn,
|
GetRgnBox(HRGN hrgn,
|
||||||
LPRECT prcOut)
|
LPRECT prcOut)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR Rgn_Attr;
|
PRGN_ATTR Rgn_Attr;
|
||||||
|
|
||||||
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
|
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
|
||||||
#endif
|
|
||||||
return NtGdiGetRgnBox(hrgn, prcOut);
|
return NtGdiGetRgnBox(hrgn, prcOut);
|
||||||
#if 0
|
|
||||||
if (Rgn_Attr->Flags == NULLREGION)
|
if (Rgn_Attr->Flags == NULLREGION)
|
||||||
{
|
{
|
||||||
prcOut->left = 0;
|
prcOut->left = 0;
|
||||||
|
@ -656,7 +659,6 @@ GetRgnBox(HRGN hrgn,
|
||||||
RtlCopyMemory( prcOut, &Rgn_Attr->Rect, sizeof(RECT));
|
RtlCopyMemory( prcOut, &Rgn_Attr->Rect, sizeof(RECT));
|
||||||
}
|
}
|
||||||
return Rgn_Attr->Flags;
|
return Rgn_Attr->Flags;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -747,14 +749,12 @@ OffsetRgn( HRGN hrgn,
|
||||||
int nXOffset,
|
int nXOffset,
|
||||||
int nYOffset)
|
int nYOffset)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR pRgn_Attr;
|
PRGN_ATTR pRgn_Attr;
|
||||||
int nLeftRect, nTopRect, nRightRect, nBottomRect;
|
int nLeftRect, nTopRect, nRightRect, nBottomRect;
|
||||||
|
|
||||||
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
|
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
|
||||||
#endif
|
|
||||||
return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
|
return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
|
||||||
#if 0
|
|
||||||
if ( pRgn_Attr->Flags == NULLREGION)
|
if ( pRgn_Attr->Flags == NULLREGION)
|
||||||
return pRgn_Attr->Flags;
|
return pRgn_Attr->Flags;
|
||||||
|
|
||||||
|
@ -792,7 +792,6 @@ OffsetRgn( HRGN hrgn,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pRgn_Attr->Flags;
|
return pRgn_Attr->Flags;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -804,13 +803,11 @@ PtInRegion(IN HRGN hrgn,
|
||||||
int x,
|
int x,
|
||||||
int y)
|
int y)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR pRgn_Attr;
|
PRGN_ATTR pRgn_Attr;
|
||||||
|
|
||||||
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
|
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
|
||||||
#endif
|
|
||||||
return NtGdiPtInRegion(hrgn,x,y);
|
return NtGdiPtInRegion(hrgn,x,y);
|
||||||
#if 0
|
|
||||||
if ( pRgn_Attr->Flags == NULLREGION)
|
if ( pRgn_Attr->Flags == NULLREGION)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -818,7 +815,6 @@ PtInRegion(IN HRGN hrgn,
|
||||||
return NtGdiPtInRegion(hrgn,x,y);
|
return NtGdiPtInRegion(hrgn,x,y);
|
||||||
|
|
||||||
return INRECT( pRgn_Attr->Rect, x, y);
|
return INRECT( pRgn_Attr->Rect, x, y);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -829,14 +825,12 @@ WINAPI
|
||||||
RectInRegion(HRGN hrgn,
|
RectInRegion(HRGN hrgn,
|
||||||
LPCRECT prcl)
|
LPCRECT prcl)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR pRgn_Attr;
|
PRGN_ATTR pRgn_Attr;
|
||||||
RECTL rc;
|
RECTL rc;
|
||||||
|
|
||||||
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
|
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &pRgn_Attr))
|
||||||
#endif
|
|
||||||
return NtGdiRectInRegion(hrgn, (LPRECT) prcl);
|
return NtGdiRectInRegion(hrgn, (LPRECT) prcl);
|
||||||
#if 0
|
|
||||||
if ( pRgn_Attr->Flags == NULLREGION)
|
if ( pRgn_Attr->Flags == NULLREGION)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -870,7 +864,6 @@ RectInRegion(HRGN hrgn,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -896,13 +889,11 @@ SetRectRgn(HRGN hrgn,
|
||||||
int nRightRect,
|
int nRightRect,
|
||||||
int nBottomRect)
|
int nBottomRect)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
PRGN_ATTR Rgn_Attr;
|
PRGN_ATTR Rgn_Attr;
|
||||||
|
|
||||||
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
|
if (!GdiGetHandleUserData((HGDIOBJ) hrgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
|
||||||
#endif
|
|
||||||
return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
return NtGdiSetRectRgn(hrgn, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
||||||
#if 0
|
|
||||||
if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect))
|
if ((nLeftRect == nRightRect) || (nTopRect == nBottomRect))
|
||||||
{
|
{
|
||||||
Rgn_Attr->AttrFlags |= ATTR_RGN_DIRTY;
|
Rgn_Attr->AttrFlags |= ATTR_RGN_DIRTY;
|
||||||
|
@ -931,7 +922,6 @@ SetRectRgn(HRGN hrgn,
|
||||||
Rgn_Attr->AttrFlags |= ATTR_RGN_DIRTY ;
|
Rgn_Attr->AttrFlags |= ATTR_RGN_DIRTY ;
|
||||||
Rgn_Attr->Flags = SIMPLEREGION;
|
Rgn_Attr->Flags = SIMPLEREGION;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue