summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhiro Ito <kzhr@d1.dion.ne.jp>2010-08-26 07:35:54 +0000
committerEli Zaretskii <eliz@gnu.org>2021-11-06 13:33:46 +0200
commitba278e4a9b076b381317100df6bed664eb6aed6c (patch)
tree7e832345e693da32022b7d930fb4da626860c162
parent26089c8c446de4851143a42b2005844d152e8e99 (diff)
downloademacs-ba278e4a9b076b381317100df6bed664eb6aed6c.tar.gz
emacs-ba278e4a9b076b381317100df6bed664eb6aed6c.tar.bz2
emacs-ba278e4a9b076b381317100df6bed664eb6aed6c.zip
Fix display of BW images on MS-Windows
* src/image.c (convert_mono_to_color_image) [HAVE_NTGUI]: Swap the fore- and the back-ground colors back to their normal conventions. (Bug#6918)
-rw-r--r--src/image.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/image.c b/src/image.c
index da6cbba74da..6769e491202 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3547,10 +3547,8 @@ convert_mono_to_color_image (struct frame *f, struct image *img,
release_frame_dc (f, hdc);
old_prev = SelectObject (old_img_dc, img->pixmap);
new_prev = SelectObject (new_img_dc, new_pixmap);
- /* Windows convention for mono bitmaps is black = background,
- white = foreground. */
- SetTextColor (new_img_dc, background);
- SetBkColor (new_img_dc, foreground);
+ SetTextColor (new_img_dc, foreground);
+ SetBkColor (new_img_dc, background);
BitBlt (new_img_dc, 0, 0, img->width, img->height, old_img_dc,
0, 0, SRCCOPY);