remove redirect of CreatePolyPolygonRgn@16 and implement own stub for it, it is hacked, it should doing, return (HRGN) NtGdiPolyPolyDraw(fnPolyFillMode, lppt, lpPolyCounts, nCount, 6 );

remove redirect of CreatePolygonRgn@12 and implement own stub for it, it is hacked, it should doing return NtGdiPolyPolyDraw(fnPolyFillMode,lppt,cPoints,1,6);
remove redirect of CreateRectRgn@16 and implement own stub for it,  some part need be done in user mode
Fix CreateRectRgnIndirect it call now on CreateRectRgn for some part need be done in user mode, and it crash if NULL comes in as param, like windows does. 
Fix CreatePenIndirect ir call now on CreatePen for some stuff need be done in user mode. 
Add comment to CreatePen it need be fix. 



svn path=/trunk/; revision=28484
This commit is contained in:
Magnus Olsen 2007-08-23 19:21:16 +00:00
parent d88b419c3a
commit 75fff0653f
3 changed files with 44 additions and 37 deletions

View file

@ -76,19 +76,19 @@ CreateMetaFileA@4
CreateMetaFileW@4
CreatePalette@4
CreatePatternBrush@4
ClearBitmapAttributes@8
ClearBrushAttributes@8
CreatePen@12
CreatePenIndirect@4
CreatePolyPolygonRgn@16=NtGdiCreatePolyPolygonRgn@16
CreatePolygonRgn@12=NtGdiCreatePolygonRgn@12
CreateRectRgn@16=NtGdiCreateRectRgn@16
CreatePolyPolygonRgn@16
CreatePolygonRgn@12
CreateRectRgn@16
CreateRectRgnIndirect@4
CreateRoundRectRgn@24=NtGdiCreateRoundRectRgn@24
CreateScalableFontResourceA@16
CreateScalableFontResourceW@16
CreateSolidBrush@4
ClearBitmapAttributes@8
ClearBrushAttributes@8
DPtoLP@12
DeleteColorSpace@4
DeleteDC@4

View file

@ -8,19 +8,10 @@
*/
HPEN WINAPI
CreatePenIndirect(
const LOGPEN *plgpn)
const LOGPEN *lplgpn)
{
if (plgpn)
{
return NtGdiCreatePen(plgpn->lopnStyle,
/* FIXME: MSDN says in docs for LOGPEN:
"If the pointer member is NULL, the pen is one pixel
wide on raster devices." Do we need to handle this? */
plgpn->lopnWidth.x,
plgpn->lopnColor,
NULL);
}
return NULL;
/* Note same behoir as Windows 2000/XP/VISTA, they do not care if plgpn is NULL´, it will crash */
return CreatePen(lplgpn->lopnStyle, lplgpn->lopnWidth.x, lplgpn->lopnColor);
}
/*
@ -32,6 +23,7 @@ CreatePen(
int nWidth,
COLORREF crColor)
{
/* FIXME Some part need be done in user mode */
return NtGdiCreatePen(nPenStyle, nWidth, crColor, NULL);
}

View file

@ -24,30 +24,41 @@ GetClipRgn(
HRGN hrgn
)
{
return NtGdiGetRandomRgn(hdc, hrgn, 1);
return NtGdiGetRandomRgn(hdc, hrgn, 1);
}
HRGN
WINAPI
CreatePolygonRgn( const POINT* Point, int Count, int Mode)
CreatePolygonRgn( const POINT* lppt, int cPoints, int fnPolyFillMode)
{
return CreatePolyPolygonRgn(Point, (const INT*)&Count, 1, Mode);
/* FIXME NtGdiPolyPolyDraw */
#if 0
return NtGdiPolyPolyDraw(fnPolyFillMode,lppt,cPoints,1,6);
#else
return CreatePolyPolygonRgn(lppt, (const INT*)&cPoints, 1, fnPolyFillMode);
#endif
}
HRGN
WINAPI
CreatePolyPolygonRgn( const POINT* Point,
const INT* Count,
int inPolygons,
int Mode)
CreatePolyPolygonRgn( const POINT* lppt,
const INT* lpPolyCounts,
int nCount,
int fnPolyFillMode)
{
return (HRGN) NtGdiPolyPolyDraw( (HDC) Mode,
(PPOINT) Point,
(PULONG) Count,
(ULONG) inPolygons,
/* FIXME NtGdiPolyPolyDraw */
#if 0
return (HRGN) NtGdiPolyPolyDraw( (HDC) fnPolyFillMode,
(PPOINT) lppt,
(PULONG) lpPolyCounts,
(ULONG) nCount,
GdiPolyPolyRgn );
#else
return NtGdiCreatePolyPolygonRgn( (PPOINT)lppt, (PINT)lpPolyCounts, nCount, fnPolyFillMode);
#endif
}
HRGN
@ -61,18 +72,22 @@ CreateEllipticRgnIndirect(
}
HRGN
WINAPI
CreateRectRgn(int x1, int y1, int x2,int y2)
{
/* FIXME Some part need be done in user mode */
return NtGdiCreateRectRgn(x1,y1,x2,y2);
}
HRGN
WINAPI
CreateRectRgnIndirect(
const RECT *prc
)
{
if (prc)
{
return NtGdiCreateRectRgn(prc->left,
prc->top,
prc->right,
prc->bottom);
}
return NULL;
/* Notes if prc is NULL it will crash on All Windows NT I checked 2000/XP/VISTA */
return CreateRectRgn(prc->left, prc->top, prc->right, prc->bottom);
}