From c59464f01c8151baaa42dcb8641d73c58dc79fda Mon Sep 17 00:00:00 2001 From: Miller Puckette Date: Sat, 25 Jun 2005 02:49:15 +0000 Subject: major extensions to drawing commands in templates, to allow scaling and invisibilizing. New "coreaudio" search (from patch). couple of bug fixes. svn path=/trunk/; revision=3249 --- pd/src/g_array.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'pd/src/g_array.c') diff --git a/pd/src/g_array.c b/pd/src/g_array.c index 4d0aa225..14854f0a 100644 --- a/pd/src/g_array.c +++ b/pd/src/g_array.c @@ -80,7 +80,6 @@ void array_resize(t_array *x, int n) { char *cp = x->a_vec + elemsize * oldn; int i = n - oldn; - post("%d->%d", oldn, i); for (; i--; cp += elemsize) { t_word *wp = (t_word *)cp; @@ -730,7 +729,7 @@ static int array_doclick_element(t_array *array, t_glist *glist, they can be static (look in g_canvas.h for candidates). */ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, t_symbol *elemtemplatesym, - float linewidth, float xloc, float xinc, float yloc, + float linewidth, float xloc, float xinc, float yloc, float scalarvis, t_fielddesc *xfield, t_fielddesc *yfield, t_fielddesc *wfield, int xpix, int ypix, int shift, int alt, int dbl, int doit) { @@ -777,10 +776,14 @@ int array_doclick(t_array *array, t_glist *glist, t_scalar *sc, t_array *ap, } } if (best > 8) - return (array_doclick_element(array, glist, sc, ap, - elemtemplatesym, linewidth, xloc, xinc, yloc, - xfield, yfield, wfield, - xpix, ypix, shift, alt, dbl, doit)); + { + if (scalarvis != 0) + return (array_doclick_element(array, glist, sc, ap, + elemtemplatesym, linewidth, xloc, xinc, yloc, + xfield, yfield, wfield, + xpix, ypix, shift, alt, dbl, doit)); + else return (0); + } best += 0.001; /* add truncation error margin */ for (i = 0; i < array->a_n; i += incr) { -- cgit v1.2.1