diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-12-10 17:57:24 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2012-12-10 17:57:24 +0100 |
commit | 73c6e08a139f7161bbbaf845df98d05f8f6e0efb (patch) | |
tree | 82881b1594adeb7394e2f2641444eecd39897796 /src | |
parent | e01d6d8d4d429ebb8ec8d3b8c9ad56f89891fef1 (diff) |
Break off render_glyph_box()
Diffstat (limited to 'src')
-rw-r--r-- | src/render.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/render.c b/src/render.c index 512f260..f820ea3 100644 --- a/src/render.c +++ b/src/render.c @@ -153,6 +153,15 @@ static void process_sc_block(struct renderstuff *s, const char *sc_name, } +static double render_glyph_box(cairo_t *cr, struct wrap_box *box) +{ + double box_w; + pango_cairo_show_glyph_item(cr, box->text, box->glyph_item); + box_w = pango_glyph_string_get_width(box->glyph_item->glyphs); + return box_w; +} + + static void render_boxes(struct wrap_line *line, struct renderstuff *s) { int j; @@ -168,9 +177,7 @@ static void render_boxes(struct wrap_line *line, struct renderstuff *s) switch ( line->boxes[j].type ) { case WRAP_BOX_PANGO : - pango_cairo_show_glyph_item(s->cr, box->text, - box->glyph_item); - x_pos += pango_glyph_string_get_width(box->glyph_item->glyphs); + render_glyph_box(s->cr, box); break; } |