Commit 960dc908 authored by Alexandre Julliard's avatar Alexandre Julliard

Shi Quan He (of Corel)

The implementation of StretchBlt in WINE does not use the foreground and background color when a bitmap is copied from mono to mono. This is not the case in the actual implementation under Windows but MSDN did not document it.
parent 8b5231df
......@@ -894,8 +894,21 @@ static void BITBLT_GetSrcArea( DC *dcSrc, DC *dcDst, Pixmap pixmap, GC gc,
if (!X11DRV_PALETTE_XPixelToPalette ||
(dcDst->w.bitsPerPixel == 1)) /* monochrome -> monochrome */
{
XCopyArea( display, physDevSrc->drawable, pixmap, gc,
visRectSrc->left, visRectSrc->top, width, height, 0, 0);
if (dcDst->w.bitsPerPixel == 1)
{
/* MSDN says if StretchBlt must convert a bitmap from monochrome
to color or vice versa, the forground and background color of
the device context are used. In fact, it also applies to the
case when it is converted from mono to mono. */
XSetBackground( display, gc, physDevDst->textPixel );
XSetForeground( display, gc, physDevDst->backgroundPixel );
XCopyPlane( display, physDevSrc->drawable, pixmap, gc,
visRectSrc->left, visRectSrc->top,
width, height, 0, 0, 1);
}
else
XCopyArea( display, physDevSrc->drawable, pixmap, gc, visRectSrc
->left, visRectSrc->top, width, height, 0, 0);
}
else /* color -> color */
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment