mirror of
https://github.com/reactos/reactos.git
synced 2025-06-27 22:49:43 +00:00
[FORMATTING]
- Reformat/refactor some code. No changes. svn path=/trunk/; revision=63919
This commit is contained in:
parent
7cd7bc2b97
commit
ea6842d69a
1 changed files with 325 additions and 349 deletions
|
@ -13,24 +13,37 @@
|
|||
* 11/16/1999 (RJJ) lifted from wine
|
||||
*/
|
||||
|
||||
INT FASTCALL DIB_BitmapInfoSize(const BITMAPINFO * info, WORD coloruse, BOOL max)
|
||||
INT
|
||||
FASTCALL DIB_BitmapInfoSize(
|
||||
const BITMAPINFO * info,
|
||||
WORD coloruse,
|
||||
BOOL max)
|
||||
{
|
||||
unsigned int colors, size, masks = 0;
|
||||
|
||||
if (info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
|
||||
{
|
||||
const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *) info;
|
||||
colors = (core->bcBitCount <= 8) ? 1 << core->bcBitCount : 0;
|
||||
return sizeof(BITMAPCOREHEADER) + colors *
|
||||
((coloruse == DIB_RGB_COLORS) ? sizeof(RGBTRIPLE) : sizeof(WORD));
|
||||
size = sizeof(BITMAPCOREHEADER);
|
||||
if (core->bcBitCount <= 8)
|
||||
{
|
||||
colors = 1 << core->bcBitCount;
|
||||
if (coloruse == DIB_RGB_COLORS)
|
||||
size += colors * sizeof(RGBTRIPLE);
|
||||
else
|
||||
size += colors * sizeof(WORD);
|
||||
}
|
||||
return size;
|
||||
}
|
||||
else /* assume BITMAPINFOHEADER */
|
||||
{
|
||||
colors = max ? 1 << info->bmiHeader.biBitCount : info->bmiHeader.biClrUsed;
|
||||
if (colors > 256) colors = 256;
|
||||
colors = max ? (1 << info->bmiHeader.biBitCount) : info->bmiHeader.biClrUsed;
|
||||
if (colors > 256)
|
||||
colors = 256;
|
||||
if (!colors && (info->bmiHeader.biBitCount <= 8))
|
||||
colors = 1 << info->bmiHeader.biBitCount;
|
||||
if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
|
||||
if (info->bmiHeader.biCompression == BI_BITFIELDS)
|
||||
masks = 3;
|
||||
size = max(info->bmiHeader.biSize, sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD));
|
||||
return size + colors * ((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD));
|
||||
}
|
||||
|
@ -43,22 +56,28 @@ INT FASTCALL DIB_BitmapInfoSize(const BITMAPINFO * info, WORD coloruse, BOOL max
|
|||
*/
|
||||
UINT
|
||||
FASTCALL
|
||||
DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines )
|
||||
DIB_BitmapMaxBitsSize(
|
||||
PBITMAPINFO Info,
|
||||
UINT ScanLines)
|
||||
{
|
||||
UINT Ret;
|
||||
|
||||
if (!Info) return 0;
|
||||
if (!Info)
|
||||
return 0;
|
||||
|
||||
if (Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
|
||||
{
|
||||
PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER) Info;
|
||||
Ret = WIDTH_BYTES_ALIGN32(Core->bcWidth * Core->bcPlanes, Core->bcBitCount) * ScanLines;
|
||||
Ret = WIDTH_BYTES_ALIGN32(Core->bcWidth * Core->bcPlanes,
|
||||
Core->bcBitCount) * ScanLines;
|
||||
}
|
||||
else /* assume BITMAPINFOHEADER */
|
||||
{
|
||||
if (!(Info->bmiHeader.biCompression) || (Info->bmiHeader.biCompression == BI_BITFIELDS))
|
||||
if ((Info->bmiHeader.biCompression == BI_RGB) || (Info->bmiHeader.biCompression == BI_BITFIELDS))
|
||||
{
|
||||
Ret = WIDTH_BYTES_ALIGN32(Info->bmiHeader.biWidth * Info->bmiHeader.biPlanes, Info->bmiHeader.biBitCount) * ScanLines;
|
||||
Ret = WIDTH_BYTES_ALIGN32(
|
||||
Info->bmiHeader.biWidth * Info->bmiHeader.biPlanes,
|
||||
Info->bmiHeader.biBitCount) * ScanLines;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -75,7 +94,8 @@ DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines )
|
|||
*/
|
||||
INT
|
||||
WINAPI
|
||||
DIB_GetBitmapInfo(const BITMAPINFOHEADER *header,
|
||||
DIB_GetBitmapInfo(
|
||||
const BITMAPINFOHEADER *header,
|
||||
PLONG width,
|
||||
PLONG height,
|
||||
PWORD planes,
|
||||
|
@ -138,22 +158,28 @@ DIB_GetBitmapInfo(const BITMAPINFOHEADER *header,
|
|||
*/
|
||||
int
|
||||
WINAPI
|
||||
GdiGetBitmapBitsSize(BITMAPINFO *lpbmi)
|
||||
GdiGetBitmapBitsSize(
|
||||
BITMAPINFO *lpbmi)
|
||||
{
|
||||
UINT Ret;
|
||||
|
||||
if (!lpbmi) return 0;
|
||||
if (!lpbmi)
|
||||
return 0;
|
||||
|
||||
if (lpbmi->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
|
||||
{
|
||||
PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER) lpbmi;
|
||||
Ret = WIDTH_BYTES_ALIGN32(Core->bcWidth * Core->bcPlanes, Core->bcBitCount) * Core->bcHeight;
|
||||
Ret =
|
||||
WIDTH_BYTES_ALIGN32(Core->bcWidth * Core->bcPlanes,
|
||||
Core->bcBitCount) * Core->bcHeight;
|
||||
}
|
||||
else /* assume BITMAPINFOHEADER */
|
||||
{
|
||||
if (!(lpbmi->bmiHeader.biCompression) || (lpbmi->bmiHeader.biCompression == BI_BITFIELDS))
|
||||
{
|
||||
Ret = WIDTH_BYTES_ALIGN32(lpbmi->bmiHeader.biWidth * lpbmi->bmiHeader.biPlanes, lpbmi->bmiHeader.biBitCount) * abs(lpbmi->bmiHeader.biHeight);
|
||||
Ret = WIDTH_BYTES_ALIGN32(
|
||||
lpbmi->bmiHeader.biWidth * lpbmi->bmiHeader.biPlanes,
|
||||
lpbmi->bmiHeader.biBitCount) * abs(lpbmi->bmiHeader.biHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -166,7 +192,8 @@ GdiGetBitmapBitsSize(BITMAPINFO *lpbmi)
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HBITMAP WINAPI
|
||||
HBITMAP
|
||||
WINAPI
|
||||
CreateDIBSection(
|
||||
HDC hDC,
|
||||
CONST BITMAPINFO *BitmapInfo,
|
||||
|
@ -180,30 +207,27 @@ CreateDIBSection(
|
|||
HBITMAP hBitmap = NULL;
|
||||
PVOID bmBits = NULL;
|
||||
|
||||
pConvertedInfo = ConvertBitmapInfo(BitmapInfo, Usage,
|
||||
&ConvertedInfoSize, FALSE);
|
||||
pConvertedInfo = ConvertBitmapInfo(BitmapInfo, Usage, &ConvertedInfoSize,
|
||||
FALSE);
|
||||
|
||||
if (pConvertedInfo)
|
||||
{
|
||||
// Verify header due to converted may == info.
|
||||
if (pConvertedInfo->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER))
|
||||
{
|
||||
if ( pConvertedInfo->bmiHeader.biCompression == BI_JPEG ||
|
||||
pConvertedInfo->bmiHeader.biCompression == BI_PNG )
|
||||
if (pConvertedInfo->bmiHeader.biCompression == BI_JPEG
|
||||
|| pConvertedInfo->bmiHeader.biCompression == BI_PNG)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
bmBits = Bits;
|
||||
hBitmap = NtGdiCreateDIBSection( hDC,
|
||||
hSection,
|
||||
dwOffset,
|
||||
pConvertedInfo,
|
||||
Usage,
|
||||
ConvertedInfoSize,
|
||||
0, // fl
|
||||
hBitmap = NtGdiCreateDIBSection(hDC, hSection, dwOffset, pConvertedInfo, Usage,
|
||||
ConvertedInfoSize, 0, // fl
|
||||
0, // dwColorSpace
|
||||
&bmBits);
|
||||
|
||||
if (BitmapInfo != pConvertedInfo)
|
||||
RtlFreeHeap(RtlGetProcessHeap(), 0, pConvertedInfo);
|
||||
|
||||
|
@ -213,18 +237,19 @@ CreateDIBSection(
|
|||
}
|
||||
}
|
||||
|
||||
if (Bits) *Bits = bmBits;
|
||||
if (Bits)
|
||||
*Bits = bmBits;
|
||||
|
||||
return hBitmap;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
WINAPI
|
||||
BitBlt(HDC hdcDest, /* handle to destination DC */
|
||||
BitBlt(
|
||||
HDC hdcDest, /* handle to destination DC */
|
||||
int nXOriginDest, /* x-coord of destination upper-left corner */
|
||||
int nYOriginDest, /* y-coord of destination upper-left corner */
|
||||
int nWidthDest, /* width of destination rectangle */
|
||||
|
@ -240,23 +265,15 @@ BitBlt(HDC hdcDest, /* handle to destination DC */
|
|||
return PatBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, dwRop);
|
||||
}
|
||||
|
||||
return NtGdiBitBlt(hdcDest,
|
||||
nXOriginDest,
|
||||
nYOriginDest,
|
||||
nWidthDest,
|
||||
nHeightDest,
|
||||
hdcSrc,
|
||||
nXSrc,
|
||||
nYSrc,
|
||||
dwRop,
|
||||
0,
|
||||
0);
|
||||
return NtGdiBitBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, hdcSrc, nXSrc,
|
||||
nYSrc, dwRop, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
BOOL WINAPI
|
||||
BOOL
|
||||
WINAPI
|
||||
StretchBlt(
|
||||
HDC hdcDest, /* handle to destination DC */
|
||||
int nXOriginDest, /* x-coord of destination upper-left corner */
|
||||
|
@ -273,20 +290,21 @@ StretchBlt(
|
|||
{
|
||||
if ((nWidthDest != nWidthSrc) || (nHeightDest != nHeightSrc))
|
||||
{
|
||||
return NtGdiStretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest,
|
||||
nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc,
|
||||
nWidthSrc, nHeightSrc, dwRop, 0);
|
||||
return NtGdiStretchBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, hdcSrc,
|
||||
nXOriginSrc, nYOriginSrc, nWidthSrc, nHeightSrc, dwRop, 0);
|
||||
}
|
||||
|
||||
return NtGdiBitBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest,
|
||||
nHeightDest, hdcSrc, nXOriginSrc, nYOriginSrc, dwRop, 0, 0);
|
||||
return NtGdiBitBlt(hdcDest, nXOriginDest, nYOriginDest, nWidthDest, nHeightDest, hdcSrc,
|
||||
nXOriginSrc, nYOriginSrc, dwRop, 0, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HBITMAP WINAPI
|
||||
CreateBitmap(INT Width,
|
||||
HBITMAP
|
||||
WINAPI
|
||||
CreateBitmap(
|
||||
INT Width,
|
||||
INT Height,
|
||||
UINT Planes,
|
||||
UINT BitsPixel,
|
||||
|
@ -306,21 +324,18 @@ CreateBitmap(INT Width,
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
HBITMAP WINAPI
|
||||
CreateBitmapIndirect(const BITMAP *pbm)
|
||||
HBITMAP
|
||||
WINAPI
|
||||
CreateBitmapIndirect(
|
||||
const BITMAP *pbm)
|
||||
{
|
||||
HBITMAP bitmap = NULL;
|
||||
|
||||
/* Note windows xp/2003 does not check if pbm is NULL or not */
|
||||
if ( (pbm->bmWidthBytes != 0) &&
|
||||
(!(pbm->bmWidthBytes & 1)) )
|
||||
if ((pbm->bmWidthBytes != 0) && (!(pbm->bmWidthBytes & 1)))
|
||||
|
||||
{
|
||||
|
||||
bitmap = CreateBitmap(pbm->bmWidth,
|
||||
pbm->bmHeight,
|
||||
pbm->bmPlanes,
|
||||
pbm->bmBitsPixel,
|
||||
bitmap = CreateBitmap(pbm->bmWidth, pbm->bmHeight, pbm->bmPlanes, pbm->bmBitsPixel,
|
||||
pbm->bmBits);
|
||||
}
|
||||
else
|
||||
|
@ -331,7 +346,8 @@ CreateBitmapIndirect(const BITMAP *pbm)
|
|||
return bitmap;
|
||||
}
|
||||
|
||||
HBITMAP WINAPI
|
||||
HBITMAP
|
||||
WINAPI
|
||||
CreateDiscardableBitmap(
|
||||
HDC hDC,
|
||||
INT Width,
|
||||
|
@ -340,8 +356,8 @@ CreateDiscardableBitmap(
|
|||
return CreateCompatibleBitmap(hDC, Width, Height);
|
||||
}
|
||||
|
||||
|
||||
HBITMAP WINAPI
|
||||
HBITMAP
|
||||
WINAPI
|
||||
CreateCompatibleBitmap(
|
||||
HDC hDC,
|
||||
INT Width,
|
||||
|
@ -387,7 +403,6 @@ CreateCompatibleBitmap(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
INT
|
||||
WINAPI
|
||||
GetDIBits(
|
||||
|
@ -416,8 +431,8 @@ GetDIBits(
|
|||
{
|
||||
if (lpbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER))
|
||||
{
|
||||
if ( lpbmi->bmiHeader.biCompression == BI_JPEG ||
|
||||
lpbmi->bmiHeader.biCompression == BI_PNG )
|
||||
if (lpbmi->bmiHeader.biCompression == BI_JPEG
|
||||
|| lpbmi->bmiHeader.biCompression == BI_PNG)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
@ -425,15 +440,8 @@ GetDIBits(
|
|||
}
|
||||
}
|
||||
|
||||
return NtGdiGetDIBitsInternal(hDC,
|
||||
hbmp,
|
||||
uStartScan,
|
||||
cScanLines,
|
||||
lpvBits,
|
||||
lpbmi,
|
||||
uUsage,
|
||||
cjBmpScanSize,
|
||||
cjInfoSize);
|
||||
return NtGdiGetDIBitsInternal(hDC, hbmp, uStartScan, cScanLines, lpvBits, lpbmi, uUsage,
|
||||
cjBmpScanSize, cjInfoSize);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -441,7 +449,8 @@ GetDIBits(
|
|||
*/
|
||||
HBITMAP
|
||||
WINAPI
|
||||
CreateDIBitmap( HDC hDC,
|
||||
CreateDIBitmap(
|
||||
HDC hDC,
|
||||
const BITMAPINFOHEADER *Header,
|
||||
DWORD Init,
|
||||
LPCVOID Bits,
|
||||
|
@ -488,7 +497,8 @@ CreateDIBitmap( HDC hDC,
|
|||
}
|
||||
|
||||
/* Check if the Compr is incompatible */
|
||||
if ((compr == BI_JPEG) || (compr == BI_PNG) || (compr == BI_BITFIELDS)) return 0;
|
||||
if ((compr == BI_JPEG) || (compr == BI_PNG) || (compr == BI_BITFIELDS))
|
||||
return 0;
|
||||
|
||||
/* Only DIB_RGB_COLORS (0), DIB_PAL_COLORS (1) and 2 are valid. */
|
||||
if (ColorUse > DIB_PAL_COLORS + 1)
|
||||
|
@ -498,7 +508,8 @@ CreateDIBitmap( HDC hDC,
|
|||
}
|
||||
|
||||
/* Negative width is not allowed */
|
||||
if (width < 0) return 0;
|
||||
if (width < 0)
|
||||
return 0;
|
||||
|
||||
/* Top-down DIBs have a negative height. */
|
||||
height = abs(height);
|
||||
|
@ -527,23 +538,15 @@ CreateDIBitmap( HDC hDC,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
DPRINT("pBMI %p, Size bpp %u, dibsize %d, Conv %u, BSS %u\n", Data,bpp,dibsize,InfoSize,cjBmpScanSize);
|
||||
DPRINT("pBMI %p, Size bpp %u, dibsize %d, Conv %u, BSS %u\n", Data, bpp, dibsize, InfoSize,
|
||||
cjBmpScanSize);
|
||||
|
||||
if (!width || !height)
|
||||
hBmp = GetStockObject(DEFAULT_BITMAP);
|
||||
else
|
||||
{
|
||||
hBmp = NtGdiCreateDIBitmapInternal(hDC,
|
||||
width,
|
||||
height,
|
||||
Init,
|
||||
(LPBYTE)Bits,
|
||||
(LPBITMAPINFO)Data,
|
||||
ColorUse,
|
||||
InfoSize,
|
||||
cjBmpScanSize,
|
||||
0,
|
||||
0);
|
||||
hBmp = NtGdiCreateDIBitmapInternal(hDC, width, height, Init, (LPBYTE) Bits,
|
||||
(LPBITMAPINFO) Data, ColorUse, InfoSize, cjBmpScanSize, 0, 0);
|
||||
}
|
||||
return hBmp;
|
||||
}
|
||||
|
@ -553,7 +556,8 @@ CreateDIBitmap( HDC hDC,
|
|||
*/
|
||||
INT
|
||||
WINAPI
|
||||
SetDIBits(HDC hDC,
|
||||
SetDIBits(
|
||||
HDC hDC,
|
||||
HBITMAP hBitmap,
|
||||
UINT uStartScan,
|
||||
UINT cScanLines,
|
||||
|
@ -575,7 +579,8 @@ SetDIBits(HDC hDC,
|
|||
{
|
||||
if (lpbmi->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER))
|
||||
{
|
||||
if ( lpbmi->bmiHeader.biCompression == BI_JPEG || lpbmi->bmiHeader.biCompression == BI_PNG )
|
||||
if (lpbmi->bmiHeader.biCompression == BI_JPEG
|
||||
|| lpbmi->bmiHeader.biCompression == BI_PNG)
|
||||
{
|
||||
SetLastError(ERROR_INVALID_PARAMETER);
|
||||
return 0;
|
||||
|
@ -588,7 +593,8 @@ SetDIBits(HDC hDC,
|
|||
if (!hDCc) // No DC associated with bitmap, Clone or Create one.
|
||||
{
|
||||
nhDC = CreateCompatibleDC(hDC);
|
||||
if ( !nhDC ) return 0;
|
||||
if (!nhDC)
|
||||
return 0;
|
||||
newDC = TRUE;
|
||||
SavehDC = nhDC;
|
||||
}
|
||||
|
@ -614,20 +620,11 @@ SetDIBits(HDC hDC,
|
|||
dwHeight = abs(lpbmi->bmiHeader.biHeight);
|
||||
}
|
||||
|
||||
LinesCopied = SetDIBitsToDevice(SavehDC,
|
||||
0,
|
||||
0,
|
||||
dwWidth,
|
||||
dwHeight,
|
||||
0,
|
||||
0,
|
||||
uStartScan,
|
||||
cScanLines,
|
||||
(void *)lpvBits,
|
||||
(LPBITMAPINFO)lpbmi,
|
||||
fuColorUse);
|
||||
LinesCopied = SetDIBitsToDevice(SavehDC, 0, 0, dwWidth, dwHeight, 0, 0, uStartScan,
|
||||
cScanLines, (void *) lpvBits, (LPBITMAPINFO) lpbmi, fuColorUse);
|
||||
|
||||
if ( hDC ) SelectPalette(SavehDC, hPal, FALSE);
|
||||
if (hDC)
|
||||
SelectPalette(SavehDC, hPal, FALSE);
|
||||
|
||||
SelectObject(SavehDC, hOldBitmap);
|
||||
}
|
||||
|
@ -674,8 +671,8 @@ SetDIBitsToDevice(
|
|||
if (ColorUse && ColorUse != DIB_PAL_COLORS && ColorUse != DIB_PAL_COLORS + 1)
|
||||
return 0;
|
||||
|
||||
pConvertedInfo = ConvertBitmapInfo(lpbmi, ColorUse,
|
||||
&ConvertedInfoSize, FALSE);
|
||||
pConvertedInfo = ConvertBitmapInfo(lpbmi, ColorUse, &ConvertedInfoSize,
|
||||
FALSE);
|
||||
if (!pConvertedInfo)
|
||||
return 0;
|
||||
|
||||
|
@ -742,7 +739,8 @@ SetDIBitsToDevice(
|
|||
{
|
||||
// We don't die, we continue on with a allocated safe pointer to kernel
|
||||
// space.....
|
||||
DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %p or Bits: %p & Size: %u\n",pConvertedInfo,Bits,cjBmpScanSize);
|
||||
DPRINT1("SetDIBitsToDevice fail to read BitMapInfo: %p or Bits: %p & Size: %u\n",
|
||||
pConvertedInfo, Bits, cjBmpScanSize);
|
||||
}
|
||||
DPRINT("SetDIBitsToDevice Allocate Bits %u!!!\n", cjBmpScanSize);
|
||||
}
|
||||
|
@ -759,20 +757,9 @@ SetDIBitsToDevice(
|
|||
(pConvertedInfo->bmiHeader.biCompression == BI_JPEG ||
|
||||
pConvertedInfo->bmiHeader.biCompression == BI_PNG )) )*/
|
||||
{
|
||||
LinesCopied = NtGdiSetDIBitsToDeviceInternal( hdc,
|
||||
XDest,
|
||||
YDest,
|
||||
Width,
|
||||
Height,
|
||||
XSrc,
|
||||
YSrc,
|
||||
StartScan,
|
||||
ScanLines,
|
||||
(LPBYTE)pvSafeBits,
|
||||
(LPBITMAPINFO)pConvertedInfo,
|
||||
ColorUse,
|
||||
cjBmpScanSize,
|
||||
ConvertedInfoSize,
|
||||
LinesCopied = NtGdiSetDIBitsToDeviceInternal(hdc, XDest, YDest, Width, Height, XSrc, YSrc,
|
||||
StartScan, ScanLines, (LPBYTE) pvSafeBits, (LPBITMAPINFO) pConvertedInfo, ColorUse,
|
||||
cjBmpScanSize, ConvertedInfoSize,
|
||||
TRUE,
|
||||
NULL);
|
||||
}
|
||||
|
@ -784,13 +771,13 @@ SetDIBitsToDevice(
|
|||
return LinesCopied;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
int
|
||||
WINAPI
|
||||
StretchDIBits(HDC hdc,
|
||||
StretchDIBits(
|
||||
HDC hdc,
|
||||
int XDest,
|
||||
int YDest,
|
||||
int nDestWidth,
|
||||
|
@ -860,8 +847,8 @@ StretchDIBits(HDC hdc,
|
|||
}
|
||||
}
|
||||
#endif
|
||||
pConvertedInfo = ConvertBitmapInfo(lpBitsInfo, iUsage,
|
||||
&ConvertedInfoSize, FALSE);
|
||||
pConvertedInfo = ConvertBitmapInfo(lpBitsInfo, iUsage, &ConvertedInfoSize,
|
||||
FALSE);
|
||||
if (!pConvertedInfo)
|
||||
{
|
||||
return 0;
|
||||
|
@ -888,7 +875,8 @@ StretchDIBits(HDC hdc,
|
|||
{
|
||||
// We don't die, we continue on with a allocated safe pointer to kernel
|
||||
// space.....
|
||||
DPRINT1("StretchDIBits fail to read BitMapInfo: %p or Bits: %p & Size: %u\n",pConvertedInfo,lpBits,cjBmpScanSize);
|
||||
DPRINT1("StretchDIBits fail to read BitMapInfo: %p or Bits: %p & Size: %u\n",
|
||||
pConvertedInfo, lpBits, cjBmpScanSize);
|
||||
}
|
||||
DPRINT("StretchDIBits Allocate Bits %u!!!\n", cjBmpScanSize);
|
||||
}
|
||||
|
@ -906,21 +894,9 @@ StretchDIBits(HDC hdc,
|
|||
(pConvertedInfo->bmiHeader.biCompression == BI_JPEG ||
|
||||
pConvertedInfo->bmiHeader.biCompression == BI_PNG )) )*/
|
||||
{
|
||||
LinesCopied = NtGdiStretchDIBitsInternal( hdc,
|
||||
XDest,
|
||||
YDest,
|
||||
nDestWidth,
|
||||
nDestHeight,
|
||||
XSrc,
|
||||
YSrc,
|
||||
nSrcWidth,
|
||||
nSrcHeight,
|
||||
pvSafeBits,
|
||||
pConvertedInfo,
|
||||
(DWORD)iUsage,
|
||||
dwRop,
|
||||
ConvertedInfoSize,
|
||||
cjBmpScanSize,
|
||||
LinesCopied = NtGdiStretchDIBitsInternal(hdc, XDest, YDest, nDestWidth, nDestHeight, XSrc,
|
||||
YSrc, nSrcWidth, nSrcHeight, pvSafeBits, pConvertedInfo, (DWORD) iUsage, dwRop,
|
||||
ConvertedInfoSize, cjBmpScanSize,
|
||||
NULL);
|
||||
}
|
||||
if (pvSafeBits)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue