diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-01-15 22:39:55 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-01-15 22:39:55 +0100 |
commit | 52d339b66d1739635047c34206bb9fea71567e2b (patch) | |
tree | 61e74e6e989a2cac580e5e80e54b9e41d7ebeb75 /src/render.c | |
parent | cc3e2244796a54a394d534e19149bc53fe2b3b71 (diff) |
Add subframes via SCInterpreter
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/render.c b/src/render.c index a4fbd51..65d1601 100644 --- a/src/render.c +++ b/src/render.c @@ -293,7 +293,7 @@ static int render_frame(cairo_t *cr, struct frame *fr, ImageStore *is, int i; SCBlock *bl = fr->scblocks; - scin = sc_interp_new(pc); + scin = sc_interp_new(pc, fr); if ( scin == NULL ) { fprintf(stderr, "Failed to set up interpreter.\n"); return 1; @@ -316,6 +316,12 @@ static int render_frame(cairo_t *cr, struct frame *fr, ImageStore *is, /* Actually draw the lines */ draw_frame(cr, fr, is, isz); + for ( i=0; i<fr->num_children; i++ ) { + 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); + } + sc_interp_destroy(scin); return 0; |