mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 04:33:12 +00:00
- Removed NtGdiSetMapMode from w32ksvc.db and updated ntgdibad.h.
- Moved NtGdiSetMapMode to an internal function. - Changed NtGdiPaintRgn and added IntdiPaintRgn. - Cleaned up win32k path.c. - Connected the gdi32 parts. svn path=/trunk/; revision=28446
This commit is contained in:
parent
c27ffbed0c
commit
1deecb4b19
10 changed files with 69 additions and 54 deletions
|
@ -555,7 +555,7 @@ SetICMProfileW@8
|
||||||
SetLayout@8
|
SetLayout@8
|
||||||
SetLayoutWidth@12
|
SetLayoutWidth@12
|
||||||
SetMagicColors@12
|
SetMagicColors@12
|
||||||
SetMapMode@8=NtGdiSetMapMode@8
|
SetMapMode@8
|
||||||
SetMapperFlags@8
|
SetMapperFlags@8
|
||||||
SetMetaFileBitsEx@8
|
SetMetaFileBitsEx@8
|
||||||
SetMetaRgn@4
|
SetMetaRgn@4
|
||||||
|
|
|
@ -932,3 +932,18 @@ SelectPalette(
|
||||||
{
|
{
|
||||||
return NtUserSelectPalette(hDC, hPal, bForceBackground);
|
return NtUserSelectPalette(hDC, hPal, bForceBackground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
INT
|
||||||
|
STDCALL
|
||||||
|
SetMapMode(
|
||||||
|
HDC hdc,
|
||||||
|
INT Mode
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return GetAndSetDCDWord( hdc, GdiGetSetMapMode, Mode, 0, 0, 0 );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -642,14 +642,6 @@ STDCALL
|
||||||
NtGdiSetICMProfile(HDC hDC,
|
NtGdiSetICMProfile(HDC hDC,
|
||||||
LPWSTR Filename);
|
LPWSTR Filename);
|
||||||
|
|
||||||
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
|
|
||||||
int
|
|
||||||
STDCALL
|
|
||||||
NtGdiSetMapMode (
|
|
||||||
HDC hDC,
|
|
||||||
int MapMode
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
|
/* Needs to be done in user-mode, using shared GDI Object Attributes. */
|
||||||
DWORD
|
DWORD
|
||||||
STDCALL
|
STDCALL
|
||||||
|
|
|
@ -21,6 +21,8 @@ VOID
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntLPtoDP ( PDC dc, LPPOINT Points, INT Count );
|
IntLPtoDP ( PDC dc, LPPOINT Points, INT Count );
|
||||||
|
|
||||||
|
int STDCALL IntGdiSetMapMode(PDC, int);
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
FASTCALL
|
FASTCALL
|
||||||
IntGdiModifyWorldTransform(PDC pDc,
|
IntGdiModifyWorldTransform(PDC pDc,
|
||||||
|
|
|
@ -17,5 +17,7 @@ typedef struct _ROSRGNDATA {
|
||||||
HRGN FASTCALL RGNDATA_AllocRgn(INT n);
|
HRGN FASTCALL RGNDATA_AllocRgn(INT n);
|
||||||
BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);
|
BOOL INTERNAL_CALL RGNDATA_Cleanup(PVOID ObjectBody);
|
||||||
|
|
||||||
|
BOOL FASTCALL IntGdiPaintRgn(PDC, HRGN );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -454,6 +454,7 @@ NtGdiModifyWorldTransform(HDC hDC,
|
||||||
}
|
}
|
||||||
_SEH_END;
|
_SEH_END;
|
||||||
|
|
||||||
|
DCU_UpdateUserXForms(dc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED );
|
||||||
DC_UnlockDc(dc);
|
DC_UnlockDc(dc);
|
||||||
return Ret;
|
return Ret;
|
||||||
}
|
}
|
||||||
|
@ -621,18 +622,10 @@ NtGdiSetGraphicsMode(HDC hDC,
|
||||||
|
|
||||||
int
|
int
|
||||||
STDCALL
|
STDCALL
|
||||||
NtGdiSetMapMode(HDC hDC,
|
IntGdiSetMapMode(PDC dc,
|
||||||
int MapMode)
|
int MapMode)
|
||||||
{
|
{
|
||||||
int PrevMapMode;
|
int PrevMapMode;
|
||||||
PDC dc;
|
|
||||||
|
|
||||||
dc = DC_LockDc(hDC);
|
|
||||||
if (!dc)
|
|
||||||
{
|
|
||||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
PrevMapMode = dc->Dc_Attr.iMapMode;
|
PrevMapMode = dc->Dc_Attr.iMapMode;
|
||||||
|
|
||||||
|
@ -693,8 +686,6 @@ NtGdiSetMapMode(HDC hDC,
|
||||||
DCU_UpdateUserXForms(dc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED );
|
DCU_UpdateUserXForms(dc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED );
|
||||||
}
|
}
|
||||||
|
|
||||||
DC_UnlockDc(dc);
|
|
||||||
|
|
||||||
return PrevMapMode;
|
return PrevMapMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2269,8 +2269,7 @@ NtGdiGetAndSetDCDword(
|
||||||
case GdiGetSetMapperFlagsInternal:
|
case GdiGetSetMapperFlagsInternal:
|
||||||
break;
|
break;
|
||||||
case GdiGetSetMapMode:
|
case GdiGetSetMapMode:
|
||||||
SafeResult = dc->Dc_Attr.iMapMode;
|
SafeResult = IntGdiSetMapMode( dc, dwIn);
|
||||||
dc->Dc_Attr.iMapMode = dwIn;
|
|
||||||
break;
|
break;
|
||||||
case GdiGetSetArcDirection:
|
case GdiGetSetArcDirection:
|
||||||
if (dwIn != AD_COUNTERCLOCKWISE && dwIn != AD_CLOCKWISE)
|
if (dwIn != AD_COUNTERCLOCKWISE && dwIn != AD_CLOCKWISE)
|
||||||
|
|
|
@ -412,11 +412,11 @@ PATH_FillPath( PDC dc, GdiPath *pPath )
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Save the information about the old mapping mode */
|
/* Save the information about the old mapping mode */
|
||||||
mapMode = NtGdiGetMapMode( dc->hSelf );
|
mapMode = dc->Dc_Attr.iMapMode;
|
||||||
NtGdiGetViewportExtEx( dc->hSelf, &ptViewportExt );
|
ptViewportExt = dc->Dc_Attr.szlViewportExt;
|
||||||
NtGdiGetViewportOrgEx( dc->hSelf, &ptViewportOrg );
|
ptViewportOrg = dc->Dc_Attr.ptlViewportOrg;
|
||||||
NtGdiGetWindowExtEx( dc->hSelf, &ptWindowExt );
|
ptWindowExt = dc->Dc_Attr.szlWindowExt;
|
||||||
NtGdiGetWindowOrgEx( dc->hSelf, &ptWindowOrg );
|
ptWindowOrg = dc->Dc_Attr.ptlWindowOrg;
|
||||||
|
|
||||||
/* Save world transform
|
/* Save world transform
|
||||||
* NB: The Windows documentation on world transforms would lead one to
|
* NB: The Windows documentation on world transforms would lead one to
|
||||||
|
@ -424,32 +424,36 @@ PATH_FillPath( PDC dc, GdiPath *pPath )
|
||||||
* tests show that resetting the graphics mode to GM_COMPATIBLE does
|
* tests show that resetting the graphics mode to GM_COMPATIBLE does
|
||||||
* not reset the world transform.
|
* not reset the world transform.
|
||||||
*/
|
*/
|
||||||
NtGdiGetTransform( dc->hSelf, GdiWorldSpaceToPageSpace, &xform );
|
xform = dc->w.xformWorld2Wnd;
|
||||||
|
|
||||||
/* Set MM_TEXT */
|
/* Set MM_TEXT */
|
||||||
NtGdiSetMapMode( dc->hSelf, MM_TEXT );
|
IntGdiSetMapMode( dc, MM_TEXT );
|
||||||
NtGdiSetViewportOrgEx( dc->hSelf, 0, 0, NULL );
|
dc->Dc_Attr.ptlViewportOrg.x = 0;
|
||||||
NtGdiSetWindowOrgEx( dc->hSelf, 0, 0, NULL );
|
dc->Dc_Attr.ptlViewportOrg.y = 0;
|
||||||
graphicsMode = NtGdiGetGraphicsMode( dc->hSelf );
|
dc->Dc_Attr.ptlWindowOrg.x = 0;
|
||||||
NtGdiSetGraphicsMode( dc->hSelf, GM_ADVANCED );
|
dc->Dc_Attr.ptlWindowOrg.y = 0;
|
||||||
NtGdiModifyWorldTransform( dc->hSelf, &xform, MWT_IDENTITY );
|
|
||||||
NtGdiSetGraphicsMode( dc->hSelf, graphicsMode );
|
graphicsMode = dc->Dc_Attr.iGraphicsMode;
|
||||||
|
dc->Dc_Attr.iGraphicsMode = GM_ADVANCED;
|
||||||
|
IntGdiModifyWorldTransform( dc, &xform, MWT_IDENTITY );
|
||||||
|
dc->Dc_Attr.iGraphicsMode = graphicsMode;
|
||||||
|
|
||||||
/* Paint the region */
|
/* Paint the region */
|
||||||
NtGdiPaintRgn( dc->hSelf, hrgn );
|
IntGdiPaintRgn( dc, hrgn );
|
||||||
NtGdiDeleteObject( hrgn );
|
NtGdiDeleteObject( hrgn );
|
||||||
/* Restore the old mapping mode */
|
/* Restore the old mapping mode */
|
||||||
NtGdiSetMapMode( dc->hSelf, mapMode );
|
IntGdiSetMapMode( dc, mapMode );
|
||||||
NtGdiSetViewportExtEx( dc->hSelf, ptViewportExt.cx, ptViewportExt.cy, NULL );
|
dc->Dc_Attr.szlViewportExt = ptViewportExt;
|
||||||
NtGdiSetViewportOrgEx( dc->hSelf, ptViewportOrg.x, ptViewportOrg.y, NULL );
|
dc->Dc_Attr.ptlViewportOrg = ptViewportOrg;
|
||||||
NtGdiSetWindowExtEx( dc->hSelf, ptWindowExt.cx, ptWindowExt.cy, NULL );
|
dc->Dc_Attr.szlWindowExt = ptWindowExt;
|
||||||
NtGdiSetWindowOrgEx( dc->hSelf, ptWindowOrg.x, ptWindowOrg.y, NULL );
|
dc->Dc_Attr.ptlWindowOrg = ptWindowOrg;
|
||||||
|
|
||||||
/* Go to GM_ADVANCED temporarily to restore the world transform */
|
/* Go to GM_ADVANCED temporarily to restore the world transform */
|
||||||
graphicsMode = NtGdiGetGraphicsMode( dc->hSelf );
|
graphicsMode = dc->Dc_Attr.iGraphicsMode;
|
||||||
NtGdiSetGraphicsMode( dc->hSelf, GM_ADVANCED );
|
dc->Dc_Attr.iGraphicsMode = GM_ADVANCED;
|
||||||
NtGdiModifyWorldTransform( dc->hSelf, &xform, MWT_MAX+1 );
|
IntGdiModifyWorldTransform( dc, &xform, MWT_MAX+1 );
|
||||||
NtGdiSetGraphicsMode( dc->hSelf, graphicsMode );
|
dc->Dc_Attr.iGraphicsMode = graphicsMode;
|
||||||
|
// DCU_UpdateUserXForms(dc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED );
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1623,7 +1627,7 @@ end:
|
||||||
IntDPtoLP(dc, &pt, 1);
|
IntDPtoLP(dc, &pt, 1);
|
||||||
IntGdiMoveToEx(dc, pt.x, pt.y, NULL);
|
IntGdiMoveToEx(dc, pt.x, pt.y, NULL);
|
||||||
}
|
}
|
||||||
|
DCU_UpdateUserXForms(dc, WORLD_TO_PAGE_IDENTITY|DEVICE_TO_WORLD_INVALID|WORLD_XFORM_CHANGED );
|
||||||
DPRINT("Leave %s, ret=%d\n", __FUNCTION__, ret);
|
DPRINT("Leave %s, ret=%d\n", __FUNCTION__, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2524,13 +2524,11 @@ NtGdiOffsetRgn(HRGN hRgn,
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
FASTCALL
|
||||||
NtGdiPaintRgn(HDC hDC,
|
IntGdiPaintRgn(PDC dc, HRGN hRgn)
|
||||||
HRGN hRgn)
|
|
||||||
{
|
{
|
||||||
//RECT box;
|
//RECT box;
|
||||||
HRGN tmpVisRgn; //, prevVisRgn;
|
HRGN tmpVisRgn; //, prevVisRgn;
|
||||||
DC *dc = DC_LockDc(hDC);
|
|
||||||
PROSRGNDATA visrgn;
|
PROSRGNDATA visrgn;
|
||||||
CLIPOBJ* ClipRegion;
|
CLIPOBJ* ClipRegion;
|
||||||
BOOL bRet = FALSE;
|
BOOL bRet = FALSE;
|
||||||
|
@ -2595,10 +2593,23 @@ NtGdiPaintRgn(HDC hDC,
|
||||||
NtGdiDeleteObject( tmpVisRgn );
|
NtGdiDeleteObject( tmpVisRgn );
|
||||||
|
|
||||||
// Fill the region
|
// Fill the region
|
||||||
DC_UnlockDc( dc );
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL
|
||||||
|
STDCALL
|
||||||
|
NtGdiPaintRgn(HDC hDC,
|
||||||
|
HRGN hRgn)
|
||||||
|
{
|
||||||
|
DC *dc = DC_LockDc(hDC);
|
||||||
|
|
||||||
|
BOOL Ret = IntGdiPaintRgn(dc, hRgn);
|
||||||
|
|
||||||
|
DC_UnlockDc( dc );
|
||||||
|
return Ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
STDCALL
|
STDCALL
|
||||||
NtGdiPtInRegion(HRGN hRgn,
|
NtGdiPtInRegion(HRGN hRgn,
|
||||||
|
|
|
@ -698,7 +698,6 @@ NtGdiSetDIBits 7
|
||||||
NtGdiSetEnhMetaFileBits 2
|
NtGdiSetEnhMetaFileBits 2
|
||||||
NtGdiSetGraphicsMode 2
|
NtGdiSetGraphicsMode 2
|
||||||
NtGdiSetICMProfile 2
|
NtGdiSetICMProfile 2
|
||||||
NtGdiSetMapMode 2
|
|
||||||
NtGdiSetMapperFlags 2
|
NtGdiSetMapperFlags 2
|
||||||
NtGdiSetPaletteEntries 4
|
NtGdiSetPaletteEntries 4
|
||||||
NtGdiSetPixelV 4
|
NtGdiSetPixelV 4
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue