Mercurial > emacs
comparison src/xdisp.c @ 69629:fad358cc93fc
(store_next_glyph): Renamed from append_glyph.
(generate_stretch_glyph): Renamed from produce_stretch_glyph.
All callers changed accordingly.
author | Ken Raeburn <raeburn@raeburn.org> |
---|---|
date | Wed, 22 Mar 2006 05:05:35 +0000 |
parents | 4f6b547120ec |
children | 51f98bc8ce67 b901f4f12f33 |
comparison
equal
deleted
inserted
replaced
69628:83bcc21a8e89 | 69629:fad358cc93fc |
---|---|
19381 | 19381 |
19382 /* Store one glyph for IT->char_to_display in IT->glyph_row. | 19382 /* Store one glyph for IT->char_to_display in IT->glyph_row. |
19383 Called from x_produce_glyphs when IT->glyph_row is non-null. */ | 19383 Called from x_produce_glyphs when IT->glyph_row is non-null. */ |
19384 | 19384 |
19385 static INLINE void | 19385 static INLINE void |
19386 append_glyph (it) | 19386 store_next_glyph (it) |
19387 struct it *it; | 19387 struct it *it; |
19388 { | 19388 { |
19389 struct glyph *glyph; | 19389 struct glyph *glyph; |
19390 enum glyph_row_area area = it->area; | 19390 enum glyph_row_area area = it->area; |
19391 | 19391 |
19705 6. `:ascent ASCENT' specifies that ASCENT percent of the height | 19705 6. `:ascent ASCENT' specifies that ASCENT percent of the height |
19706 of the stretch should be used for the ascent of the stretch. | 19706 of the stretch should be used for the ascent of the stretch. |
19707 ASCENT must be in the range 0 <= ASCENT <= 100. */ | 19707 ASCENT must be in the range 0 <= ASCENT <= 100. */ |
19708 | 19708 |
19709 static void | 19709 static void |
19710 produce_stretch_glyph (it) | 19710 generate_stretch_glyph (it) |
19711 struct it *it; | 19711 struct it *it; |
19712 { | 19712 { |
19713 /* (space :width WIDTH :height HEIGHT ...) */ | 19713 /* (space :width WIDTH :height HEIGHT ...) */ |
19714 Lisp_Object prop, plist; | 19714 Lisp_Object prop, plist; |
19715 int width = 0, height = 0, align_to = -1; | 19715 int width = 0, height = 0, align_to = -1; |
20131 / FONT_HEIGHT (font)); | 20131 / FONT_HEIGHT (font)); |
20132 append_stretch_glyph (it, it->object, it->pixel_width, | 20132 append_stretch_glyph (it, it->object, it->pixel_width, |
20133 it->ascent + it->descent, ascent); | 20133 it->ascent + it->descent, ascent); |
20134 } | 20134 } |
20135 else | 20135 else |
20136 append_glyph (it); | 20136 store_next_glyph (it); |
20137 | 20137 |
20138 /* If characters with lbearing or rbearing are displayed | 20138 /* If characters with lbearing or rbearing are displayed |
20139 in this line, record that fact in a flag of the | 20139 in this line, record that fact in a flag of the |
20140 glyph row. This is used to optimize X output code. */ | 20140 glyph row. This is used to optimize X output code. */ |
20141 if (pcm && (pcm->lbearing < 0 || pcm->rbearing > pcm->width)) | 20141 if (pcm && (pcm->lbearing < 0 || pcm->rbearing > pcm->width)) |
20313 it->ascent += 2; | 20313 it->ascent += 2; |
20314 | 20314 |
20315 take_vertical_position_into_account (it); | 20315 take_vertical_position_into_account (it); |
20316 | 20316 |
20317 if (it->glyph_row) | 20317 if (it->glyph_row) |
20318 append_glyph (it); | 20318 store_next_glyph (it); |
20319 } | 20319 } |
20320 it->multibyte_p = saved_multibyte_p; | 20320 it->multibyte_p = saved_multibyte_p; |
20321 } | 20321 } |
20322 else if (it->what == IT_COMPOSITION) | 20322 else if (it->what == IT_COMPOSITION) |
20323 { | 20323 { |
20593 append_composite_glyph (it); | 20593 append_composite_glyph (it); |
20594 } | 20594 } |
20595 else if (it->what == IT_IMAGE) | 20595 else if (it->what == IT_IMAGE) |
20596 produce_image_glyph (it); | 20596 produce_image_glyph (it); |
20597 else if (it->what == IT_STRETCH) | 20597 else if (it->what == IT_STRETCH) |
20598 produce_stretch_glyph (it); | 20598 generate_stretch_glyph (it); |
20599 | 20599 |
20600 /* Accumulate dimensions. Note: can't assume that it->descent > 0 | 20600 /* Accumulate dimensions. Note: can't assume that it->descent > 0 |
20601 because this isn't true for images with `:ascent 100'. */ | 20601 because this isn't true for images with `:ascent 100'. */ |
20602 xassert (it->ascent >= 0 && it->descent >= 0); | 20602 xassert (it->ascent >= 0 && it->descent >= 0); |
20603 if (it->area == TEXT_AREA) | 20603 if (it->area == TEXT_AREA) |