diff options
author | Jason Rumney <jasonr@gnu.org> | 2004-02-22 22:41:52 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2004-02-22 22:41:52 +0000 |
commit | 7420e0f55dea3b29131b92a272f65b89a6a6027c (patch) | |
tree | e2acc51f6b6434e28f4da80d5d0778bc006a11e7 | |
parent | 8565fb3d3c4ca0da3eb0547a20042143d0efc488 (diff) | |
download | emacs-7420e0f55dea3b29131b92a272f65b89a6a6027c.tar.gz |
(w32_draw_fringe_bitmap): Draw overlaid bitmaps
correctly over other bitmaps.
-rw-r--r-- | src/w32term.c | 46 |
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) SaveDC (hdc); horig_obj = SelectObject (compat_hdc, pixmap); - SetTextColor (hdc, face->background); - SetBkColor (hdc, p->cursor_p - ? (p->overlay_p ? face->background - : f->output_data.w32->cursor_pixel) - : face->foreground); /* Paint overlays transparently. */ if (p->overlay_p) { - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - DSTINVERT); - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - MERGEPAINT); - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - DSTINVERT); + HBRUSH h_brush, h_orig_brush; + + SetTextColor (hdc, BLACK_PIX_DEFAULT (f)); + SetBkColor (hdc, WHITE_PIX_DEFAULT (f)); + h_brush = CreateSolidBrush (face->foreground); + h_orig_brush = SelectObject (hdc, h_brush); + + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + 0x2E064A); + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + DSTINVERT); + + SelectObject (hdc, h_orig_brush); + DeleteObject (h_brush); } else - BitBlt (hdc, p->x, p->y, p->wd, p->h, - compat_hdc, 0, p->dh, - SRCCOPY); + { + SetTextColor (hdc, face->background); + SetBkColor (hdc, (p->cursor_p + ? f->output_data.w32->cursor_pixel + : face->foreground)); + + BitBlt (hdc, p->x, p->y, p->wd, p->h, + compat_hdc, 0, p->dh, + SRCCOPY); + } SelectObject (compat_hdc, horig_obj); DeleteDC (compat_hdc); |