aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorMiles Bader2007-12-06 00:46:18 +0000
committerMiles Bader2007-12-06 00:46:18 +0000
commite5e76c04310d287a56675876dd83e1089faba215 (patch)
treea4b4f1cc134e4fd5af42671ec6689e07afe48ff2 /src/image.c
parentb890d447fb56bfe9f2e4742eda4b3ab4b5f4b32a (diff)
parenta2afc99dbad3fa9a3170ad72c578451c3aea58a4 (diff)
downloademacs-e5e76c04310d287a56675876dd83e1089faba215.tar.gz
emacs-e5e76c04310d287a56675876dd83e1089faba215.zip
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-943
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index 91be3f4b57e..a9b1e9835ed 100644
--- a/src/image.c
+++ b/src/image.c
@@ -3128,6 +3128,8 @@ convert_mono_to_color_image (f, img, foreground, background)
3128 release_frame_dc (f, hdc); 3128 release_frame_dc (f, hdc);
3129 old_prev = SelectObject (old_img_dc, img->pixmap); 3129 old_prev = SelectObject (old_img_dc, img->pixmap);
3130 new_prev = SelectObject (new_img_dc, new_pixmap); 3130 new_prev = SelectObject (new_img_dc, new_pixmap);
3131 /* Windows convention for mono bitmaps is black = background,
3132 white = foreground. */
3131 SetTextColor (new_img_dc, background); 3133 SetTextColor (new_img_dc, background);
3132 SetBkColor (new_img_dc, foreground); 3134 SetBkColor (new_img_dc, foreground);
3133 3135
@@ -3523,6 +3525,19 @@ xbm_load (f, img)
3523 else 3525 else
3524 bits = XBOOL_VECTOR (data)->data; 3526 bits = XBOOL_VECTOR (data)->data;
3525 3527
3528#ifdef WINDOWSNT
3529 {
3530 char *invertedBits;
3531 int nbytes, i;
3532 /* Windows mono bitmaps are reversed compared with X. */
3533 invertedBits = bits;
3534 nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
3535 * img->height;
3536 bits = (char *) alloca(nbytes);
3537 for (i = 0; i < nbytes; i++)
3538 bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
3539 }
3540#endif
3526 /* Create the pixmap. */ 3541 /* Create the pixmap. */
3527 3542
3528 Create_Pixmap_From_Bitmap_Data (f, img, bits, 3543 Create_Pixmap_From_Bitmap_Data (f, img, bits,