On Wed, Apr 14, 2021 at 03:27:57PM +0800, Zhiyi Zhang wrote:
Fix a bug that Tally produces a blank print preview when images have to be scaled.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
dlls/gdi32/enhmfdrv/bitblt.c | 85 ++++++++++++++++++++++++++++ dlls/gdi32/enhmfdrv/enhmetafiledrv.h | 2 + dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/tests/metafile.c | 4 +- 4 files changed, 89 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/enhmfdrv/bitblt.c b/dlls/gdi32/enhmfdrv/bitblt.c index 1fc5c0b1040..f0be2b52fc0 100644 --- a/dlls/gdi32/enhmfdrv/bitblt.c +++ b/dlls/gdi32/enhmfdrv/bitblt.c @@ -27,6 +27,91 @@ #include "enhmetafiledrv.h" #include "wine/debug.h"
+BOOL CDECL EMFDRV_AlphaBlend( PHYSDEV dev_dst, struct bitblt_coords *dst, PHYSDEV dev_src,
struct bitblt_coords *src, BLENDFUNCTION func )
+{
- UINT bits_size, bmi_size, emr_size, size, bpp;
- BITMAPINFOHEADER *bmih;
- EMRALPHABLEND *emr;
- HBITMAP hbitmap;
- BITMAP bitmap;
- BOOL ret;
- /* can't use a metafile DC as source */
- if (dev_src->funcs == dev_dst->funcs)
return FALSE;
- hbitmap = GetCurrentObject(dev_src->hdc, OBJ_BITMAP);
- if (GetObjectW(hbitmap, sizeof(BITMAP), &bitmap) != sizeof(BITMAP))
return FALSE;
This would likely be cleaner using the BlendImage entry point (likewise I suspect StretchBlt would benefit from using PutImage).
Huw.