Mercurial > emacs
comparison src/w32term.c @ 38807:a59ac9807c9d
Draw relief (if any) before
drawing glyph string.
author | Andrew Innes <andrewi@gnu.org> |
---|---|
date | Tue, 14 Aug 2001 11:44:40 +0000 |
parents | 9606b955465e |
children | e008ccec0cad |
comparison
equal
deleted
inserted
replaced
38806:45b12f1bd5fe | 38807:a59ac9807c9d |
---|---|
4298 | 4298 |
4299 static void | 4299 static void |
4300 x_draw_glyph_string (s) | 4300 x_draw_glyph_string (s) |
4301 struct glyph_string *s; | 4301 struct glyph_string *s; |
4302 { | 4302 { |
4303 int relief_drawn_p = 0; | |
4304 | |
4303 /* If S draws into the background of its successor, draw the | 4305 /* If S draws into the background of its successor, draw the |
4304 background of the successor first so that S can draw into it. | 4306 background of the successor first so that S can draw into it. |
4305 This makes S->next use XDrawString instead of XDrawImageString. */ | 4307 This makes S->next use XDrawString instead of XDrawImageString. */ |
4306 if (s->next && s->right_overhang && !s->for_overlaps_p) | 4308 if (s->next && s->right_overhang && !s->for_overlaps_p) |
4307 { | 4309 { |
4312 } | 4314 } |
4313 | 4315 |
4314 /* Set up S->gc, set clipping and draw S. */ | 4316 /* Set up S->gc, set clipping and draw S. */ |
4315 x_set_glyph_string_gc (s); | 4317 x_set_glyph_string_gc (s); |
4316 x_set_glyph_string_clipping (s); | 4318 x_set_glyph_string_clipping (s); |
4319 | |
4320 /* Draw relief (if any) in advance for char/composition so that the | |
4321 glyph string can be drawn over it. */ | |
4322 if (!s->for_overlaps_p | |
4323 && s->face->box != FACE_NO_BOX | |
4324 && (s->first_glyph->type == CHAR_GLYPH | |
4325 || s->first_glyph->type == COMPOSITE_GLYPH)) | |
4326 | |
4327 { | |
4328 x_draw_glyph_string_background (s, 1); | |
4329 x_draw_glyph_string_box (s); | |
4330 relief_drawn_p = 1; | |
4331 } | |
4317 | 4332 |
4318 switch (s->first_glyph->type) | 4333 switch (s->first_glyph->type) |
4319 { | 4334 { |
4320 case IMAGE_GLYPH: | 4335 case IMAGE_GLYPH: |
4321 x_draw_image_glyph_string (s); | 4336 x_draw_image_glyph_string (s); |
4401 s->y + dy, s->width, h); | 4416 s->y + dy, s->width, h); |
4402 } | 4417 } |
4403 } | 4418 } |
4404 | 4419 |
4405 /* Draw relief. */ | 4420 /* Draw relief. */ |
4406 if (s->face->box != FACE_NO_BOX) | 4421 if (!relief_drawn_p && s->face->box != FACE_NO_BOX) |
4407 x_draw_glyph_string_box (s); | 4422 x_draw_glyph_string_box (s); |
4408 } | 4423 } |
4409 | 4424 |
4410 /* Reset clipping. */ | 4425 /* Reset clipping. */ |
4411 w32_set_clip_rectangle (s->hdc, NULL); | 4426 w32_set_clip_rectangle (s->hdc, NULL); |