aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2015-12-21 15:54:51 +0100
committerThomas White <taw@bitwiz.org.uk>2015-12-21 15:54:51 +0100
commit79f3fdbb0b6e379c90eb3783d200e6d4249f4a3b (patch)
tree6039af892c014fa46334c23a0031659746b5bddd /src/render.c
parent3cbb8d0124e839136795ae8dcf475a5fbe86c093 (diff)
Multiple segments in a box
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c
index a605ad2..e7d24f6 100644
--- a/src/render.c
+++ b/src/render.c
@@ -46,15 +46,20 @@
static void render_glyph_box(cairo_t *cr, struct wrap_box *box)
{
+ int i;
+
cairo_new_path(cr);
cairo_move_to(cr, 0.0, 0.0);
- if ( box->glyphs == NULL ) {
+ if ( box->segs == NULL ) {
fprintf(stderr, "Box %p has NULL pointer.\n", box);
return;
}
cairo_set_source_rgba(cr, box->col[0], box->col[1], box->col[2],
box->col[3]);
- pango_cairo_show_glyph_string(cr, box->font, box->glyphs);
+ for ( i=0; i<box->n_segs; i++ ) {
+ pango_cairo_show_glyph_string(cr, box->font,
+ box->segs[i].glyphs);
+ }
}