Skip to content
Snippets Groups Projects
Commit 54e47758 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Backed out previous change (breaks with metafiles).

parent 019211f8
No related branches found
Tags wine-960606
No related merge requests found
......@@ -135,39 +135,33 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
{
DC *dc = DC_GetDCPtr( hdc );
if(!dc) return FALSE;
if (widthDst == widthSrc && heightDst == heightSrc && dwRop == SRCCOPY) {
return SetDIBitsToDevice( hdc, xDst, yDst, widthDst, heightDst,
xSrc, ySrc, 0, info->bmiHeader.biHeight,
bits, info, 0/*FIXME coloruse*/ );
}
if(dc->funcs->pStretchDIBits)
return dc->funcs->pStretchDIBits(dc, xDst, yDst, widthDst,
heightDst, xSrc, ySrc, widthSrc,
heightSrc, bits, info, wUsage,
dwRop);
else { /* use StretchBlt32 */
HBITMAP hBitmap, hOldBitmap;
HDC hdcMem;
hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
bits, info, wUsage );
hdcMem = CreateCompatibleDC( hdc );
hOldBitmap = SelectObject( hdcMem, hBitmap );
/* Origin for DIBitmap is bottom left ! */
StretchBlt( hdc, xDst, yDst, widthDst, heightDst,
hdcMem, xSrc, info->bmiHeader.biHeight - heightSrc - ySrc,
widthSrc, heightSrc, dwRop );
SelectObject( hdcMem, hOldBitmap );
DeleteDC( hdcMem );
DeleteObject( hBitmap );
HBITMAP hBitmap, hOldBitmap;
HDC hdcMem;
hBitmap = CreateDIBitmap( hdc, &info->bmiHeader, CBM_INIT,
bits, info, wUsage );
hdcMem = CreateCompatibleDC( hdc );
hOldBitmap = SelectObject( hdcMem, hBitmap );
/* Origin for DIBitmap is bottom left ! */
StretchBlt( hdc, xDst, yDst, widthDst, heightDst,
hdcMem, xSrc, info->bmiHeader.biHeight - heightSrc - ySrc,
widthSrc, heightSrc, dwRop );
SelectObject( hdcMem, hOldBitmap );
DeleteDC( hdcMem );
DeleteObject( hBitmap );
return heightSrc;
}
return heightSrc;
}
/***********************************************************************
* SetDIBits16 (GDI.440)
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment