diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2001-08-09 07:29:41 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2001-08-09 07:29:41 +0000 |
commit | 8634415d0e761d18210e54fb045f7b4af07bf046 (patch) | |
tree | 37c857126719e876c63c49d4db5cca2c18986d5c /pango | |
parent | eb4984114ef89078036aa4df08fb3f497fb8f498 (diff) | |
download | pango-8634415d0e761d18210e54fb045f7b4af07bf046.tar.gz |
pango/pango-layout.c (pango_layout_line_get_empty_extents):
Remove unneeded inc_rect parameter.
(pango_layout_line_get_extents): Treat lines containing only
tabs as empty lines. (#57051)
Diffstat (limited to 'pango')
-rw-r--r-- | pango/pango-layout.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c index 48e6d103..093da577 100644 --- a/pango/pango-layout.c +++ b/pango/pango-layout.c @@ -3308,17 +3308,8 @@ pango_layout_line_get_x_ranges (PangoLayoutLine *line, static void pango_layout_line_get_empty_extents (PangoLayoutLine *line, - PangoRectangle *ink_rect, PangoRectangle *logical_rect) { - if (ink_rect) - { - ink_rect->x = 0; - ink_rect->y = 0; - ink_rect->width = 0; - ink_rect->height = 0; - } - if (logical_rect) { char *line_start; @@ -3486,12 +3477,6 @@ pango_layout_line_get_extents (PangoLayoutLine *line, if (!LINE_IS_VALID (line)) return; - if (!line->runs) - { - pango_layout_line_get_empty_extents (line, ink_rect, logical_rect); - return; - } - if (ink_rect) { ink_rect->x = 0; @@ -3549,6 +3534,13 @@ pango_layout_line_get_extents (PangoLayoutLine *line, x_pos += run_logical.width; tmp_list = tmp_list->next; } + + if (logical_rect && logical_rect->height == 0) + { + PangoRectangle temp_rect; + pango_layout_line_get_empty_extents (line, &temp_rect); + logical_rect->height = temp_rect.height; + } } static PangoLayoutLine * |