aboutsummaryrefslogtreecommitdiff
path: root/pd/src/g_graph.c
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2006-06-03 19:13:08 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2006-06-03 19:13:08 +0000
commitbeb2211b63b4b80ee07a807e5ffdd441aeea6354 (patch)
tree876eb052d5cec7755053328a470c75e0638b6b94 /pd/src/g_graph.c
parenteb976fa09171036cbaeaabf920708b2d39c49acc (diff)
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
Diffstat (limited to 'pd/src/g_graph.c')
-rw-r--r--pd/src/g_graph.c14
1 files changed, 8 insertions, 6 deletions
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);
}