diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-07-02 05:03:06 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2005-07-02 05:03:06 +0000 |
commit | 8c3faa20d73622d75573f1458218b36ee5613a7e (patch) | |
tree | 76987130124f0b57b25e2a0777dbd2e4d4fe00f8 /pd/src/g_readwrite.c | |
parent | c59464f01c8151baaa42dcb8641d73c58dc79fda (diff) |
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
Diffstat (limited to 'pd/src/g_readwrite.c')
-rw-r--r-- | pd/src/g_readwrite.c | 14 |
1 files changed, 13 insertions, 1 deletions
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 |