From d6a71adae7c90224e2a49f0edcd4fd52fa0a1b30 Mon Sep 17 00:00:00 2001 From: Miller Puckette <millerpuckette@users.sourceforge.net> Date: Fri, 19 Aug 2005 23:28:03 +0000 Subject: Version 0.39-0test5. Bug fixes and more care about closing dirty windows and quitting. svn path=/trunk/; revision=3434 --- pd/src/g_template.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pd/src/g_template.c') diff --git a/pd/src/g_template.c b/pd/src/g_template.c index 69f1c864..b1046447 100644 --- a/pd/src/g_template.c +++ b/pd/src/g_template.c @@ -1524,7 +1524,9 @@ static void plot_getrect(t_gobj *z, t_glist *glist, xfielddesc, yfielddesc, wfielddesc, &xonset, &yonset, &wonset)) { - for (i = 0, xsum = 0; i < array->a_n; i++) + /* if it has more than 2000 points, just check 1000 of them. */ + int incr = (array->a_n <= 2000 ? 1 : array->a_n / 1000); + for (i = 0, xsum = 0; i < array->a_n; i += incr) { float usexloc, useyloc; t_gobj *y; -- cgit v1.2.1