mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 01:03:38 +00:00
win32u: Pass blend function as DWORD to NtGdiAlphaBlend.
This commit is contained in:
parent
7acaba6774
commit
0c73b717fb
|
@ -1967,7 +1967,7 @@ BOOL WINAPI GdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int
|
|||
return FALSE;
|
||||
return NtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst,
|
||||
hdc_src, x_src, y_src, width_src, height_src,
|
||||
blend_function, 0 /* FIXME */ );
|
||||
*(DWORD *)&blend_function, 0 /* FIXME */ );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -955,8 +955,9 @@ error:
|
|||
*/
|
||||
BOOL WINAPI NtGdiAlphaBlend( HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst,
|
||||
HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc,
|
||||
BLENDFUNCTION blendFunction, HANDLE xform )
|
||||
DWORD blend_func, HANDLE xform )
|
||||
{
|
||||
BLENDFUNCTION blendFunction = *(BLENDFUNCTION *)&blend_func;
|
||||
BOOL ret = FALSE;
|
||||
DC *dcDst, *dcSrc;
|
||||
|
||||
|
|
|
@ -707,11 +707,11 @@ BOOL WINAPI NtUserDrawIconEx( HDC hdc, INT x0, INT y0, HICON icon, INT width,
|
|||
}
|
||||
if (alpha_blend)
|
||||
{
|
||||
BLENDFUNCTION pixelblend = { AC_SRC_OVER, 0, 255, AC_SRC_ALPHA };
|
||||
NtGdiSelectBitmap( mem_dc, obj->frame.alpha );
|
||||
if (NtGdiAlphaBlend( hdc_dest, x, y, width, height, mem_dc,
|
||||
0, 0, obj->frame.width, obj->frame.height,
|
||||
pixelblend, 0 )) goto done;
|
||||
MAKEFOURCC( AC_SRC_OVER, 0, 255, AC_SRC_ALPHA ), 0 ))
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ struct unix_funcs
|
|||
/* win32u functions */
|
||||
BOOL (WINAPI *pNtGdiAlphaBlend)( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
|
||||
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
|
||||
BLENDFUNCTION blend_function, HANDLE xform );
|
||||
DWORD blend_function, HANDLE xform );
|
||||
BOOL (WINAPI *pNtGdiBitBlt)( HDC hdc_dst, INT x_dst, INT y_dst, INT width, INT height, HDC hdc_src,
|
||||
INT x_src, INT y_src, DWORD rop, DWORD bk_color, FLONG fl );
|
||||
BOOL (WINAPI *pNtGdiComputeXformCoefficients)( HDC hdc );
|
||||
|
|
|
@ -26,7 +26,7 @@ static const struct unix_funcs *unix_funcs;
|
|||
|
||||
BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
|
||||
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
|
||||
BLENDFUNCTION blend_function, HANDLE xform )
|
||||
DWORD blend_function, HANDLE xform )
|
||||
{
|
||||
if (!unix_funcs) return FALSE;
|
||||
return unix_funcs->pNtGdiAlphaBlend( hdc_dst, x_dst, y_dst, width_dst, height_dst, hdc_src,
|
||||
|
|
|
@ -1613,10 +1613,11 @@ BOOL ANDROID_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info
|
|||
if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y );
|
||||
NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP );
|
||||
|
||||
if (info->dwFlags & ULW_ALPHA) blend = *info->pblend;
|
||||
ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
info->hdcSrc, src_rect.left, src_rect.top,
|
||||
src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
|
||||
(info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 );
|
||||
*(DWORD *)&blend, 0 );
|
||||
if (ret)
|
||||
{
|
||||
memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage );
|
||||
|
|
|
@ -1972,7 +1972,7 @@ BOOL macdrv_UpdateLayeredWindow(HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
|||
if (!(ret = NtGdiAlphaBlend(hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
info->hdcSrc, src_rect.left, src_rect.top,
|
||||
src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
|
||||
blend, 0)))
|
||||
*(DWORD *)&blend, 0)))
|
||||
goto done;
|
||||
|
||||
if ((data = get_win_data(hwnd)))
|
||||
|
|
|
@ -2948,10 +2948,11 @@ BOOL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO *info,
|
|||
if (info->pptSrc) OffsetRect( &src_rect, info->pptSrc->x, info->pptSrc->y );
|
||||
NtGdiTransformPoints( info->hdcSrc, (POINT *)&src_rect, (POINT *)&src_rect, 2, NtGdiDPtoLP );
|
||||
|
||||
if (info->dwFlags & ULW_ALPHA) blend = *info->pblend;
|
||||
ret = NtGdiAlphaBlend( hdc, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||
info->hdcSrc, src_rect.left, src_rect.top,
|
||||
src_rect.right - src_rect.left, src_rect.bottom - src_rect.top,
|
||||
(info->dwFlags & ULW_ALPHA) ? *info->pblend : blend, 0 );
|
||||
*(DWORD *)&blend, 0 );
|
||||
if (ret)
|
||||
{
|
||||
memcpy( dst_bits, src_bits, bmi->bmiHeader.biSizeImage );
|
||||
|
|
|
@ -250,7 +250,7 @@ INT WINAPI NtGdiAddFontResourceW( const WCHAR *str, ULONG size, ULONG files
|
|||
DWORD tid, void *dv );
|
||||
BOOL WINAPI NtGdiAlphaBlend( HDC hdc_dst, int x_dst, int y_dst, int width_dst, int height_dst,
|
||||
HDC hdc_src, int x_src, int y_src, int width_src, int height_src,
|
||||
BLENDFUNCTION blend_function, HANDLE xform );
|
||||
DWORD blend_function, HANDLE xform );
|
||||
BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, DWORD start_angle,
|
||||
DWORD sweep_angle );
|
||||
BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
|
||||
|
|
Loading…
Reference in a new issue