Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25403
Modified Files: Tag: devel_0_39 desire.c Log Message: removed explicit setting of canvas in client-side objects
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.123 retrieving revision 1.1.2.124 diff -C2 -d -r1.1.2.123 -r1.1.2.124 *** desire.c 22 Aug 2006 11:10:32 -0000 1.1.2.123 --- desire.c 30 Aug 2006 17:26:24 -0000 1.1.2.124 *************** *** 3630,3646 **** float glist_pixelstox(t_glist *x, float xpix) { int x1, y1, x2, y2; ! if (!x->gl_isgraph) return x->gl_x1 + (x->gl_x2 - x->gl_x1) * xpix; ! if (x->gl_havewindow) return x->gl_x1 + (x->gl_x2 - x->gl_x1) * xpix / (x->gl_screenx2 - x->gl_screenx1); if (!x->gl_owner) bug("glist_pixelstox"); graph_graphrect(&x->gl_gobj, x->gl_owner, &x1, &y1, &x2, &y2); ! return x->gl_x1 + (x->gl_x2 - x->gl_x1) * (xpix - x1) / (x2 - x1); } float glist_pixelstoy(t_glist *x, float ypix) { int x1, y1, x2, y2; ! if (!x->gl_isgraph) return x->gl_y1 + (x->gl_y2 - x->gl_y1) * ypix; ! if (x->gl_havewindow) return x->gl_y1 + (x->gl_y2 - x->gl_y1) * ypix / (x->gl_screeny2 - x->gl_screeny1); if (!x->gl_owner) bug("glist_pixelstox"); graph_graphrect(&x->gl_gobj, x->gl_owner, &x1, &y1, &x2, &y2); ! return x->gl_y1 + (x->gl_y2 - x->gl_y1) * (ypix - y1) / (y2 - y1); }
--- 3630,3648 ---- float glist_pixelstox(t_glist *x, float xpix) { int x1, y1, x2, y2; ! float width = x->gl_x2-x->gl_x1; ! if (!x->gl_isgraph) return x->gl_x1 + width * xpix; ! if (x->gl_havewindow) return x->gl_x1 + width * xpix / (x->gl_screenx2-x->gl_screenx1); if (!x->gl_owner) bug("glist_pixelstox"); graph_graphrect(&x->gl_gobj, x->gl_owner, &x1, &y1, &x2, &y2); ! return x->gl_x1 + width * (xpix-x1) / (x2-x1); } float glist_pixelstoy(t_glist *x, float ypix) { int x1, y1, x2, y2; ! float height = x->gl_y2-x->gl_y1; ! if (!x->gl_isgraph) return x->gl_y1 + height * ypix; ! if (x->gl_havewindow) return x->gl_y1 + height * ypix / (x->gl_screeny2-x->gl_screeny1); if (!x->gl_owner) bug("glist_pixelstox"); graph_graphrect(&x->gl_gobj, x->gl_owner, &x1, &y1, &x2, &y2); ! return x->gl_y1 + height * (ypix-y1) / (y2-y1); }
*************** *** 8608,8612 **** t_text *x = (t_text *)pd_new(text_class); t_atom at; - sys_vgui("global _; set _(x%x:canvas) x%lx\n",(long)x,(long)gl); x->te_width = 0; x->te_type = T_TEXT; --- 8610,8613 ---- *************** *** 8654,8658 **** } if (!x) x = (t_text *)pd_new(text_class); - sys_vgui("global _; set _(x%x:canvas) x%lx\n",(long)x,(long)gl); x->te_binbuf = b; x->te_xpix = xpix; --- 8655,8658 ----