aboutsummaryrefslogtreecommitdiff
path: root/src/render.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2017-12-04 15:59:30 +0100
committerThomas White <taw@bitwiz.org.uk>2017-12-04 15:59:30 +0100
commit43e38c6b62834fb6e05b153d96abaf8329e58e28 (patch)
treec51c05fd75e98fee3575cd3790a57c8113ac0cb2 /src/render.c
parent74151d515a28debfa24fc50cbcb575f800e1314f (diff)
Go directly to PangoContext
Diffstat (limited to 'src/render.c')
-rw-r--r--src/render.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/render.c b/src/render.c
index 7fe789c..6ba8091 100644
--- a/src/render.c
+++ b/src/render.c
@@ -173,16 +173,13 @@ int recursive_wrap(struct frame *fr, PangoContext *pc)
struct frame *interp_and_shape(SCBlock *scblocks, SCBlock **stylesheets,
SCCallbackList *cbl, ImageStore *is,
int slide_number,
- cairo_t *cr, double w, double h,
+ PangoContext *pc, double w, double h,
PangoLanguage *lang)
{
- PangoContext *pc;
SCInterpreter *scin;
char snum[64];
struct frame *top;
- pc = pango_cairo_create_context(cr);
-
top = frame_new();
top->resizable = 0;
top->x = 0.0;
@@ -220,7 +217,6 @@ struct frame *interp_and_shape(SCBlock *scblocks, SCBlock **stylesheets,
sc_interp_add_blocks(scin, scblocks);
sc_interp_destroy(scin);
- g_object_unref(pc);
return top;
}
@@ -240,7 +236,7 @@ static struct frame *render_sc_with_context(SCBlock *scblocks,
cairo_fill(cr);
top = interp_and_shape(scblocks, stylesheets, cbl, is,
- slide_number, cr, log_w, log_h, lang);
+ slide_number, pc, log_w, log_h, lang);
recursive_wrap(top, pc);