aboutsummaryrefslogtreecommitdiff
path: root/src/sc_interp.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2017-11-27 00:12:46 +0100
committerThomas White <taw@physics.org>2017-11-27 00:13:19 +0100
commite851a106735a5498b3607a029a3091fd74879f3e (patch)
treec902d8ae358a613586b2280ce71a7ff7e16e8ba4 /src/sc_interp.c
parent2bf28d3b9de3ae3af076c569ffaccb66e13857f1 (diff)
Use ImageStore to get image size
Diffstat (limited to 'src/sc_interp.c')
-rw-r--r--src/sc_interp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sc_interp.c b/src/sc_interp.c
index b530941..e3b584f 100644
--- a/src/sc_interp.c
+++ b/src/sc_interp.c
@@ -1,7 +1,7 @@
/*
* sc_interp.c
*
- * Copyright © 2014-2015 Thomas White <taw@bitwiz.org.uk>
+ * Copyright © 2014-2017 Thomas White <taw@bitwiz.org.uk>
*
* This file is part of Colloquium.
*
@@ -31,6 +31,7 @@
#include <pango/pangocairo.h>
#include <gdk/gdk.h>
+#include "imagestore.h"
#include "sc_parse.h"
#include "sc_interp.h"
#include "presentation.h"
@@ -79,6 +80,7 @@ struct _scinterp
{
PangoContext *pc;
PangoLanguage *lang;
+ ImageStore *is;
struct slide_constants *s_constants;
struct presentation_constants *p_constants;
@@ -552,7 +554,7 @@ static void set_frame(SCInterpreter *scin, struct frame *fr)
SCInterpreter *sc_interp_new(PangoContext *pc, PangoLanguage *lang,
- struct frame *top)
+ ImageStore *is, struct frame *top)
{
SCInterpreter *scin;
struct sc_state *st;
@@ -569,6 +571,7 @@ SCInterpreter *sc_interp_new(PangoContext *pc, PangoLanguage *lang,
scin->max_state = 8;
scin->pc = pc;
+ scin->is = is;
scin->s_constants = NULL;
scin->p_constants = NULL;
scin->cbl = NULL;
@@ -957,7 +960,7 @@ static int check_outputs(SCBlock *bl, SCInterpreter *scin)
&w, &h, &filename) == 0 )
{
add_image_para(sc_interp_get_frame(scin), bl,
- filename, w, h, 1);
+ filename, scin->is, w, h, 1);
free(filename);
} else {
fprintf(stderr, "Invalid image options '%s'\n",