From beb2211b63b4b80ee07a807e5ffdd441aeea6354 Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Sat, 3 Jun 2006 19:13:08 +0000 Subject: FFT package selection Zmoelnig's multi-'$' patch big-soundfile support Patch to set open directories (openpanel, savepanel) patch to allow funny characters in extern names fixed makefile.in to support intel mac svn path=/trunk/; revision=5164 --- pd/src/g_graph.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pd/src/g_graph.c') diff --git a/pd/src/g_graph.c b/pd/src/g_graph.c index 305da6aa..97fe71e7 100644 --- a/pd/src/g_graph.c +++ b/pd/src/g_graph.c @@ -672,7 +672,7 @@ void glist_redraw(t_glist *x) /* --------------------------- widget behavior ------------------- */ extern t_widgetbehavior text_widgetbehavior; -t_symbol *garray_getname(t_garray *x); +int garray_getname(t_garray *x, t_symbol **namep); /* Note that some code in here would also be useful for drawing @@ -726,6 +726,7 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis) float f; t_gobj *g; t_symbol *arrayname; + t_garray *ga; /* draw a rectangle around the graph */ sys_vgui(".x%lx.c create line\ %d %d %d %d %d %d %d %d %d %d -tags %s\n", @@ -734,13 +735,14 @@ static void graph_vis(t_gobj *gr, t_glist *parent_glist, int vis) /* if there's just one "garray" in the graph, write its name along the top */ - if ((g = x->gl_list) && !g->g_next && (g->g_pd == garray_class)) + for (i = (y1 < y2 ? y1 : y2)-1, g = x->gl_list; g; g = g->g_next) + if (g->g_pd == garray_class && + !garray_getname((t_garray *)g, &arrayname)) { - int ymin = (y1 < y2 ? y1 : y2); - t_symbol *s = garray_getname((t_garray *)g); - sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor sw\ + i -= sys_fontheight(glist_getfont(x)); + sys_vgui(".x%lx.c create text %d %d -text {%s} -anchor nw\ -font -*-courier-bold--normal--%d-* -tags %s\n", - (long)glist_getcanvas(x), x1, ymin, s->s_name, + (long)glist_getcanvas(x), x1, i, arrayname->s_name, sys_hostfontsize(glist_getfont(x)), tag); } -- cgit v1.2.1