aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Rumney2004-02-22 22:41:52 +0000
committerJason Rumney2004-02-22 22:41:52 +0000
commit7420e0f55dea3b29131b92a272f65b89a6a6027c (patch)
treee2acc51f6b6434e28f4da80d5d0778bc006a11e7 /src
parent8565fb3d3c4ca0da3eb0547a20042143d0efc488 (diff)
downloademacs-7420e0f55dea3b29131b92a272f65b89a6a6027c.tar.gz
emacs-7420e0f55dea3b29131b92a272f65b89a6a6027c.zip
(w32_draw_fringe_bitmap): Draw overlaid bitmaps
correctly over other bitmaps.
Diffstat (limited to 'src')
-rw-r--r--src/w32term.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/src/w32term.c b/src/w32term.c
index d2e8f8993b8..62a4f41a6a9 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -715,29 +715,41 @@ w32_draw_fringe_bitmap (w, row, p)
715 SaveDC (hdc); 715 SaveDC (hdc);
716 716
717 horig_obj = SelectObject (compat_hdc, pixmap); 717 horig_obj = SelectObject (compat_hdc, pixmap);
718 SetTextColor (hdc, face->background);
719 SetBkColor (hdc, p->cursor_p
720 ? (p->overlay_p ? face->background
721 : f->output_data.w32->cursor_pixel)
722 : face->foreground);
723 718
724 /* Paint overlays transparently. */ 719 /* Paint overlays transparently. */
725 if (p->overlay_p) 720 if (p->overlay_p)
726 { 721 {
727 BitBlt (hdc, p->x, p->y, p->wd, p->h, 722 HBRUSH h_brush, h_orig_brush;
728 compat_hdc, 0, p->dh, 723
729 DSTINVERT); 724 SetTextColor (hdc, BLACK_PIX_DEFAULT (f));
730 BitBlt (hdc, p->x, p->y, p->wd, p->h, 725 SetBkColor (hdc, WHITE_PIX_DEFAULT (f));
731 compat_hdc, 0, p->dh, 726 h_brush = CreateSolidBrush (face->foreground);
732 MERGEPAINT); 727 h_orig_brush = SelectObject (hdc, h_brush);
733 BitBlt (hdc, p->x, p->y, p->wd, p->h, 728
734 compat_hdc, 0, p->dh, 729 BitBlt (hdc, p->x, p->y, p->wd, p->h,
735 DSTINVERT); 730 compat_hdc, 0, p->dh,
731 DSTINVERT);
732 BitBlt (hdc, p->x, p->y, p->wd, p->h,
733 compat_hdc, 0, p->dh,
734 0x2E064A);
735 BitBlt (hdc, p->x, p->y, p->wd, p->h,
736 compat_hdc, 0, p->dh,
737 DSTINVERT);
738
739 SelectObject (hdc, h_orig_brush);
740 DeleteObject (h_brush);
736 } 741 }
737 else 742 else
738 BitBlt (hdc, p->x, p->y, p->wd, p->h, 743 {
739 compat_hdc, 0, p->dh, 744 SetTextColor (hdc, face->background);
740 SRCCOPY); 745 SetBkColor (hdc, (p->cursor_p
746 ? f->output_data.w32->cursor_pixel
747 : face->foreground));
748
749 BitBlt (hdc, p->x, p->y, p->wd, p->h,
750 compat_hdc, 0, p->dh,
751 SRCCOPY);
752 }
741 753
742 SelectObject (compat_hdc, horig_obj); 754 SelectObject (compat_hdc, horig_obj);
743 DeleteDC (compat_hdc); 755 DeleteDC (compat_hdc);