gdiplus: GdipGraphicsClear() should overwrite pixels, not alpha blend.
commit3c8784bf9c1a897de021587437c5ec4f648c84a1
authorDamjan Jovanovic <damjan.jov@gmail.com>
Fri, 13 Dec 2019 03:17:54 +0000 (13 05:17 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Fri, 13 Dec 2019 20:01:59 +0000 (13 21:01 +0100)
treeb6f1b84ec750be101defccacd06ae0d9d7a0d60f
parenta16a4d97570613a8139a9a06164032324438367b
gdiplus: GdipGraphicsClear() should overwrite pixels, not alpha blend.

All sample code in the Python Pyglet library suffers from terrible
text corruption, caused by the inability to erase the background
between rendering sequential font glyphs, resulting in leftovers
from previous letters mixing with the image of new letters.

This is because it attempts to erase the background by calling
GdipGraphicsClear() with ARGB color 0x00000000 (completely
transparent black), and in our gdiplus alpha blending that into
the background has no effect. It should be using
CompositeModeSourceCopy to overwrite the background with that brush
instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30506
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/gdiplus/graphics.c
dlls/gdiplus/tests/image.c