Wrap cairo_{save,restore} around paragraph rendering when printing narrative
authorThomas White <taw@bitwiz.me.uk>
Mon, 22 Oct 2018 15:17:55 +0000 (17:17 +0200)
committerThomas White <taw@bitwiz.me.uk>
Mon, 22 Oct 2018 15:17:55 +0000 (17:17 +0200)
src/print.c

index 18a083e..43c967e 100644 (file)
@@ -237,7 +237,10 @@ static void print_narrative(GtkPrintOperation *op, GtkPrintContext *ctx,
                h += paragraph_height(ps->top->paras[i]);
                if ( h > page_height ) return;
 
+               cairo_save(cr);
                render_paragraph(cr, ps->top->paras[i], ps->p->is);
+               cairo_restore(cr);
+
                cairo_translate(cr, 0.0, paragraph_height(ps->top->paras[i]));
 
        }