[PD-cvs] externals/unauthorized/grid CHANGES.LOG, 1.4, 1.5 grid-help.pd, 1.1, 1.2 grid.c, 1.8, 1.9 help-grid.pd, 1.4, 1.5

Yves Degoyon sevyves at users.sourceforge.net
Fri Sep 1 07:32:24 CEST 2006


Update of /cvsroot/pure-data/externals/unauthorized/grid
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21898

Modified Files:
	CHANGES.LOG grid-help.pd grid.c help-grid.pd 
Log Message:
change color with message from alberto zin

Index: CHANGES.LOG
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/grid/CHANGES.LOG,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CHANGES.LOG	26 Jul 2006 16:49:45 -0000	1.4
--- CHANGES.LOG	1 Sep 2006 05:32:22 -0000	1.5
***************
*** 1,2 ****
--- 1,4 ----
+ 0.8
+   path from alberto zin : change color thru messages
  0.7
    fixed coordinates for GOP support

Index: grid-help.pd
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/grid/grid-help.pd,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** grid-help.pd	25 Sep 2003 20:58:54 -0000	1.1
--- grid-help.pd	1 Sep 2006 05:32:22 -0000	1.2
***************
*** 1,6 ****
  #N canvas 26 1 763 647 10;
! #X obj 71 76 grid grid1 200 0 199 200 0 199 1 1 1 10 10 188 197;
! #X floatatom 72 293 5 0 0;
! #X floatatom 257 282 5 0 0;
  #X text 41 21 Grid is a 2-dimensional control object;
  #X text 319 449 (invoke with <right mouse>Properties );
--- 1,6 ----
  #N canvas 26 1 763 647 10;
! #X obj 72 77 grid grid1 200 0 199 200 0 199 1 1 1 10 10 72 77;
! #X floatatom 72 293 5 0 0 0 - - -;
! #X floatatom 257 282 5 0 0 0 - - -;
  #X text 41 21 Grid is a 2-dimensional control object;
  #X text 319 449 (invoke with <right mouse>Properties );
***************
*** 29,38 ****
  #X msg 653 271 \; pd dsp 1;
  #X obj 276 417 *~;
! #X floatatom 276 360 0 0 0;
  #X obj 357 397 line~;
! #X floatatom 188 380 0 0 0;
  #X obj 188 494 cos~;
  #X obj 188 450 +~;
! #X floatatom 228 506 0 0 100;
  #N canvas 159 26 495 270 output 0;
  #X obj 338 160 t b;
--- 29,38 ----
  #X msg 653 271 \; pd dsp 1;
  #X obj 276 417 *~;
! #X floatatom 276 360 0 0 0 0 - - -;
  #X obj 357 397 line~;
! #X floatatom 188 380 0 0 0 0 - - -;
  #X obj 188 494 cos~;
  #X obj 188 450 +~;
! #X floatatom 228 506 0 0 100 0 - - -;
  #N canvas 159 26 495 270 output 0;
  #X obj 338 160 t b;
***************
*** 90,94 ****
  #X obj 276 385 osc~ 0;
  #X obj 357 371 pack 0 50;
! #X floatatom 357 318 0 0 0;
  #X obj 357 345 / 100;
  #X text 188 345 carrier;
--- 90,94 ----
  #X obj 276 385 osc~ 0;
  #X obj 357 371 pack 0 50;
! #X floatatom 357 318 0 0 0 0 - - -;
  #X obj 357 345 / 100;
  #X text 188 345 carrier;
***************
*** 105,110 ****
  #X text 40 32 It was inspired by the chaospad device;
  #X text 346 568 * Y step : Y delta for an Y update;
! #X floatatom 474 85 5 0 0;
! #X floatatom 586 84 5 0 0;
  #X obj 411 82 pack f f;
  #X msg 332 81 goto \$1 \$2;
--- 105,110 ----
  #X text 40 32 It was inspired by the chaospad device;
  #X text 346 568 * Y step : Y delta for an Y update;
! #X floatatom 474 85 5 0 0 0 - - -;
! #X floatatom 586 84 5 0 0 0 - - -;
  #X obj 411 82 pack f f;
  #X msg 332 81 goto \$1 \$2;
***************
*** 113,136 ****
  #X text 333 63 Set position :;
  #X text 631 85 Y;
! #X floatatom 486 120 5 0 0;
! #X floatatom 586 121 5 0 0;
  #X obj 423 119 pack f f;
  #X msg 546 120 bang;
  #X text 530 120 X;
  #X text 634 121 Y;
! #X floatatom 528 156 5 0 0;
! #X floatatom 633 156 5 0 0;
  #X obj 465 153 pack f f;
  #X msg 593 154 bang;
  #X text 578 155 X;
  #X text 679 156 Y;
! #X floatatom 503 191 5 0 0;
! #X floatatom 607 190 5 0 0;
  #X obj 440 188 pack f f;
  #X msg 568 189 bang;
  #X text 553 190 X;
  #X text 656 191 Y;
! #X floatatom 539 224 5 0 0;
! #X floatatom 638 226 5 0 0;
  #X obj 472 223 pack f f;
  #X msg 600 224 bang;
--- 113,136 ----
  #X text 333 63 Set position :;
  #X text 631 85 Y;
! #X floatatom 486 120 5 0 0 0 - - -;
! #X floatatom 586 121 5 0 0 0 - - -;
  #X obj 423 119 pack f f;
  #X msg 546 120 bang;
  #X text 530 120 X;
  #X text 634 121 Y;
! #X floatatom 528 156 5 0 0 0 - - -;
! #X floatatom 633 156 5 0 0 0 - - -;
  #X obj 465 153 pack f f;
  #X msg 593 154 bang;
  #X text 578 155 X;
  #X text 679 156 Y;
! #X floatatom 503 191 5 0 0 0 - - -;
! #X floatatom 607 190 5 0 0 0 - - -;
  #X obj 440 188 pack f f;
  #X msg 568 189 bang;
  #X text 553 190 X;
  #X text 656 191 Y;
! #X floatatom 539 224 5 0 0 0 - - -;
! #X floatatom 638 226 5 0 0 0 - - -;
  #X obj 472 223 pack f f;
  #X msg 600 224 bang;
***************
*** 146,149 ****
--- 146,151 ----
  #X text 332 205 Set deltas for values without changing output:;
  #X msg 334 223 xvaluemotion \$1 \$2;
+ #X msg 334 250 color 123 45 185;
+ #X text 461 250 change bg color ( from alberto zin );
  #X connect 0 0 1 0;
  #X connect 0 1 2 0;
***************
*** 197,198 ****
--- 199,201 ----
  #X connect 85 0 0 0;
  #X connect 88 0 0 0;
+ #X connect 89 0 0 0;

Index: help-grid.pd
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/grid/help-grid.pd,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** help-grid.pd	2 Mar 2005 02:45:49 -0000	1.4
--- help-grid.pd	1 Sep 2006 05:32:22 -0000	1.5
***************
*** 1,4 ****
  #N canvas 26 1 763 647 10;
! #X obj 72 77 grid grid1 200 0 199 200 0 199 1 1 1 10 10 192 224;
  #X floatatom 72 293 5 0 0 0 - - -;
  #X floatatom 257 282 5 0 0 0 - - -;
--- 1,4 ----
  #N canvas 26 1 763 647 10;
! #X obj 72 77 grid grid1 200 0 199 200 0 199 1 1 1 10 10 72 77;
  #X floatatom 72 293 5 0 0 0 - - -;
  #X floatatom 257 282 5 0 0 0 - - -;
***************
*** 146,149 ****
--- 146,151 ----
  #X text 332 205 Set deltas for values without changing output:;
  #X msg 334 223 xvaluemotion \$1 \$2;
+ #X msg 334 250 color 123 45 185;
+ #X text 461 250 change bg color ( from alberto zin );
  #X connect 0 0 1 0;
  #X connect 0 1 2 0;
***************
*** 197,198 ****
--- 199,201 ----
  #X connect 85 0 0 0;
  #X connect 88 0 0 0;
+ #X connect 89 0 0 0;

Index: grid.c
===================================================================
RCS file: /cvsroot/pure-data/externals/unauthorized/grid/grid.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** grid.c	26 Jul 2006 16:49:45 -0000	1.8
--- grid.c	1 Sep 2006 05:32:22 -0000	1.9
***************
*** 36,40 ****
  static int pointsize = 5;
  
! static char   *grid_version = "grid: version 0.7, written by Yves Degoyon (ydegoyon at free.fr)";
  
  #define GRID_SYS_VGUI2(a,b) if (guidebug) \
--- 36,40 ----
  static int pointsize = 5;
  
! static char   *grid_version = "grid: version 0.8, written by Yves Degoyon (ydegoyon at free.fr)";
  
  #define GRID_SYS_VGUI2(a,b) if (guidebug) \
***************
*** 252,255 ****
--- 252,286 ----
  }
  
+ /*az new method to change color */
+ static void grid_draw_new_color(t_grid *x, t_glist *glist, char *col)
+ {
+   t_canvas *canvas=glist_getcanvas(glist);
+   char *tagRoot;
+   char str1[80];
+ 
+     strcpy (str1,".x%x.c itemconfigure %xGRID -fill #");
+     strcat (str1,col);
+     strcat (str1,"\n");
+     tagRoot = rtext_gettag(glist_findrtext(glist,(t_text *)x));
+     GRID_SYS_VGUI3(str1, canvas, x);
+     GRID_SYS_VGUI3(".x%x.c delete %so0\n", canvas, tagRoot);
+     GRID_SYS_VGUI3(".x%x.c delete %so1\n", canvas, tagRoot);
+     /*az redraw point if needed*/
+     if ( x->x_point )
+     {
+        grid_draw_update(x, glist);
+     }
+     GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so0\n",
+          canvas, text_xpix(&x->x_obj, glist), text_ypix(&x->x_obj, glist) + x->x_height+1,
+          text_xpix(&x->x_obj, glist)+7, text_ypix(&x->x_obj, glist) + x->x_height+2,
+          tagRoot);
+     GRID_SYS_VGUI7(".x%x.c create rectangle %d %d %d %d -tags %so1\n",
+          canvas, text_xpix(&x->x_obj, glist)+x->x_width-7, text_ypix(&x->x_obj, glist) + x->x_height+1,
+          text_xpix(&x->x_obj, glist)+x->x_width, text_ypix(&x->x_obj, glist) + x->x_height+2,
+          tagRoot);
+ 
+     canvas_fixlinesfor( canvas, (t_text*)x );
+ }
+ 
  /* ------------------------ grid widgetbehaviour----------------------------- */
  
***************
*** 432,435 ****
--- 463,493 ----
  }
  
+ 
+ static void grid_new_color(t_grid *x, t_floatarg color1, t_floatarg color2, t_floatarg color3)
+ {
+     char col[30], col1[10], col2[10], col3[10];
+ 
+     sprintf(col1,"%X",(int) color1);
+     if (color1 < 17)
+         sprintf(col1,"0%X",(int) color1);
+     else
+         sprintf(col1,"%X",(int) color1);
+ 
+     if (color2 < 17)
+         sprintf(col2,"0%X",(int) color2);
+     else
+         sprintf(col2,"%X",(int) color2);
+ 
+     if (color3 < 17)
+         sprintf(col3,"0%X",(int) color3);
+     else
+         sprintf(col3,"%X",(int) color3);
+     strcpy( col, col1);
+     strcat( col, col2 );
+     strcat( col, col3 );
+ 
+     grid_draw_new_color( x, x->x_glist, col);
+ }
+ 
  static void grid_values(t_grid* x, t_floatarg xvalue, t_floatarg yvalue)
  {
***************
*** 658,661 ****
--- 716,720 ----
      class_addmethod(grid_class, (t_method)grid_goto, gensym("goto"), A_FLOAT, A_FLOAT, 0);
      class_addmethod(grid_class, (t_method)grid_dialog, gensym("dialog"), A_GIMME, 0);
+     class_addmethod(grid_class, (t_method)grid_new_color, gensym("color"), A_FLOAT, A_FLOAT, A_FLOAT, 0);
      grid_widgetbehavior.w_getrectfn =    grid_getrect;
      grid_widgetbehavior.w_displacefn =   grid_displace;





More information about the Pd-cvs mailing list