diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-01-22 22:10:44 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-01-22 22:10:44 +0100 |
commit | 9b2ad5ff6236fceaa52525a447f69eada00b6674 (patch) | |
tree | b8fae8409268d7bff60e1739e0ca96fa210ba84b /src | |
parent | 577d200dabb6df86ed9116ce23fa66a81b89bddd (diff) |
Fix rendering
Diffstat (limited to 'src')
-rw-r--r-- | src/render.c | 1 | ||||
-rw-r--r-- | src/sc_interp.c | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c index 8c28536..63b3804 100644 --- a/src/render.c +++ b/src/render.c @@ -321,6 +321,7 @@ static int render_frame(cairo_t *cr, struct frame *fr, ImageStore *is, draw_frame(cr, fr, is, isz); for ( i=0; i<fr->num_children; i++ ) { + cairo_save(cr); cairo_translate(cr, fr->children[i]->x, fr->children[i]->y); render_frame(cr, fr->children[i], is, isz, scc, pcc, pc); cairo_restore(cr); diff --git a/src/sc_interp.c b/src/sc_interp.c index 7f46982..5656137 100644 --- a/src/sc_interp.c +++ b/src/sc_interp.c @@ -430,6 +430,7 @@ int sc_interp_add_blocks(SCInterpreter *scin, SCBlock *bl) { while ( bl != NULL ) { + int recurse = 1; const char *name = sc_block_name(bl); const char *options = sc_block_options(bl); const char *contents = sc_block_contents(bl); @@ -460,7 +461,7 @@ int sc_interp_add_blocks(SCInterpreter *scin, SCBlock *bl) add_image_box(sc_interp_get_frame(scin)->boxes, sc_block_contents(child), w, h, 1); - child = NULL; /* Don't recurse */ + recurse = 0; } } else if ( strcmp(name, "slidenumber")==0) { @@ -506,7 +507,7 @@ int sc_interp_add_blocks(SCInterpreter *scin, SCBlock *bl) next: if ( child != NULL ) { - sc_interp_add_blocks(scin, child); + if ( recurse ) sc_interp_add_blocks(scin, child); sc_interp_restore(scin); } bl = sc_block_next(bl); |