mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
[GDI32]
Move PatBlt, GetROP2 and SetROP2 to appropriate source files svn path=/trunk/; revision=65878
This commit is contained in:
parent
45309fa8bf
commit
cab100d983
3 changed files with 88 additions and 88 deletions
|
@ -258,94 +258,6 @@ CreateBrushIndirect(
|
|||
return hBrush;
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
PatBlt(HDC hdc,
|
||||
int nXLeft,
|
||||
int nYLeft,
|
||||
int nWidth,
|
||||
int nHeight,
|
||||
DWORD dwRop)
|
||||
{
|
||||
/* FIXME some part need be done in user mode */
|
||||
return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
PolyPatBlt(IN HDC hdc,
|
||||
IN DWORD rop4,
|
||||
IN PPOLYPATBLT pPoly,
|
||||
IN DWORD Count,
|
||||
IN DWORD Mode)
|
||||
{
|
||||
/* FIXME some part need be done in user mode */
|
||||
return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
*/
|
||||
int
|
||||
WINAPI
|
||||
GetROP2(HDC hdc)
|
||||
{
|
||||
PDC_ATTR Dc_Attr;
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return 0;
|
||||
return Dc_Attr->jROP2;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
WINAPI
|
||||
SetROP2(HDC hdc,
|
||||
int fnDrawMode)
|
||||
{
|
||||
PDC_ATTR Dc_Attr;
|
||||
INT Old_ROP2;
|
||||
|
||||
#if 0
|
||||
// Handle something other than a normal dc object.
|
||||
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
|
||||
{
|
||||
if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
|
||||
return MFDRV_SetROP2( hdc, fnDrawMode);
|
||||
else
|
||||
{
|
||||
PLDC pLDC = GdiGetLDC(hdc);
|
||||
if ( !pLDC )
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (pLDC->iType == LDC_EMFLDC)
|
||||
{
|
||||
return EMFDRV_SetROP2(( hdc, fnDrawMode);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE;
|
||||
|
||||
if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
|
||||
{
|
||||
if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY)
|
||||
{
|
||||
NtGdiFlush();
|
||||
Dc_Attr->ulDirty_ &= ~DC_MODE_DIRTY;
|
||||
}
|
||||
}
|
||||
|
||||
Old_ROP2 = Dc_Attr->jROP2;
|
||||
Dc_Attr->jROP2 = fnDrawMode;
|
||||
|
||||
return Old_ROP2;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
|
|
|
@ -1146,6 +1146,70 @@ SetBkMode(
|
|||
return iOldMode;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
*/
|
||||
int
|
||||
WINAPI
|
||||
GetROP2(HDC hdc)
|
||||
{
|
||||
PDC_ATTR Dc_Attr;
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return 0;
|
||||
return Dc_Attr->jROP2;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
WINAPI
|
||||
SetROP2(HDC hdc,
|
||||
int fnDrawMode)
|
||||
{
|
||||
PDC_ATTR Dc_Attr;
|
||||
INT Old_ROP2;
|
||||
|
||||
#if 0
|
||||
// Handle something other than a normal dc object.
|
||||
if (GDI_HANDLE_GET_TYPE(hdc) != GDI_OBJECT_TYPE_DC)
|
||||
{
|
||||
if (GDI_HANDLE_GET_TYPE(hdc) == GDI_OBJECT_TYPE_METADC)
|
||||
return MFDRV_SetROP2( hdc, fnDrawMode);
|
||||
else
|
||||
{
|
||||
PLDC pLDC = GdiGetLDC(hdc);
|
||||
if ( !pLDC )
|
||||
{
|
||||
SetLastError(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
if (pLDC->iType == LDC_EMFLDC)
|
||||
{
|
||||
return EMFDRV_SetROP2(( hdc, fnDrawMode);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!GdiGetHandleUserData((HGDIOBJ) hdc, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr)) return FALSE;
|
||||
|
||||
if (NtCurrentTeb()->GdiTebBatch.HDC == hdc)
|
||||
{
|
||||
if (Dc_Attr->ulDirty_ & DC_MODE_DIRTY)
|
||||
{
|
||||
NtGdiFlush();
|
||||
Dc_Attr->ulDirty_ &= ~DC_MODE_DIRTY;
|
||||
}
|
||||
}
|
||||
|
||||
Old_ROP2 = Dc_Attr->jROP2;
|
||||
Dc_Attr->jROP2 = fnDrawMode;
|
||||
|
||||
return Old_ROP2;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*
|
||||
|
|
|
@ -735,6 +735,30 @@ BitBlt(
|
|||
nYSrc, dwRop, 0, 0);
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
PatBlt(HDC hdc,
|
||||
int nXLeft,
|
||||
int nYLeft,
|
||||
int nWidth,
|
||||
int nHeight,
|
||||
DWORD dwRop)
|
||||
{
|
||||
/* FIXME some part need be done in user mode */
|
||||
return NtGdiPatBlt( hdc, nXLeft, nYLeft, nWidth, nHeight, dwRop);
|
||||
}
|
||||
|
||||
BOOL
|
||||
WINAPI
|
||||
PolyPatBlt(IN HDC hdc,
|
||||
IN DWORD rop4,
|
||||
IN PPOLYPATBLT pPoly,
|
||||
IN DWORD Count,
|
||||
IN DWORD Mode)
|
||||
{
|
||||
/* FIXME some part need be done in user mode */
|
||||
return NtGdiPolyPatBlt(hdc, rop4, pPoly,Count,Mode);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
|
|
Loading…
Reference in a new issue