From 8c3faa20d73622d75573f1458218b36ee5613a7e Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Sat, 2 Jul 2005 05:03:06 +0000 Subject: new graph-on-parent behavior - no more of the stretching behavior. Existing patches should behave compatibly, but new ones will work differently (much much better.) svn path=/trunk/; revision=3283 --- pd/src/g_readwrite.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'pd/src/g_readwrite.c') diff --git a/pd/src/g_readwrite.c b/pd/src/g_readwrite.c index 7a3a161c..d8090b48 100644 --- a/pd/src/g_readwrite.c +++ b/pd/src/g_readwrite.c @@ -597,11 +597,23 @@ static void canvas_saveto(t_canvas *x, t_binbuf *b) print out a "coords" message to set up the coordinate systems */ if (x->gl_isgraph || x->gl_x1 || x->gl_y1 || x->gl_x2 != 1 || x->gl_y2 != 1 || x->gl_pixwidth || x->gl_pixheight) - binbuf_addv(b, "ssfffffff;", gensym("#X"), gensym("coords"), + { + if (x->gl_isgraph && x->gl_goprect) + /* if we have a graph-on-parent rectangle, we're new style. + The format is arranged so + that old versions of Pd can at least do something with it. */ + binbuf_addv(b, "ssfffffffff;", gensym("#X"), gensym("coords"), + x->gl_x1, x->gl_y1, + x->gl_x2, x->gl_y2, + (float)x->gl_pixwidth, (float)x->gl_pixheight, + 1., (float)x->gl_xmargin, (float)x->gl_ymargin); + /* otherwise write in 0.38-compatible form */ + else binbuf_addv(b, "ssfffffff;", gensym("#X"), gensym("coords"), x->gl_x1, x->gl_y1, x->gl_x2, x->gl_y2, (float)x->gl_pixwidth, (float)x->gl_pixheight, (float)x->gl_isgraph); + } } /* call this recursively to collect all the template names for -- cgit v1.2.1