mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:25:39 +00:00
Update OffsetClipRgn, IntersectClipRect, GetRgnBox, moved SetDIBitsToDevice from stubs and misc changes. Properly implement EngGetDriverName and EngGetPrinterDataFileName.
svn path=/trunk/; revision=33030
This commit is contained in:
parent
96f8e3dc83
commit
3c7ef0d991
4 changed files with 131 additions and 72 deletions
|
@ -436,7 +436,7 @@ GetSystemPaletteUse@4=NtGdiGetSystemPaletteUse@4
|
||||||
GetTextAlign@4
|
GetTextAlign@4
|
||||||
GetTextCharacterExtra@4
|
GetTextCharacterExtra@4
|
||||||
GetTextCharset@4
|
GetTextCharset@4
|
||||||
GetTextCharsetInfo@12
|
GetTextCharsetInfo@12=NtGdiGetTextCharsetInfo@12
|
||||||
GetTextColor@4
|
GetTextColor@4
|
||||||
GetTextExtentExPointA@28
|
GetTextExtentExPointA@28
|
||||||
GetTextExtentExPointI@28
|
GetTextExtentExPointI@28
|
||||||
|
|
|
@ -46,44 +46,6 @@ StretchDIBits(HDC hdc,
|
||||||
nSrcWidth, nSrcHeight, (LPBYTE)lpBits, (LPBITMAPINFO)lpBitsInfo, (DWORD)iUsage, dwRop, 0, 0, NULL);
|
nSrcWidth, nSrcHeight, (LPBYTE)lpBits, (LPBITMAPINFO)lpBitsInfo, (DWORD)iUsage, dwRop, 0, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @implemented
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
INT
|
|
||||||
STDCALL
|
|
||||||
SetDIBitsToDevice(
|
|
||||||
HDC hDC,
|
|
||||||
int XDest,
|
|
||||||
int YDest,
|
|
||||||
DWORD Width,
|
|
||||||
DWORD Height,
|
|
||||||
int XSrc,
|
|
||||||
int YSrc,
|
|
||||||
UINT StartScan,
|
|
||||||
UINT ScanLines,
|
|
||||||
CONST VOID *Bits,
|
|
||||||
CONST BITMAPINFO *lpbmi,
|
|
||||||
UINT ColorUse)
|
|
||||||
{
|
|
||||||
return NtGdiSetDIBitsToDeviceInternal(hDC,
|
|
||||||
XDest,
|
|
||||||
YDest,
|
|
||||||
Width,
|
|
||||||
Height,
|
|
||||||
XSrc,
|
|
||||||
YSrc,
|
|
||||||
StartScan,
|
|
||||||
ScanLines,
|
|
||||||
(LPBYTE)Bits,
|
|
||||||
(LPBITMAPINFO)lpbmi,
|
|
||||||
ColorUse,
|
|
||||||
lpbmi->bmiHeader.biSizeImage,
|
|
||||||
lpbmi->bmiHeader.biSize,
|
|
||||||
FALSE,
|
|
||||||
NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -1977,17 +1939,6 @@ CreateBitmap(INT Width,
|
||||||
return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
|
return NtGdiCreateBitmap(Width, Height, Planes, BitsPixel, (LPBYTE) pUnsafeBits);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @unimplemented
|
|
||||||
*/
|
|
||||||
LPWSTR STDCALL
|
|
||||||
EngGetDriverName(HDEV hdev)
|
|
||||||
{
|
|
||||||
UNIMPLEMENTED;
|
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @unimplemented
|
||||||
*/
|
*/
|
||||||
|
@ -2179,7 +2130,6 @@ STDCALL
|
||||||
GetClipBox(HDC hdc,
|
GetClipBox(HDC hdc,
|
||||||
LPRECT lprc)
|
LPRECT lprc)
|
||||||
{
|
{
|
||||||
/* FIXME some part need be done in user mode */
|
|
||||||
return NtGdiGetAppClipBox(hdc, lprc);
|
return NtGdiGetAppClipBox(hdc, lprc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2231,8 +2181,25 @@ STDCALL
|
||||||
GetRgnBox(HRGN hrgn,
|
GetRgnBox(HRGN hrgn,
|
||||||
LPRECT prcOut)
|
LPRECT prcOut)
|
||||||
{
|
{
|
||||||
/* FIXME some stuff need be done in user mode */
|
#if 0
|
||||||
return NtGdiGetRgnBox(hrgn, prcOut);
|
PRGN_ATTR Rgn_Attr;
|
||||||
|
if (!GdiGetHandleUserData((HGDIOBJ) hRgn, GDI_OBJECT_TYPE_REGION, (PVOID) &Rgn_Attr))
|
||||||
|
return NtGdiGetRgnBox(hrgn, prcOut);
|
||||||
|
if (Rgn_Attr->Flags == NULLREGION)
|
||||||
|
{
|
||||||
|
prcOut->left = 0;
|
||||||
|
prcOut->top = 0;
|
||||||
|
prcOut->right = 0;
|
||||||
|
prcOut->bottom = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (Rgn_Attr->Flags != SIMPLEREGION) return NtGdiGetRgnBox(hrgn, prcOut);
|
||||||
|
*prcOut = Rgn_Attr->Rect;
|
||||||
|
}
|
||||||
|
return Rgn_Attr->Flags;
|
||||||
|
#endif
|
||||||
|
return NtGdiGetRgnBox(hrgn, prcOut);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2250,19 +2217,9 @@ OffsetRgn( HRGN hrgn,
|
||||||
return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
|
return NtGdiOffsetRgn(hrgn,nXOffset,nYOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
INT
|
* @implemented
|
||||||
STDCALL
|
*/
|
||||||
GetTextCharsetInfo(HDC hdc,
|
|
||||||
LPFONTSIGNATURE lpSig,
|
|
||||||
DWORD dwFlags)
|
|
||||||
{
|
|
||||||
/* FIXME some part are done in user mode */
|
|
||||||
return NtGdiGetTextCharsetInfo(hdc, lpSig, dwFlags);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INT
|
INT
|
||||||
STDCALL
|
STDCALL
|
||||||
IntersectClipRect(HDC hdc,
|
IntersectClipRect(HDC hdc,
|
||||||
|
@ -2271,18 +2228,59 @@ IntersectClipRect(HDC hdc,
|
||||||
int nRightRect,
|
int nRightRect,
|
||||||
int nBottomRect)
|
int nBottomRect)
|
||||||
{
|
{
|
||||||
/* FIXME some part are done in user mode */
|
#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_IntersectClipRect( hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PLDC pLDC = GdiGetLDC(hdc);
|
||||||
|
if ( pLDC )
|
||||||
|
{
|
||||||
|
if (pLDC->iType != LDC_EMFLDC || EMFDRV_IntersectClipRect( hdc, nLeftRect, nTopRect, nRightRect, nBottomRect))
|
||||||
|
return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
return NtGdiIntersectClipRect(hdc, nLeftRect, nTopRect, nRightRect, nBottomRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
INT
|
INT
|
||||||
STDCALL
|
STDCALL
|
||||||
OffsetClipRgn(HDC hdc,
|
OffsetClipRgn(HDC hdc,
|
||||||
int nXOffset,
|
int nXOffset,
|
||||||
int nYOffset)
|
int nYOffset)
|
||||||
{
|
{
|
||||||
/* FIXME some part are done in user mode */
|
#if 0
|
||||||
return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
|
// 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_OffsetClipRgn( hdc, nXOffset, nYOffset );
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PLDC pLDC = GdiGetLDC(hdc);
|
||||||
|
if ( !pLDC )
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_INVALID_HANDLE);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (pLDC->iType == LDC_EMFLDC && !EMFDRV_OffsetClipRgn( hdc, nXOffset, nYOffset ))
|
||||||
|
return 0;
|
||||||
|
return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return NtGdiOffsetClipRgn( hdc, nXOffset, nYOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -381,10 +381,49 @@ SetDIBits(HDC hDC,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( newDC )
|
if ( newDC )
|
||||||
DeleteDC((HDC)SavehDC);
|
DeleteDC(SavehDC);
|
||||||
else
|
else
|
||||||
RestoreDC((HDC)SavehDC, -1);
|
RestoreDC(SavehDC, -1);
|
||||||
|
|
||||||
return LinesCopied;
|
return LinesCopied;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
INT
|
||||||
|
STDCALL
|
||||||
|
SetDIBitsToDevice(
|
||||||
|
HDC hDC,
|
||||||
|
int XDest,
|
||||||
|
int YDest,
|
||||||
|
DWORD Width,
|
||||||
|
DWORD Height,
|
||||||
|
int XSrc,
|
||||||
|
int YSrc,
|
||||||
|
UINT StartScan,
|
||||||
|
UINT ScanLines,
|
||||||
|
CONST VOID *Bits,
|
||||||
|
CONST BITMAPINFO *lpbmi,
|
||||||
|
UINT ColorUse)
|
||||||
|
{
|
||||||
|
return NtGdiSetDIBitsToDeviceInternal(hDC,
|
||||||
|
XDest,
|
||||||
|
YDest,
|
||||||
|
Width,
|
||||||
|
Height,
|
||||||
|
XSrc,
|
||||||
|
YSrc,
|
||||||
|
StartScan,
|
||||||
|
ScanLines,
|
||||||
|
(LPBYTE)Bits,
|
||||||
|
(LPBITMAPINFO)lpbmi,
|
||||||
|
ColorUse,
|
||||||
|
lpbmi->bmiHeader.biSizeImage,
|
||||||
|
lpbmi->bmiHeader.biSize,
|
||||||
|
FALSE,
|
||||||
|
NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -147,13 +147,35 @@ EngGetCurrentCodePage( OUT PUSHORT OemCodePage,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @implemented
|
||||||
|
*/
|
||||||
|
LPWSTR STDCALL
|
||||||
|
EngGetDriverName(HDEV hdev)
|
||||||
|
{
|
||||||
|
// DHPDEV from NtGdiGetDhpdev must be from print driver.
|
||||||
|
PDRIVER_INFO_2W pDrvInfo2 = (PDRIVER_INFO_2W)NtGdiGetDhpdev(hdev);
|
||||||
|
if (pDrvInfo2->cVersion != 0xFEDCBA98 ) // Init mask for ver 2+
|
||||||
|
{
|
||||||
|
PDRIVER_INFO_1W pDrvInfo1 = (PDRIVER_INFO_1W) pDrvInfo2;
|
||||||
|
return pDrvInfo1->pName;
|
||||||
|
}
|
||||||
|
return pDrvInfo2->pDriverPath;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
LPWSTR STDCALL
|
LPWSTR STDCALL
|
||||||
EngGetPrinterDataFileName(HDEV hdev)
|
EngGetPrinterDataFileName(HDEV hdev)
|
||||||
{
|
{
|
||||||
return EngGetDriverName(hdev);
|
PDRIVER_INFO_2W pDrvInfo2 = (PDRIVER_INFO_2W)NtGdiGetDhpdev(hdev);
|
||||||
|
if (pDrvInfo2->cVersion != 0xFEDCBA98 )
|
||||||
|
{
|
||||||
|
PDRIVER_INFO_1W pDrvInfo1 = (PDRIVER_INFO_1W) pDrvInfo2;
|
||||||
|
return pDrvInfo1->pName;
|
||||||
|
}
|
||||||
|
return pDrvInfo2->pDataFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue