Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv581
Modified Files: Tag: devel_0_39 desire.c Log Message: .
Index: desire.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/desire.c,v retrieving revision 1.1.2.48 retrieving revision 1.1.2.49 diff -C2 -d -r1.1.2.48 -r1.1.2.49 *** desire.c 2 Nov 2005 12:03:41 -0000 1.1.2.48 --- desire.c 6 Nov 2005 21:09:24 -0000 1.1.2.49 *************** *** 3243,3273 **** { y2 = y->g_next; ! if (glist_isselected(x, y)) ! { ! if (seltail) ! { ! seltail->g_next = y; ! seltail = y; ! y->g_next = 0; ! } ! else ! { ! selhead = seltail = y; ! seltail->g_next = 0; ! } ! } ! else ! { ! if (nontail) ! { ! nontail->g_next = y; ! nontail = y; ! y->g_next = 0; ! } ! else ! { ! nonhead = nontail = y; ! nontail->g_next = 0; ! } } } --- 3243,3250 ---- { y2 = y->g_next; ! if (glist_isselected(x, y)) { ! if (seltail) {seltail->g_next = y; seltail = y; y->g_next = 0;} else {selhead = seltail = y; seltail->g_next = 0;} ! } else { ! if (nontail) {nontail->g_next = y; nontail = y; y->g_next = 0;} else {nonhead = nontail = y; nontail->g_next = 0;} } } *************** *** 4233,4257 **** char cmdbuf[200]; t_array *a = garray_getarray_floatonly(x, &yonset, &elemsize); ! ! if (!a) ! { ! /* FIXME */ ! error("error in garray_arrayviewlist_new()"); ! } x->x_listviewing = 1; ! sprintf(cmdbuf, ! "pdtk_array_listview_new %%s %s %d\n", ! x->x_realname->s_name, ! 0); gfxstub_new(&x->x_gobj.g_pd, x, cmdbuf); for (i = 0; i < ARRAYPAGESIZE && i < a->a_n; i++) { ! yval = *(float *)(a->a_vec + ! elemsize * i + yonset); sys_vgui(".%sArrayWindow.lb insert %d {%d) %g}\n", ! x->x_realname->s_name, ! i, ! i, ! yval); } } --- 4210,4222 ---- char cmdbuf[200]; t_array *a = garray_getarray_floatonly(x, &yonset, &elemsize); ! if (!a) { /* FIXME */ error("error in garray_arrayviewlist_new()");} x->x_listviewing = 1; ! sprintf(cmdbuf, "pdtk_array_listview_new %%s %s %d\n", x->x_realname->s_name, 0); gfxstub_new(&x->x_gobj.g_pd, x, cmdbuf); for (i = 0; i < ARRAYPAGESIZE && i < a->a_n; i++) { ! yval = *(float *)(a->a_vec + elemsize * i + yonset); sys_vgui(".%sArrayWindow.lb insert %d {%d) %g}\n", ! x->x_realname->s_name, i, i, yval); } } *************** *** 4341,4350 **** { float xval, yval, ypix, wpix; ! if (xonset >= 0) ! xval = *(float *)(elem + xonset); ! else xval = indx * xinc; ! if (yonset >= 0) ! yval = *(float *)(elem + yonset); ! else yval = 0; ypix = glist_ytopixels(glist, basey + fielddesc_cvttocoord(yfielddesc, yval)); --- 4306,4311 ---- { float xval, yval, ypix, wpix; ! if (xonset >= 0) xval = *(float *)(elem + xonset); else xval = indx * xinc; ! if (yonset >= 0) yval = *(float *)(elem + yonset); else yval = 0; ypix = glist_ytopixels(glist, basey + fielddesc_cvttocoord(yfielddesc, yval)); *************** *** 5828,5840 **** This is terribly inefficient; but probably not a big enough CPU hog to warrant optimizing. */ ! float glist_dpixtodx(t_glist *x, float dxpix) ! { ! return (dxpix * (glist_pixelstox(x, 1) - glist_pixelstox(x, 0))); ! } ! ! float glist_dpixtody(t_glist *x, float dypix) ! { ! return (dypix * (glist_pixelstoy(x, 1) - glist_pixelstoy(x, 0))); ! }
/* get the window location in pixels of a "text" object. The --- 5789,5794 ---- This is terribly inefficient; but probably not a big enough CPU hog to warrant optimizing. */ ! float glist_dpixtodx(t_glist *x, float dxpix) {return dxpix*(glist_pixelstox(x, 1)-glist_pixelstox(x, 0));} ! float glist_dpixtody(t_glist *x, float dypix) {return dypix*(glist_pixelstoy(x, 1)-glist_pixelstoy(x, 0));}
/* get the window location in pixels of a "text" object. The *************** *** 5905,5908 **** --- 5859,5863 ---- { t_glist *x = (t_glist *)gr; + t_glist *c = glist_getcanvas(x->gl_owner); char tag[50]; t_gobj *g; *************** *** 5931,5945 **** { if (vis) ! { ! sys_vgui(".x%lx.c create polygon\ ! %d %d %d %d %d %d %d %d %d %d -tags %s -fill #c0c0c0\n", ! (long)glist_getcanvas(x->gl_owner), ! x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag); ! } ! else ! { ! sys_vgui(".x%lx.c delete %s\n", ! (long)glist_getcanvas(x->gl_owner), tag); ! } return; } --- 5886,5892 ---- { if (vis) ! sys_vgui(".x%lx.c create polygon %d %d %d %d %d %d %d %d %d %d -tags %s -fill #c0c0c0\n", ! (long)c, x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag); ! else sys_vgui(".x%lx.c delete %s\n", (long)c, tag); return; } *************** *** 5953,5957 **** sys_vgui(".x%lx.c create line\ %d %d %d %d %d %d %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
--- 5900,5904 ---- sys_vgui(".x%lx.c create line\ %d %d %d %d %d %d %d %d %d %d -tags %s\n", ! (long)c, x1, y1, x1, y2, x2, y2, x2, y1, x1, y1, tag);
*************** *** 5974,5978 **** float upix, lpix; if (y2 < y1) ! upix = y1, lpix = y2; else upix = y2, lpix = y1; for (i = 0, f = x->gl_xtick.k_point; --- 5921,5925 ---- float upix, lpix; if (y2 < y1) ! upix = y1, lpix = y2; else upix = y2, lpix = y1; for (i = 0, f = x->gl_xtick.k_point; *************** *** 5981,5990 **** { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)lpix, (int)glist_xtopixels(x, f), (int)lpix + tickpix, tag); --- 5928,5935 ---- { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, (int)glist_xtopixels(x, f), (int)lpix, (int)glist_xtopixels(x, f), (int)lpix + tickpix, tag); *************** *** 5995,6004 **** { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), (int)glist_xtopixels(x, f), (int)lpix, (int)glist_xtopixels(x, f), (int)lpix + tickpix, tag); --- 5940,5947 ---- { int tickpix = (i % x->gl_xtick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, (int)glist_xtopixels(x, f), (int)upix, (int)glist_xtopixels(x, f), (int)upix - tickpix, tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, (int)glist_xtopixels(x, f), (int)lpix, (int)glist_xtopixels(x, f), (int)lpix + tickpix, tag); *************** *** 6018,6027 **** { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), x2, (int)glist_ytopixels(x, f), x2 - tickpix, (int)glist_ytopixels(x, f), tag); --- 5961,5968 ---- { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, x2, (int)glist_ytopixels(x, f), x2 - tickpix, (int)glist_ytopixels(x, f), tag); *************** *** 6032,6041 **** { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", ! (long)glist_getcanvas(x->gl_owner), x2, (int)glist_ytopixels(x, f), x2 - tickpix, (int)glist_ytopixels(x, f), tag); --- 5973,5980 ---- { int tickpix = (i % x->gl_ytick.k_lperb ? 2 : 4); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, x1, (int)glist_ytopixels(x, f), x1 + tickpix, (int)glist_ytopixels(x, f), tag); ! sys_vgui(".x%lx.c create line %d %d %d %d -tags %s\n", (long)c, x2, (int)glist_ytopixels(x, f), x2 - tickpix, (int)glist_ytopixels(x, f), tag); *************** *** 6068,6072 **** { sys_vgui(".x%lx.c delete %s\n", ! (long)glist_getcanvas(x->gl_owner), tag); for (g = x->gl_list; g; g = g->g_next) gobj_vis(g, x, 0); --- 6007,6011 ---- { sys_vgui(".x%lx.c delete %s\n", ! (long)c, tag); for (g = x->gl_list; g; g = g->g_next) gobj_vis(g, x, 0); *************** *** 8543,8550 **** *conformaction = (int *)getbytes(sizeof(int) * nto), *conformedfrom = (int *)getbytes(sizeof(int) * nfrom), doit = 0; ! for (i = 0; i < nto; i++) ! conformaction[i] = -1; ! for (i = 0; i < nfrom; i++) ! conformedfrom[i] = 0; for (i = 0; i < nto; i++) { --- 8482,8487 ---- *conformaction = (int *)getbytes(sizeof(int) * nto), *conformedfrom = (int *)getbytes(sizeof(int) * nfrom), doit = 0; ! for (i=0; i< nto; i++) conformaction[i] = -1; ! for (i=0; i<nfrom; i++) conformedfrom[i] = 0; for (i = 0; i < nto; i++) { *************** *** 8962,8977 **** t_word *wp, int loud) { ! if (f->fd_type == A_FLOAT) ! { ! if (f->fd_var) ! return (template_getfloat(template, f->fd_un.fd_varsym, wp, loud)); ! else return (f->fd_un.fd_float); ! } ! else ! { ! if (loud) ! error("symbolic data field used as number"); ! return (0); ! } }
--- 8899,8905 ---- t_word *wp, int loud) { ! if (f->fd_type!=A_FLOAT) {if (loud) error("symbolic data field used as number"); return 0;} ! if (f->fd_var) return template_getfloat(template, f->fd_un.fd_varsym, wp, loud); ! return f->fd_un.fd_float; }
*************** *** 8984,8995 **** div = (f->fd_screen2 - f->fd_screen1)/(f->fd_v2 - f->fd_v1); coord = f->fd_screen1 + (val - f->fd_v1) * div; ! extreme = (f->fd_screen1 < f->fd_screen2 ? ! f->fd_screen1 : f->fd_screen2); ! if (coord < extreme) ! coord = extreme; ! extreme = (f->fd_screen1 > f->fd_screen2 ? ! f->fd_screen1 : f->fd_screen2); ! if (coord > extreme) ! coord = extreme; return (coord); } --- 8912,8917 ---- div = (f->fd_screen2 - f->fd_screen1)/(f->fd_v2 - f->fd_v1); coord = f->fd_screen1 + (val - f->fd_v1) * div; ! extreme = (f->fd_screen1 < f->fd_screen2 ? f->fd_screen1 : f->fd_screen2); if (coord < extreme) coord = extreme; ! extreme = (f->fd_screen1 > f->fd_screen2 ? f->fd_screen1 : f->fd_screen2); if (coord > extreme) coord = extreme; return (coord); } *************** *** 8999,9018 **** t_word *wp, int loud) { ! if (f->fd_type == A_FLOAT) ! { ! if (f->fd_var) ! { ! float val = template_getfloat(template, ! f->fd_un.fd_varsym, wp, loud); ! return (fielddesc_cvttocoord(f, val)); ! } ! else return (f->fd_un.fd_float); ! } ! else ! { ! if (loud) ! error("symbolic data field used as number"); ! return (0); ! } }
--- 8921,8927 ---- t_word *wp, int loud) { ! if (f->fd_type!=A_FLOAT) {if (loud) error("symbolic data field used as number"); return 0;} ! if (f->fd_var) return fielddesc_cvttocoord(f, template_getfloat(template, f->fd_un.fd_varsym, wp, loud)); ! return f->fd_un.fd_float; }
*************** *** 9020,9035 **** t_word *wp, int loud) { ! if (f->fd_type == A_SYMBOL) ! { ! if (f->fd_var) ! return(template_getsymbol(template, f->fd_un.fd_varsym, wp, loud)); ! else return (f->fd_un.fd_symbol); ! } ! else ! { ! if (loud) ! error("numeric data field used as symbol"); ! return (&s_); ! } }
--- 8929,8935 ---- t_word *wp, int loud) { ! if (f->fd_type!=A_SYMBOL) {if (loud) error("numeric data field used as symbol"); return &s_;} ! if (f->fd_var) return template_getsymbol(template, f->fd_un.fd_varsym, wp, loud); ! return f->fd_un.fd_symbol; }
*************** *** 9047,9056 **** if (f->fd_quantum != 0) val = ((int)((val/f->fd_quantum) + 0.5)) * f->fd_quantum; ! extreme = (f->fd_v1 < f->fd_v2 ? ! f->fd_v1 : f->fd_v2); ! if (val < extreme) val = extreme; ! extreme = (f->fd_v1 > f->fd_v2 ? ! f->fd_v1 : f->fd_v2); ! if (val > extreme) val = extreme; } return (val); --- 8947,8952 ---- if (f->fd_quantum != 0) val = ((int)((val/f->fd_quantum) + 0.5)) * f->fd_quantum; ! extreme = (f->fd_v1 < f->fd_v2 ? f->fd_v1 : f->fd_v2); if (val<extreme) val=extreme; ! extreme = (f->fd_v1 > f->fd_v2 ? f->fd_v1 : f->fd_v2); if (val>extreme) val=extreme; } return (val); *************** *** 9123,9133 **** else break; } ! if ((flags & CLOSED) && argc) ! fielddesc_setfloatarg(&x->x_fillcolor, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_fillcolor, 0); ! if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_outlinecolor, 0); ! if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_width, 1); if (argc < 0) argc = 0; nxy = (argc + (argc & 1)); --- 9019,9025 ---- else break; } ! if ((flags & CLOSED) && argc) fielddesc_setfloatarg(&x->x_fillcolor, argc--, argv++); else fielddesc_setfloat_const(&x->x_fillcolor, 0); ! if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++); else fielddesc_setfloat_const(&x->x_outlinecolor, 0); ! if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++); else fielddesc_setfloat_const(&x->x_width, 1); if (argc < 0) argc = 0; nxy = (argc + (argc & 1)); *************** *** 9176,9183 **** for (i = 0, f = x->x_vec; i < n; i++, f += 2) { ! int xloc = glist_xtopixels(glist, ! basex + fielddesc_getcoord(f, template, data, 0)); ! int yloc = glist_ytopixels(glist, ! basey + fielddesc_getcoord(f+1, template, data, 0)); if (xloc < x1) x1 = xloc; if (xloc > x2) x2 = xloc; --- 9068,9073 ---- for (i = 0, f = x->x_vec; i < n; i++, f += 2) { ! int xloc = glist_xtopixels(glist, basex + fielddesc_getcoord(f , template, data, 0)); ! int yloc = glist_ytopixels(glist, basey + fielddesc_getcoord(f+1, template, data, 0)); if (xloc < x1) x1 = xloc; if (xloc > x2) x2 = xloc; *************** *** 9461,9505 **** argc--, argv++; } ! else if (!strcmp(firstarg->s_name, "-v") && argc > 1) ! { ! fielddesc_setfloatarg(&x->x_vis, 1, argv+1); ! argc -= 2; argv += 2; ! } ! else if (!strcmp(firstarg->s_name, "-vs") && argc > 1) ! { ! fielddesc_setfloatarg(&x->x_scalarvis, 1, argv+1); ! argc -= 2; argv += 2; ! } ! else if (!strcmp(firstarg->s_name, "-x") && argc > 1) ! { ! fielddesc_setfloatarg(&x->x_xpoints, 1, argv+1); ! argc -= 2; argv += 2; ! } ! else if (!strcmp(firstarg->s_name, "-y") && argc > 1) ! { ! fielddesc_setfloatarg(&x->x_ypoints, 1, argv+1); ! argc -= 2; argv += 2; ! } ! else if (!strcmp(firstarg->s_name, "-w") && argc > 1) ! { ! fielddesc_setfloatarg(&x->x_wpoints, 1, argv+1); ! argc -= 2; argv += 2; ! } else break; } ! if (argc) fielddesc_setarrayarg(&x->x_data, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_data, 1); ! if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_outlinecolor, 0); ! if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_width, 1); ! if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_xloc, 1); ! if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_yloc, 1); ! if (argc) fielddesc_setfloatarg(&x->x_xinc, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_xinc, 1); ! if (argc) fielddesc_setfloatarg(&x->x_style, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_style, defstyle); return (x); } --- 9351,9368 ---- argc--, argv++; } ! else if (!strcmp(firstarg->s_name, "-v") && argc > 1) {fielddesc_setfloatarg(&x->x_vis, 1, argv+1); argc -= 2; argv += 2;} ! else if (!strcmp(firstarg->s_name, "-vs") && argc > 1) {fielddesc_setfloatarg(&x->x_scalarvis, 1, argv+1); argc -= 2; argv += 2;} ! else if (!strcmp(firstarg->s_name, "-x") && argc > 1) {fielddesc_setfloatarg(&x->x_xpoints, 1, argv+1); argc -= 2; argv += 2;} ! else if (!strcmp(firstarg->s_name, "-y") && argc > 1) {fielddesc_setfloatarg(&x->x_ypoints, 1, argv+1); argc -= 2; argv += 2;} ! else if (!strcmp(firstarg->s_name, "-w") && argc > 1) {fielddesc_setfloatarg(&x->x_wpoints, 1, argv+1); argc -= 2; argv += 2;} else break; } ! if (argc) fielddesc_setarrayarg(&x->x_data, argc--, argv++); else fielddesc_setfloat_const(&x->x_data, 1); ! if (argc) fielddesc_setfloatarg(&x->x_outlinecolor, argc--, argv++); else fielddesc_setfloat_const(&x->x_outlinecolor, 0); ! if (argc) fielddesc_setfloatarg(&x->x_width, argc--, argv++); else fielddesc_setfloat_const(&x->x_width, 1); ! if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++); else fielddesc_setfloat_const(&x->x_xloc, 1); ! if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++); else fielddesc_setfloat_const(&x->x_yloc, 1); ! if (argc) fielddesc_setfloatarg(&x->x_xinc, argc--, argv++); else fielddesc_setfloat_const(&x->x_xinc, 1); ! if (argc) fielddesc_setfloatarg(&x->x_style, argc--, argv++); else fielddesc_setfloat_const(&x->x_style, defstyle); return (x); } *************** *** 9663,9674 **** xonset, yonset, wonset, i, basex + xloc, basey + yloc, xinc, xfielddesc, yfielddesc, wfielddesc, &xpix, &ypix, &wpix); ! if (xpix < x1) ! x1 = xpix; ! if (xpix > x2) ! x2 = xpix; ! if (ypix - wpix < y1) ! y1 = ypix - wpix; ! if (ypix + wpix > y2) ! y2 = ypix + wpix;
if (scalarvis != 0) --- 9526,9533 ---- xonset, yonset, wonset, i, basex + xloc, basey + yloc, xinc, xfielddesc, yfielddesc, wfielddesc, &xpix, &ypix, &wpix); ! if (xpix < x1) x1 = xpix; ! if (xpix > x2) x2 = xpix; ! if (ypix - wpix < y1) y1 = ypix - wpix; ! if (ypix + wpix > y2) y2 = ypix + wpix;
if (scalarvis != 0) *************** *** 9694,9705 **** elemtemplate, usexloc, useyloc, &xx1, &yy1, &xx2, &yy2); ! if (xx1 < x1) ! x1 = xx1; ! if (yy1 < y1) ! y1 = yy1; ! if (xx2 > x2) ! x2 = xx2; ! if (yy2 > y2) ! y2 = yy2; } } --- 9553,9560 ---- elemtemplate, usexloc, useyloc, &xx1, &yy1, &xx2, &yy2); ! if (xx1 < x1) x1 = xx1; ! if (yy1 < y1) y1 = yy1; ! if (xx2 > x2) x2 = xx2; ! if (yy2 > y2) y2 = yy2; } } *************** *** 10087,10110 **** else break; } ! if (flags & DRAW_SYMBOL) ! { ! if (argc) fielddesc_setsymbolarg(&x->x_value, argc--, argv++); ! else fielddesc_setsymbol_const(&x->x_value, &s_); ! } ! else ! { ! if (argc) fielddesc_setfloatarg(&x->x_value, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_value, 0); } ! if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_xloc, 0); ! if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_yloc, 0); ! if (argc) fielddesc_setfloatarg(&x->x_color, argc--, argv++); ! else fielddesc_setfloat_const(&x->x_color, 1); ! if (argc) ! x->x_label = atom_getsymbolarg(0, argc, argv); ! else x->x_label = &s_; ! return (x); } --- 9942,9954 ---- else break; } ! if (flags & DRAW_SYMBOL) { ! if (argc) fielddesc_setsymbolarg(&x->x_value, argc--, argv++); else fielddesc_setsymbol_const(&x->x_value, &s_); ! } else { ! if (argc) fielddesc_setfloatarg(&x->x_value, argc--, argv++); else fielddesc_setfloat_const(&x->x_value, 0); } ! if (argc) fielddesc_setfloatarg(&x->x_xloc, argc--, argv++); else fielddesc_setfloat_const(&x->x_xloc, 0); ! if (argc) fielddesc_setfloatarg(&x->x_yloc, argc--, argv++); else fielddesc_setfloat_const(&x->x_yloc, 0); ! if (argc) fielddesc_setfloatarg(&x->x_color, argc--, argv++); else fielddesc_setfloat_const(&x->x_color, 1); ! if (argc) x->x_label = atom_getsymbolarg(0, argc, argv); else x->x_label = &s_; return (x); } *************** *** 10197,10204 **** { t_atom at; ! int xloc = glist_xtopixels(glist, ! basex + fielddesc_getcoord(&x->x_xloc, template, data, 0)); ! int yloc = glist_ytopixels(glist, ! basey + fielddesc_getcoord(&x->x_yloc, template, data, 0)); char colorstring[20], buf[DRAWNUMBER_BUFSIZE]; numbertocolor(fielddesc_getfloat(&x->x_color, template, data, 1), --- 10041,10046 ---- { t_atom at; ! int xloc = glist_xtopixels(glist, basex + fielddesc_getcoord(&x->x_xloc, template, data, 0)); ! int yloc = glist_ytopixels(glist, basey + fielddesc_getcoord(&x->x_yloc, template, data, 0)); char colorstring[20], buf[DRAWNUMBER_BUFSIZE]; numbertocolor(fielddesc_getfloat(&x->x_color, template, data, 1), *************** *** 10237,10244 **** drawnumber_motion_ycumulative, 1); ! if (drawnumber_motion_scalar) ! scalar_redraw(drawnumber_motion_scalar, drawnumber_motion_glist); ! if (drawnumber_motion_array) ! array_redraw(drawnumber_motion_array, drawnumber_motion_glist); }
--- 10079,10084 ---- drawnumber_motion_ycumulative, 1); ! if (drawnumber_motion_scalar) scalar_redraw(drawnumber_motion_scalar, drawnumber_motion_glist); ! if (drawnumber_motion_array) array_redraw(drawnumber_motion_array, drawnumber_motion_glist); }