gdi32: Use NtGdiAlphaBlend for GdiAlphaBlend.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
23ac1c6e62
commit
2f7b9e29e4
|
@ -935,11 +935,11 @@ error:
|
|||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GdiAlphaBlend [GDI32.@]
|
||||
* NtGdiAlphaBlend (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI GdiAlphaBlend(HDC hdcDst, int xDst, int yDst, int widthDst, int heightDst,
|
||||
HDC hdcSrc, int xSrc, int ySrc, int widthSrc, int heightSrc,
|
||||
BLENDFUNCTION blendFunction)
|
||||
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 )
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
DC *dcDst, *dcSrc;
|
||||
|
|
|
@ -158,12 +158,19 @@ err:
|
|||
return ret;
|
||||
}
|
||||
|
||||
BOOL EMFDC_AlphaBlend( DC_ATTR *dc_attr, 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 )
|
||||
{
|
||||
return emfdrv_stretchblt( dc_attr->emf, x_dst, y_dst, width_dst, height_dst, hdc_src, x_src, y_src,
|
||||
width_src, height_src, *(DWORD *)&blend_function, EMR_ALPHABLEND );
|
||||
}
|
||||
|
||||
BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst,
|
||||
PHYSDEV dev_src, struct bitblt_coords *src, BLENDFUNCTION func )
|
||||
{
|
||||
return emfdrv_stretchblt( dev_dst, dst->log_x, dst->log_y, dst->log_width, dst->log_height,
|
||||
dev_src->hdc, src->log_x, src->log_y, src->log_width, src->log_height,
|
||||
*(DWORD *)&func, EMR_ALPHABLEND );
|
||||
/* FIXME: update bound rect */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL CDECL EMFDRV_PatBlt( PHYSDEV dev, struct bitblt_coords *dst, DWORD rop )
|
||||
|
|
|
@ -112,6 +112,9 @@ extern BOOL METADC_StretchBlt( HDC hdc_dst, INT x_dst, INT y_dst, INT width_dst,
|
|||
|
||||
/* enhanced metafiles */
|
||||
extern BOOL EMFDC_AbortPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDC_AlphaBlend( DC_ATTR *dc_attr, 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 );
|
||||
extern BOOL EMFDC_AngleArc( DC_ATTR *dc_attr, INT x, INT y, DWORD radius, FLOAT start,
|
||||
FLOAT sweep ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDC_ArcChordPie( DC_ATTR *dc_attr, INT left, INT top, INT right,
|
||||
|
|
|
@ -1235,6 +1235,25 @@ BOOL WINAPI StretchBlt( HDC hdc, INT x_dst, INT y_dst, INT width_dst, INT height
|
|||
height_src, rop, 0 /* FIXME */ );
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* GdiAlphaBlend (GDI32.@)
|
||||
*/
|
||||
BOOL WINAPI GdiAlphaBlend( 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)
|
||||
{
|
||||
DC_ATTR *dc_attr;
|
||||
|
||||
if (!(dc_attr = get_dc_attr( hdc_dst ))) return FALSE;
|
||||
if (dc_attr->emf && !EMFDC_AlphaBlend( dc_attr, x_dst, y_dst, width_dst, height_dst,
|
||||
hdc_src, x_src, y_src, width_src,
|
||||
height_src, blend_function ))
|
||||
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 */ );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* BeginPath (GDI32.@)
|
||||
*/
|
||||
|
|
|
@ -145,6 +145,9 @@ typedef struct DC_ATTR
|
|||
|
||||
INT WINAPI NtGdiAbortDoc( HDC hdc );
|
||||
BOOL WINAPI NtGdiAbortPath( HDC hdc );
|
||||
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 );
|
||||
BOOL WINAPI NtGdiAngleArc( HDC hdc, INT x, INT y, DWORD radius, FLOAT start_angle,
|
||||
FLOAT sweep_angle );
|
||||
BOOL WINAPI NtGdiArcInternal( UINT type, HDC hdc, INT left, INT top, INT right, INT bottom,
|
||||
|
|
Loading…
Reference in New Issue