Mercurial > emacs
comparison src/xterm.c @ 36800:7a809e9fc67e
(x_draw_glyph_string): Draw relief (if any) before
drawing glyph string.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 14 Mar 2001 13:18:05 +0000 |
parents | e7722a221c28 |
children | 7c7084a9f736 |
comparison
equal
deleted
inserted
replaced
36799:d219e9d346c4 | 36800:7a809e9fc67e |
---|---|
4250 | 4250 |
4251 static void | 4251 static void |
4252 x_draw_glyph_string (s) | 4252 x_draw_glyph_string (s) |
4253 struct glyph_string *s; | 4253 struct glyph_string *s; |
4254 { | 4254 { |
4255 int relief_drawn_p = 0; | |
4256 | |
4255 /* If S draws into the background of its successor, draw the | 4257 /* If S draws into the background of its successor, draw the |
4256 background of the successor first so that S can draw into it. | 4258 background of the successor first so that S can draw into it. |
4257 This makes S->next use XDrawString instead of XDrawImageString. */ | 4259 This makes S->next use XDrawString instead of XDrawImageString. */ |
4258 if (s->next && s->right_overhang && !s->for_overlaps_p) | 4260 if (s->next && s->right_overhang && !s->for_overlaps_p) |
4259 { | 4261 { |
4264 } | 4266 } |
4265 | 4267 |
4266 /* Set up S->gc, set clipping and draw S. */ | 4268 /* Set up S->gc, set clipping and draw S. */ |
4267 x_set_glyph_string_gc (s); | 4269 x_set_glyph_string_gc (s); |
4268 x_set_glyph_string_clipping (s); | 4270 x_set_glyph_string_clipping (s); |
4271 | |
4272 /* Draw relief (if any) in advance for char/composition so that the | |
4273 glyph string can be drawn over it. */ | |
4274 if (!s->for_overlaps_p | |
4275 && s->face->box != FACE_NO_BOX | |
4276 && (s->first_glyph->type == CHAR_GLYPH | |
4277 || s->first_glyph->type == COMPOSITE_GLYPH)) | |
4278 | |
4279 { | |
4280 x_draw_glyph_string_background (s, 1); | |
4281 x_draw_glyph_string_box (s); | |
4282 relief_drawn_p = 1; | |
4283 } | |
4269 | 4284 |
4270 switch (s->first_glyph->type) | 4285 switch (s->first_glyph->type) |
4271 { | 4286 { |
4272 case IMAGE_GLYPH: | 4287 case IMAGE_GLYPH: |
4273 x_draw_image_glyph_string (s); | 4288 x_draw_image_glyph_string (s); |
4375 s->width, h); | 4390 s->width, h); |
4376 XSetForeground (s->display, s->gc, xgcv.foreground); | 4391 XSetForeground (s->display, s->gc, xgcv.foreground); |
4377 } | 4392 } |
4378 } | 4393 } |
4379 | 4394 |
4380 /* Draw relief. */ | 4395 /* Draw relief if not yet drawn. */ |
4381 if (s->face->box != FACE_NO_BOX) | 4396 if (!relief_drawn_p && s->face->box != FACE_NO_BOX) |
4382 x_draw_glyph_string_box (s); | 4397 x_draw_glyph_string_box (s); |
4383 } | 4398 } |
4384 | 4399 |
4385 /* Reset clipping. */ | 4400 /* Reset clipping. */ |
4386 XSetClipMask (s->display, s->gc, None); | 4401 XSetClipMask (s->display, s->gc, None); |