diff options
| author | Miles Bader | 2002-11-17 23:49:32 +0000 |
|---|---|---|
| committer | Miles Bader | 2002-11-17 23:49:32 +0000 |
| commit | fce134490974b60d08188228b8e7d7289fd88de0 (patch) | |
| tree | d39dffb8129ed55da6997bbacfcb26188ce43991 | |
| parent | 11894ceb31be29dbe7ec3a3fd7e8c6a93da7520b (diff) | |
| download | emacs-fce134490974b60d08188228b8e7d7289fd88de0.tar.gz emacs-fce134490974b60d08188228b8e7d7289fd88de0.zip | |
(x_draw_glyph_string_foreground)
(x_draw_composite_glyph_string_foreground): Implement overstriking.
| -rw-r--r-- | src/xterm.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/xterm.c b/src/xterm.c index 1e5ee80a110..c5b0a8b00d3 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -3222,6 +3222,18 @@ x_draw_glyph_string_foreground (s) | |||
| 3222 | XDrawImageString (s->display, s->window, s->gc, x, | 3222 | XDrawImageString (s->display, s->window, s->gc, x, |
| 3223 | s->ybase - boff, char1b, s->nchars); | 3223 | s->ybase - boff, char1b, s->nchars); |
| 3224 | } | 3224 | } |
| 3225 | |||
| 3226 | if (s->face->overstrike) | ||
| 3227 | { | ||
| 3228 | /* For overstriking (to simulate bold-face), draw the | ||
| 3229 | characters again shifted to the right by one pixel. */ | ||
| 3230 | if (s->two_byte_p) | ||
| 3231 | XDrawString16 (s->display, s->window, s->gc, x + 1, | ||
| 3232 | s->ybase - boff, s->char2b, s->nchars); | ||
| 3233 | else | ||
| 3234 | XDrawString (s->display, s->window, s->gc, x + 1, | ||
| 3235 | s->ybase - boff, char1b, s->nchars); | ||
| 3236 | } | ||
| 3225 | } | 3237 | } |
| 3226 | } | 3238 | } |
| 3227 | 3239 | ||
| @@ -3257,10 +3269,17 @@ x_draw_composite_glyph_string_foreground (s) | |||
| 3257 | else | 3269 | else |
| 3258 | { | 3270 | { |
| 3259 | for (i = 0; i < s->nchars; i++, ++s->gidx) | 3271 | for (i = 0; i < s->nchars; i++, ++s->gidx) |
| 3260 | XDrawString16 (s->display, s->window, s->gc, | 3272 | { |
| 3261 | x + s->cmp->offsets[s->gidx * 2], | 3273 | XDrawString16 (s->display, s->window, s->gc, |
| 3262 | s->ybase - s->cmp->offsets[s->gidx * 2 + 1], | 3274 | x + s->cmp->offsets[s->gidx * 2], |
| 3263 | s->char2b + i, 1); | 3275 | s->ybase - s->cmp->offsets[s->gidx * 2 + 1], |
| 3276 | s->char2b + i, 1); | ||
| 3277 | if (s->face->overstrike) | ||
| 3278 | XDrawString16 (s->display, s->window, s->gc, | ||
| 3279 | x + s->cmp->offsets[s->gidx * 2] + 1, | ||
| 3280 | s->ybase - s->cmp->offsets[s->gidx * 2 + 1], | ||
| 3281 | s->char2b + i, 1); | ||
| 3282 | } | ||
| 3264 | } | 3283 | } |
| 3265 | } | 3284 | } |
| 3266 | 3285 | ||