XML Feeds

.

[jitter] Multiline Textedit entry to Matrix

vade doktorp at mac.com
Sun Jul 1 22:31:55 MDT 2007


use jit.scanwrap. it would be hard to make it dynamic so it would  
know to break only on spaces, but scanwrap will make

this is a long sentance

into

this is a lo
ng senta
nce

or something like that.

On Jul 2, 2007, at 12:12 AM, Blake wrote:

>
> I'm trying to superimpose user-input text (via textedit) onto a  
> Jitter matrix.  All's fine there, using jit.gl.text2d, but I want  
> the text to wrap around within the matrix if the input is long  
> enough, instead of continuing off in a single row.  Suggestions on  
> how I could tweak my existing patch?
> Thanks.
>
> max v2;
> #N vpatcher 6 47 1112 899;
> #P window setfont "Sans Serif" 9.;
> #P newex 251 490 48 196617 loadbang;
> #P toggle 820 450 15 0;
> #P newex 781 449 35 196617 sel 27;
> #P newex 736 449 40 196617 key;
> #P newex 736 475 91 196617 prepend fullscreen;
> #P newex 715 496 181 196617 jit.window biggy @rect 0 50 640 480;
> #P message 586 354 29 196617 stop;
> #P toggle 703 267 15 0;
> #P user jit.pwindow 648 517 162 122 0 1 0 0 1 0;
> #P user jit.pwindow 540 425 82 62 0 1 0 0 1 0;
> #P message 617 354 30 196617 read;
> #P newex 649 431 64 196617 jit.op @op +;
> #P newex 617 383 63 196617 jit.qt.movie;
> #P newex 703 406 176 196617 jit.matrix avalanche 4 char 320 240;
> #P newex 703 382 225 196617 jit.gl.render avalanche @erase_color 0.  
> 0. 0. 1.;
> #P newex 703 348 50 196617 t b erase;
> #P newex 703 319 45 196617 jit.qball;
> #P newex 703 292 52 196617 metro 40;
> #P message 349 531 31 196617 0.6;
> #P message 312 531 36 196617 -1.05;
> #P flonum 320 550 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 275 570 85 196617 pak position 0. 0.;
> #P flonum 283 550 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 171 538 67 196617 prepend text;
> #P newex 171 513 69 196617 route symbol;
> #P message 251 512 134 196617 align left \, font helvetica 24;
> #P newex 171 600 194 196617 jit.gl.text2d avalanche @color 1. 1. 1.  
> 1.;
> #P toggle 68 416 15 0;
> #P newex 68 436 64 196617 metro 5000;
> #P button 68 458 15 0;
> #P newex 120 262 55 196617 delay 100;
> #P newex 176 262 49 196617 delay 50;
> #P newex 63 262 55 196617 delay 150;
> #P newex 230 262 62 196617 prepend set;
> #P message 523 81 92 196617 frgb 255 255 255;
> #P message 463 82 57 196617 brgb 0 0 0;
> #P newex 230 241 51 196617 tosymbol;
> #P message 230 304 333 196617 "enter text and hit pink button to  
> fill up coll object below.";
> #P newex 171 370 69 196617 pack 0 string;
> #P button 162 305 15 0;
> #P number 120 345 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #N counter 0 25;
> #X flags 0 0;
> #P newobj 120 325 68 196617 counter 0 25;
> #P message 136 417 33 196617 clear;
> #N coll ;
> #P newobj 171 486 53 196617 coll;
> #B color 5;
> #P message 171 417 343 196617 1 "enter text and hit pink button to  
> fill up coll object below.";
> #P newex 171 391 62 196617 prepend set;
> #P newex 230 219 56 196617 route text;
> #P button 63 26 71 14;
> #P window setfont Arial 24.;
> #P user textedit 230 115 625 211 32904 2001 24 "enter text and hit  
> pink button to fill up coll object below.";
> #X setrgb 255 255 255 0 0 0;
> #P window setfont "Sans Serif" 9.;
> #P comment 137 26 154 196617 <--CLICK WHEN DONE TYPING;
> #P comment 176 305 33 196617 reset;
> #P fasten 3 0 18 0 68 245 68 245;
> #P connect 23 0 22 0;
> #P connect 22 0 21 0;
> #P fasten 3 0 20 0 68 244 125 244;
> #P connect 20 0 9 0;
> #P connect 9 0 10 0;
> #P connect 11 0 9 3;
> #P fasten 10 0 12 0 125 365 176 365;
> #P connect 12 0 5 0;
> #P connect 5 0 6 0;
> #P fasten 18 0 6 0 68 412 176 412;
> #P connect 6 0 7 0;
> #P fasten 8 0 7 0 141 437 176 437 176 466;
> #P fasten 21 0 7 0 73 482 176 482;
> #P connect 7 0 26 0;
> #P connect 26 0 27 0;
> #P connect 27 0 24 0;
> #P fasten 25 0 24 0 256 594 176 594;
> #P fasten 29 0 24 0 280 594 176 594;
> #P fasten 3 0 19 0 68 244 181 244;
> #P fasten 3 0 2 0 68 104 235 104;
> #P fasten 15 0 2 0 468 104 235 104;
> #P fasten 16 0 2 0 528 104 235 104;
> #P connect 2 0 4 0;
> #P connect 4 0 14 0;
> #P connect 14 0 17 0;
> #P fasten 19 0 13 0 181 292 235 292;
> #P connect 17 0 13 0;
> #P connect 13 0 12 1;
> #P connect 50 0 25 0;
> #P fasten 28 0 29 1 288 567 317 567;
> #P connect 31 0 29 1;
> #P fasten 30 0 29 2 325 567 354 567;
> #P connect 32 0 29 2;
> #P connect 38 0 41 0;
> #P fasten 34 0 38 0 708 342 652 342 652 375 622 375;
> #P connect 44 0 38 0;
> #P connect 40 0 38 0;
> #P connect 38 0 39 0;
> #P connect 39 0 42 0;
> #P connect 43 0 33 0;
> #P connect 33 0 34 0;
> #P connect 34 0 35 0;
> #P fasten 35 1 36 0 748 375 708 375;
> #P connect 35 0 36 0;
> #P connect 36 0 37 0;
> #P connect 37 0 39 1;
> #P fasten 39 0 45 0 654 488 720 488;
> #P fasten 46 0 45 0 741 493 720 493;
> #P fasten 49 0 46 0 825 469 741 469;
> #P fasten 47 0 48 0 741 468 778 468 778 447 786 447;
> #P fasten 48 0 49 0 786 467 817 467 817 447 825 447;
> #P pop;
>
> --
> "democracy is not a solution, but a process"
> _______________________________________________
> jitter mailing list
> jitter at cycling74.com
> http://www.cycling74.com/mailman/listinfo/jitter

v a d e //

www.vade.info
abstrakt.vade.info



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cycling74.com/pipermail/jitter/attachments/20070702/dd338f31/attachment.htm


More information about the jitter mailing list