mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 12:49:45 +00:00
gdi32: Fix the blend function handling for the AlphaBlend enhanced metafile record.
This commit is contained in:
parent
c1aaacd58c
commit
2116493653
@ -1903,7 +1903,6 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
|||||||
HDC hdcSrc = CreateCompatibleDC(hdc);
|
HDC hdcSrc = CreateCompatibleDC(hdc);
|
||||||
HBITMAP hBmp = 0, hBmpOld = 0;
|
HBITMAP hBmp = 0, hBmpOld = 0;
|
||||||
const BITMAPINFO *pbi = (const BITMAPINFO *)((const BYTE *)mr + pAlphaBlend->offBmiSrc);
|
const BITMAPINFO *pbi = (const BITMAPINFO *)((const BYTE *)mr + pAlphaBlend->offBmiSrc);
|
||||||
BLENDFUNCTION blendfn;
|
|
||||||
void *bits;
|
void *bits;
|
||||||
|
|
||||||
SetWorldTransform(hdcSrc, &pAlphaBlend->xformSrc);
|
SetWorldTransform(hdcSrc, &pAlphaBlend->xformSrc);
|
||||||
@ -1912,14 +1911,9 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
|||||||
memcpy(bits, (const BYTE *)mr + pAlphaBlend->offBitsSrc, pAlphaBlend->cbBitsSrc);
|
memcpy(bits, (const BYTE *)mr + pAlphaBlend->offBitsSrc, pAlphaBlend->cbBitsSrc);
|
||||||
hBmpOld = SelectObject(hdcSrc, hBmp);
|
hBmpOld = SelectObject(hdcSrc, hBmp);
|
||||||
|
|
||||||
blendfn.BlendOp = (pAlphaBlend->dwRop >> 24) & 0xff;
|
|
||||||
blendfn.BlendFlags = (pAlphaBlend->dwRop >> 16) & 0xff;
|
|
||||||
blendfn.SourceConstantAlpha = (pAlphaBlend->dwRop >> 8) & 0xff;
|
|
||||||
blendfn.AlphaFormat = (pAlphaBlend->dwRop) & 0xff;
|
|
||||||
|
|
||||||
GdiAlphaBlend(hdc, pAlphaBlend->xDest, pAlphaBlend->yDest, pAlphaBlend->cxDest, pAlphaBlend->cyDest,
|
GdiAlphaBlend(hdc, pAlphaBlend->xDest, pAlphaBlend->yDest, pAlphaBlend->cxDest, pAlphaBlend->cyDest,
|
||||||
hdcSrc, pAlphaBlend->xSrc, pAlphaBlend->ySrc, pAlphaBlend->cxSrc, pAlphaBlend->cySrc,
|
hdcSrc, pAlphaBlend->xSrc, pAlphaBlend->ySrc, pAlphaBlend->cxSrc, pAlphaBlend->cySrc,
|
||||||
blendfn);
|
*(BLENDFUNCTION *)&pAlphaBlend->dwRop);
|
||||||
|
|
||||||
SelectObject(hdcSrc, hBmpOld);
|
SelectObject(hdcSrc, hBmpOld);
|
||||||
DeleteObject(hBmp);
|
DeleteObject(hBmp);
|
||||||
|
Loading…
Reference in New Issue
Block a user