Mercurial > emacs
comparison src/w32term.c @ 54126:8d0f80667054
(w32_draw_fringe_bitmap): Draw overlaid bitmaps
correctly over other bitmaps.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sun, 22 Feb 2004 22:41:52 +0000 |
parents | 7add5c20b6f7 |
children | f6909a416c3f bc4c00966ad3 |
comparison
equal
deleted
inserted
replaced
54125:2ed4b33f8301 | 54126:8d0f80667054 |
---|---|
713 compat_hdc = CreateCompatibleDC (hdc); | 713 compat_hdc = CreateCompatibleDC (hdc); |
714 | 714 |
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); |
744 RestoreDC (hdc, -1); | 756 RestoreDC (hdc, -1); |
745 } | 757 } |