summaryrefslogtreecommitdiff
path: root/gfx/cro.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-09-29 21:48:00 -0300
committerWerner Almesberger <werner@almesberger.net>2016-09-29 22:00:26 -0300
commit2f6677ab8f5f15fc09fc02d6ea86fd5b3f650a1d (patch)
tree0f0595cbd998d30e0178035f91b30f7ed6757e54 /gfx/cro.c
parent2c9e549c9554e0cabb4d4ccdb2c3a2238d62bcf4 (diff)
downloadeeshow-2f6677ab8f5f15fc09fc02d6ea86fd5b3f650a1d.tar.gz
eeshow-2f6677ab8f5f15fc09fc02d6ea86fd5b3f650a1d.tar.bz2
eeshow-2f6677ab8f5f15fc09fc02d6ea86fd5b3f650a1d.zip
get rid of sch_render_extra and move selection to rendering (WIP)
This works for eeshow, but this breaks the -e option of eeplot and eediff, permanently enabling it in FIG, and permanently disabling it in all the Cairo-based formats.
Diffstat (limited to 'gfx/cro.c')
-rw-r--r--gfx/cro.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/gfx/cro.c b/gfx/cro.c
index f1d44b6..5b23113 100644
--- a/gfx/cro.c
+++ b/gfx/cro.c
@@ -1053,7 +1053,7 @@ void cro_canvas_prepare(cairo_t *cr)
void cro_canvas_draw(struct cro_ctx *cc, cairo_t *cr, int xo, int yo,
- float scale)
+ float scale, enum gfx_extra extra)
{
cc->cr = cr;
@@ -1062,14 +1062,14 @@ void cro_canvas_draw(struct cro_ctx *cc, cairo_t *cr, int xo, int yo,
cc->scale = scale;
cc->xo = xo;
cc->yo = yo;
- record_replay(&cc->record, 0);
+ record_replay(&cc->record, extra);
}
/* ----- Image for external use (simplified API) --------------------------- */
-uint32_t *cro_img(struct cro_ctx *cc, struct cro_ctx *cc_extra,
+uint32_t *cro_img(struct cro_ctx *cc, enum gfx_extra extra,
int xo, int yo, int w, int h,
float scale, double alpha, cairo_t **res_cr, int *res_stride)
{
@@ -1119,14 +1119,7 @@ uint32_t *cro_img(struct cro_ctx *cc, struct cro_ctx *cc_extra,
setup_font(cc);
- if (cc_extra) {
- void *old = cc_extra->record.user;
-
- cc_extra->record.user = cc->record.user; /* @@@ eww ! */
- record_replay(&cc_extra->record, 0);
- cc_extra->record.user = old;
- }
- record_replay(&cc->record, 0);
+ record_replay(&cc->record, extra);
if (res_cr)
*res_cr = cr;