diff options
author | Thomas White <taw@physics.org> | 2017-11-23 22:18:49 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2017-11-23 22:58:07 +0100 |
commit | 5d0df527ee8c1f919638677dd58c0681309b8a8b (patch) | |
tree | 63e43938353c0e132f31f0c5b1a4cae7bcebb5cb /src/render.c | |
parent | 55c566558b168b434e955dbefca4745c3a4932a2 (diff) |
Get rid of image size stuff
A completely unnecessary mechanism.
Diffstat (limited to 'src/render.c')
-rw-r--r-- | src/render.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/render.c b/src/render.c index b84b11e..74f63a2 100644 --- a/src/render.c +++ b/src/render.c @@ -91,7 +91,7 @@ static void do_background(cairo_t *cr, struct frame *fr) static int draw_frame(cairo_t *cr, struct frame *fr, ImageStore *is, - enum is_size isz, double min_y, double max_y) + double min_y, double max_y) { int i; double hpos = 0.0; @@ -109,7 +109,7 @@ static int draw_frame(cairo_t *cr, struct frame *fr, ImageStore *is, cairo_translate(cr, 0.0, hpos); if ( (hpos + cur_h > min_y) && (hpos < max_y) ) { - render_paragraph(cr, fr->paras[i], is, isz); + render_paragraph(cr, fr->paras[i], is); } /* else paragraph is not visible */ hpos += cur_h; @@ -123,17 +123,17 @@ static int draw_frame(cairo_t *cr, struct frame *fr, ImageStore *is, int recursive_draw(struct frame *fr, cairo_t *cr, - ImageStore *is, enum is_size isz, + ImageStore *is, double min_y, double max_y) { int i; - draw_frame(cr, fr, is, isz, min_y, max_y); + draw_frame(cr, fr, is, min_y, max_y); for ( i=0; i<fr->num_children; i++ ) { cairo_save(cr); cairo_translate(cr, fr->children[i]->x, fr->children[i]->y); - recursive_draw(fr->children[i], cr, is, isz, + recursive_draw(fr->children[i], cr, is, min_y - fr->children[i]->y, max_y - fr->children[i]->y); cairo_restore(cr); @@ -172,7 +172,7 @@ int recursive_wrap(struct frame *fr, PangoContext *pc) struct frame *interp_and_shape(SCBlock *scblocks, SCBlock **stylesheets, SCCallbackList *cbl, ImageStore *is, - enum is_size isz, int slide_number, + int slide_number, cairo_t *cr, double w, double h, PangoLanguage *lang) { @@ -229,7 +229,7 @@ struct frame *interp_and_shape(SCBlock *scblocks, SCBlock **stylesheets, static struct frame *render_sc_with_context(SCBlock *scblocks, cairo_t *cr, double log_w, double log_h, SCBlock **stylesheets, SCCallbackList *cbl, - ImageStore *is, enum is_size isz, + ImageStore *is, int slide_number, PangoLanguage *lang, PangoContext *pc) { @@ -239,12 +239,12 @@ static struct frame *render_sc_with_context(SCBlock *scblocks, cairo_set_source_rgb(cr, 1.0, 1.0, 1.0); cairo_fill(cr); - top = interp_and_shape(scblocks, stylesheets, cbl, is, isz, + top = interp_and_shape(scblocks, stylesheets, cbl, is, slide_number, cr, log_w, log_h, lang); recursive_wrap(top, pc); - recursive_draw(top, cr, is, isz, 0.0, log_h); + recursive_draw(top, cr, is, 0.0, log_h); return top; } @@ -253,7 +253,7 @@ static struct frame *render_sc_with_context(SCBlock *scblocks, cairo_surface_t *render_sc(SCBlock *scblocks, int w, int h, double log_w, double log_h, SCBlock **stylesheets, SCCallbackList *cbl, - ImageStore *is, enum is_size isz, + ImageStore *is, int slide_number, struct frame **ptop, PangoLanguage *lang) { @@ -267,7 +267,7 @@ cairo_surface_t *render_sc(SCBlock *scblocks, int w, int h, pc = pango_cairo_create_context(cr); cairo_scale(cr, w/log_w, h/log_h); top = render_sc_with_context(scblocks, cr, log_w, log_h, - stylesheets, cbl, is, isz,slide_number, + stylesheets, cbl, is, slide_number, lang, pc); g_object_unref(pc); cairo_destroy(cr); @@ -333,7 +333,7 @@ int export_pdf(struct presentation *p, const char *filename) render_sc_with_context(sc_block_child(bl), cr, p->slide_width, p->slide_height, stylesheets, NULL, - p->is, ISZ_SLIDESHOW, i, p->lang, pc); + p->is, i, p->lang, pc); cairo_restore(cr); |