Plugged in the old NtGdiSetDIBits for now. Need to investigate the problems with SaveDC and CreateCompatibleDC.

svn path=/trunk/; revision=33035
This commit is contained in:
James Tabor 2008-04-19 19:00:34 +00:00
parent 323182f872
commit 113bdc2756
4 changed files with 63 additions and 1 deletions

View file

@ -295,7 +295,7 @@ CreateDIBitmap( HDC hDC,
0);
}
#if 0
/*
* @implemented
*/
@ -387,6 +387,20 @@ SetDIBits(HDC hDC,
return LinesCopied;
}
#endif
INT
STDCALL
SetDIBits(HDC hdc,
HBITMAP hbmp,
UINT uStartScan,
UINT cScanLines,
CONST VOID *lpvBits,
CONST BITMAPINFO *lpbmi,
UINT fuColorUse)
{
return NtGdiSetDIBits(hdc, hbmp, uStartScan, cScanLines, lpvBits, lpbmi, fuColorUse);
}
/*
* @implemented

View file

@ -131,6 +131,18 @@ NtGdiSetWindowOrgEx (
LPPOINT Point
);
/* Use SetDIBitsToDevice in gdi32. */
INT
STDCALL
NtGdiSetDIBits (
HDC hDC,
HBITMAP hBitmap,
UINT StartScan,
UINT ScanLines,
CONST VOID * Bits,
CONST BITMAPINFO * bmi,
UINT ColorUse
);
#endif /* WIN32K_NTGDI_BAD_INCLUDED */

View file

@ -276,6 +276,41 @@ IntSetDIBits(
return result;
}
// Converts a DIB to a device-dependent bitmap
INT STDCALL
NtGdiSetDIBits(
HDC hDC,
HBITMAP hBitmap,
UINT StartScan,
UINT ScanLines,
CONST VOID *Bits,
CONST BITMAPINFO *bmi,
UINT ColorUse)
{
PDC Dc;
INT Ret;
Dc = DC_LockDc(hDC);
if (NULL == Dc)
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return 0;
}
if (Dc->DC_Type == DC_TYPE_INFO)
{
DC_UnlockDc(Dc);
return 0;
}
Ret = IntSetDIBits(Dc, hBitmap, StartScan, ScanLines, Bits, bmi, ColorUse);
DC_UnlockDc(Dc);
return Ret;
}
W32KAPI
INT
APIENTRY

View file

@ -674,6 +674,7 @@ NtGdiDrawStream 3
#
#
#ReactOS specific syscalls
NtGdiSetDIBits 7
NtGdiSetViewportExtEx 4
NtGdiSetViewportOrgEx 4
NtGdiSetWindowExtEx 4