diff options
author | Thomas White <taw@bitwiz.me.uk> | 2018-03-30 23:57:15 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2018-03-30 23:57:15 +0200 |
commit | 57510a5330b09cd701bb0bb4cbbeca1d6d096737 (patch) | |
tree | a393a3f54a494156cb17a892354f539bc0087c10 /src/print.c | |
parent | 65446ad85962bc79620026d50d8ad26954ced041 (diff) |
Do all rendering one level higher
All rendering functions now render the contents of the given block, not
the block itself. This makes everything consistent again with respect
to where the frame SCBlock pointers point, even for the top frame.
Diffstat (limited to 'src/print.c')
-rw-r--r-- | src/print.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/print.c b/src/print.c index 8275f23..b54d8e7 100644 --- a/src/print.c +++ b/src/print.c @@ -135,7 +135,7 @@ static void print_slide_only(GtkPrintOperation *op, GtkPrintContext *ctx, printf("%f x %f ---> %f x %f\n", w, h, slide_width, slide_height); - top = interp_and_shape(sc_block_child(ps->slide), stylesheets, NULL, + top = interp_and_shape(ps->slide, stylesheets, NULL, ps->p->is, page+1, pc, sw, sh, ps->p->lang); recursive_wrap(top, pc); @@ -175,7 +175,6 @@ static cairo_surface_t *print_render_thumbnail(int w, int h, void *bvp, void *vp SCBlock *stylesheets[2]; struct frame *top; - scblocks = sc_block_child(scblocks); stylesheets[0] = p->stylesheet; stylesheets[1] = NULL; surf = render_sc(scblocks, w, h, p->slide_width, p->slide_height, stylesheets, NULL, @@ -194,6 +193,7 @@ static void begin_narrative_print(GtkPrintOperation *op, GtkPrintContext *ctx, PangoContext *pc; int i, n_pages; double h, page_height; + SCBlock *dummy_top; cbl = sc_callback_list_new(); ps->slide_number = 1; @@ -211,7 +211,8 @@ static void begin_narrative_print(GtkPrintOperation *op, GtkPrintContext *ctx, pc = gtk_print_context_create_pango_context(ctx); - ps->top = interp_and_shape(ps->p->scblocks, stylesheets, cbl, + dummy_top = sc_block_new_parent(ps->p->scblocks, "presentation"); + ps->top = interp_and_shape(dummy_top, stylesheets, cbl, ps->is, 0, pc, gtk_print_context_get_width(ctx), gtk_print_context_get_height(ctx), |