[Gridflow-cvs] [svn] commit: r3858 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Wed Jun 11 15:06:35 EDT 2008


Author: matju
Date: Wed Jun 11 15:06:35 2008
New Revision: 3858

Log:
[#border] = [#border (1 1 0) (1 1 0)]

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Wed Jun 11 15:06:35 2008
@@ -1499,9 +1499,12 @@
 	\grin 0
 	\grin 1 int
 	\grin 2 int
-	\constructor (Grid *dl, Grid *dr) {
-		diml_grid=dl; diml = diml_grid->to_dim();
-		dimr_grid=dr; dimr = dimr_grid->to_dim();
+	\constructor (Grid *dl=0, Grid *dr=0) {
+		t_atom a[2]; SETFLOAT(a+0,1); SETFLOAT(a+1,1); SETFLOAT(a+2,0);
+		diml_grid=dl?dl:new Grid(3,a,int32_e);
+		dimr_grid=dr?dr:new Grid(3,a,int32_e);
+		diml = diml_grid->to_dim();
+		dimr = dimr_grid->to_dim();
 	}
 };
 
@@ -1531,8 +1534,8 @@
 	for (int i=0; i<dimr->v[0]; i++) out->send(zxc,duh);
 } GRID_END
 
-GRID_INPUT(GridBorder,1,diml_grid) { diml = diml_grid->to_dim(); } GRID_END
-GRID_INPUT(GridBorder,2,dimr_grid) { dimr = dimr_grid->to_dim(); } GRID_END
+GRID_INPUT(GridBorder,1,diml_grid) {diml = diml_grid->to_dim();} GRID_END
+GRID_INPUT(GridBorder,2,dimr_grid) {dimr = dimr_grid->to_dim();} GRID_END
 
 \end class {install("#border",3,1);}
 
@@ -1697,8 +1700,7 @@
 	\constructor (Grid *factor=0) {
 		scale.constrain(expect_scale_factor);
 		t_atom a[1]; SETFLOAT(a,2);
-		scale=new Grid(1,a,int32_e);
-		if (factor) scale=factor;
+		scale = factor?factor:new Grid(1,a,int32_e);
 		prepare_scale_factor();
 	}
 	\grin 0
@@ -1752,8 +1754,7 @@
 	\constructor (Grid *factor=0, t_symbol *option=0) {
 		scale.constrain(expect_scale_factor);
 		t_atom a[1]; SETFLOAT(a,2);
-		scale=new Grid(1,a,int32_e);
-		if (factor) scale=factor;
+		scale = factor?factor:new Grid(1,a,int32_e);
 		prepare_scale_factor();
 		smoothly = option==gensym("smoothly");
 	}



More information about the Gridflow-cvs mailing list