diff options
author | Thomas White <taw@bitwiz.org.uk> | 2014-01-17 10:13:46 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2014-01-17 10:13:46 +0100 |
commit | 93956372d317fc90f8751e6b319e0055507c2519 (patch) | |
tree | 9c290978d9ad8a05a1da66ffc4839232b3102899 /src/render.c | |
parent | bc49b9f3fd00ebc3bd62a51bb2321822618e838d (diff) |
Unwrapped text belongs to frame, not interpreter
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/render.c b/src/render.c index 4509152..8c28536 100644 --- a/src/render.c +++ b/src/render.c @@ -297,18 +297,25 @@ static int render_frame(cairo_t *cr, struct frame *fr, ImageStore *is, } for ( i=0; i<fr->n_lines; i++ ) { - wrap_line_free(&fr->lines[i]); + // wrap_line_free(&fr->lines[i]); } free(fr->lines); fr->lines = NULL; fr->n_lines = 0; fr->max_lines = 0; + if ( fr->boxes != NULL ) { + free(fr->boxes->boxes); + free(fr->boxes); + } + fr->boxes = malloc(sizeof(struct wrap_line)); + initialise_line(fr->boxes); + /* SCBlocks -> frames and wrap boxes (preferably re-using frames) */ sc_interp_add_blocks(scin, bl); /* Wrap boxes -> wrap lines */ - wrap_contents(fr, sc_interp_get_boxes(scin)); + wrap_contents(fr); /* Actually draw the lines */ draw_frame(cr, fr, is, isz); |