diff options
Diffstat (limited to 'doc/pddp/drawpolygon-help.pd')
-rw-r--r-- | doc/pddp/drawpolygon-help.pd | 110 |
1 files changed, 57 insertions, 53 deletions
diff --git a/doc/pddp/drawpolygon-help.pd b/doc/pddp/drawpolygon-help.pd index 5938cd27..2cb8c112 100644 --- a/doc/pddp/drawpolygon-help.pd +++ b/doc/pddp/drawpolygon-help.pd @@ -5,7 +5,7 @@ dog float cat float vis; 14 -228856 -66577 0; #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header drawpolygon 3 12 0 18 -204280 -1 0; -#X obj 0 152 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13 +#X obj 0 147 cnv 3 550 3 empty \$0-pddp.cnv.inlets inlets 8 12 0 13 -228856 -1 0; #N canvas 50 246 494 344 META 0; #X text 12 85 LIBRARY internal; @@ -23,13 +23,13 @@ for Pd version 0.42.; ; #X text 12 65 INLET_0 float; #X restore 500 597 pd META; -#X obj 0 227 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0 +#X obj 0 222 cnv 3 550 3 empty \$0-pddp.cnv.outlets outlets 8 12 0 13 -228856 -1 0; -#X obj 0 255 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12 +#X obj 0 250 cnv 3 550 3 empty \$0-pddp.cnv.argument arguments 8 12 0 13 -228856 -1 0; #X obj 0 516 cnv 3 550 3 empty \$0-pddp.cnv.more_info more_info 8 12 0 13 -228856 -1 0; -#N canvas 102 422 428 169 Related_objects 0; +#N canvas 71 454 428 156 Related_objects 0; #X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 14 -204280 -1 0; #X obj 92 42 struct; @@ -46,18 +46,18 @@ for Pd version 0.42.; #X obj 22 112 pointer; #X text 7 1 [drawpolygon] Related Objects; #X restore 101 597 pd Related_objects; -#X obj 78 161 cnv 17 3 55 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856 +#X obj 78 156 cnv 17 3 55 empty \$0-pddp.cnv.let.0 0 5 9 0 16 -228856 -162280 0; -#X text 99 162 float; -#X text 168 159 - [drawnumber] has a single inlet to toggle visibility +#X text 99 157 float; +#X text 168 154 - [drawnumber] has a single inlet to toggle visibility of the number. A zero makes it invisible. Any nonzero value makes it visible.; -#X text 98 231 (none); +#X text 98 226 (none); #X text 179 80 <- subpatch to display the data structures; #X obj 449 3 drawpolygon; #X obj 420 20 pddp/pddplink http://wiki.puredata.info/en/drawpolygon -text pdpedia: drawpolygon; -#N canvas 31 185 428 280 drawpolygon-help-data 0; +#N canvas 23 258 428 340 drawpolygon-help-data 0; #X scalar drawpolygon-help-template 101 41 0 60 100 1 \;; #X scalar drawpolygon-help-template 301 44 1 80 100 1 \;; #X obj 1 1 cnv 15 425 20 empty empty empty 20 12 2 14 -204280 -195568 @@ -70,67 +70,68 @@ and "cat" are the top left and right x-values for the red "v".; #X text 21 111 Each scalar consists of a set of numbers \, one triangle \, and one red "v". In editmode you can click on a polygon to get a blue bounding box around the scalar.; -#X text 21 216 In runmode you can click on each of these regions of +#X text 21 226 In runmode you can click on each of these regions of the polygons to alter their appearance. You may also scroll the displayed values with the mouse to change them.; +#X text 21 276 Additionally \, you can right-click a scalar and select +"Properties" and edit the data in the text window that pops up.; #X restore 28 82 pd drawpolygon-help-data; -#N canvas 116 47 428 563 drawpolygon-help-template 0; -#X obj 23 66 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +#N canvas 102 75 428 563 drawpolygon-help-template 0; +#X obj 23 115 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; -#N canvas 478 354 428 162 init 0; -#X obj 20 99 pointer; -#X obj 20 126 outlet; +#N canvas 69 268 428 162 init 0; +#X obj 20 75 pointer; +#X obj 20 99 outlet; #X obj 20 30 loadbang; -#X obj 20 51 t b b; -#X msg 20 77 traverse pd-drawpolygon-help-data \, next; +#X msg 20 53 traverse pd-drawpolygon-help-data \, next; #X obj 0 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 14 -204280 -1 0; #X text 6 1 [drawpolygon] Initialization subpatch; +#X text 81 80 This just locates the first scalar in the subpatch "drawpolygon-help-data" +and outputs a pointer to it.; #X connect 0 0 1 0; #X connect 2 0 3 0; -#X connect 3 0 4 0; -#X connect 4 0 0 0; -#X restore 217 244 pd init; -#X obj 22 224 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +#X connect 3 0 0 0; +#X restore 217 316 pd init; +#X obj 22 298 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 14 -204280 -1 0; -#X text 19 400 This object defines the fields for this template. Their -values are initialized in the "init" subwindow. You can see them by -right-clicking on the object in the "data" window and selecting "properties." -; #X text 7 1 [drawpolygon] subpatch; -#X obj 23 95 drawpolygon 0 4 0 40 40 40 20 weasel 0 40; -#X obj 22 367 struct drawpolygon-help-template float x float y float +#X obj 23 141 drawpolygon 0 4 0 40 40 40 20 weasel 0 40; +#X obj 22 27 struct drawpolygon-help-template float x float y float weasel float dog float cat float vis; -#X text 42 65 "0" in inlet makes all instances of this polygon invisible +#X text 42 114 "0" in inlet makes all instances of this polygon invisible ; -#X text 40 221 "0" in inlet makes a single instance of this polygon +#X text 40 295 "0" in inlet makes a single instance of this polygon invisible; -#X obj 22 268 set drawpolygon-help-template vis; -#X text 20 33 [drawpolygon] is used below to display a black triangle -and a red "v".; -#X obj 23 497 drawnumber weasel -60 0 0 weasel=; -#X obj 23 517 drawnumber dog -60 15 0 dog=; -#X obj 23 538 drawnumber cat -60 30 0 cat=; -#X obj 23 135 drawpolygon -v vis 900 3 dog weasel 80 40 cat weasel -; -#X text 19 453 For convenience \, the following [drawnumber] objects -display the values of each field used in the drawing instructions above: +#X obj 22 340 set drawpolygon-help-template vis; +#X obj 23 491 drawnumber weasel -60 0 0 weasel=; +#X obj 23 511 drawnumber dog -60 15 0 dog=; +#X obj 23 532 drawnumber cat -60 30 0 cat=; +#X obj 23 199 drawpolygon -v vis 900 3 dog weasel 80 40 cat weasel ; -#X text 19 154 The next [drawpolygon] object uses the -v flag. This +#X text 19 218 The next [drawpolygon] object uses the -v flag. This flag controls visilibility of the polygon for only one instance of a data structure. "-v vis" means that the value of field "vis" determines whether the red "v" polygon is visible or not.; -#X text 19 287 Using the [set] object \, we can turn visibility on +#X text 19 360 Using the [set] object \, we can turn visibility on and off for an instance of this polygon by changing the value of the field "vis". Notice when you click the toggle above \, visibility only changes for the red "v" furthest to the right. Once you use the -v flag \, however \, you can no longer use the inlet to [drawpolygon] to set visibility globally.; -#X connect 0 0 6 0; -#X connect 1 0 10 1; -#X connect 2 0 10 0; +#X text 19 447 Finally \, for convenience \, the following [drawnumber] +objects display the values of each field used in the drawing instructions +above:; +#X text 20 159 [drawpolygon] is used above to display a black triangle +and a red "v".; +#X text 19 60 The [struct] object defines the fields for this template. +You can see and edit the values by right-clicking the scalar in the +"data" subpatch and selecting "Properties."; +#X connect 0 0 5 0; +#X connect 1 0 9 1; +#X connect 2 0 9 0; #X restore 28 109 pd drawpolygon-help-template; #X text 98 471 Note: you cannot use the -n and -v flag together. When using the -v flag \, the polygon is initially invisible by default. @@ -141,29 +142,32 @@ shape.; #X text 201 109 <- click this subpatch to see how [drawpolygon] is used.; #X text 11 23 display a polygon in a data structure instance; -#X text 168 200 - a list will be truncated to the first element.; +#X text 168 195 - a list will be truncated to the first element.; #X text 168 363 - RGB color (0=black \, 999=white \, 900=red \, 90=green \, 9=blue \, 555=grey \, etc.); #X text 168 390 - line width.; #X text 168 414 - two or more (x \, y) pairs giving coordinates.; -#X text 80 275 0-3 flags; -#X text 168 275 - "-n" flag to make the polygon initially invisible. +#X text 168 270 - "-n" flag to make the polygon initially invisible. ; -#X text 168 294 - a "-v [variable]" flag to assign a variable to make +#X text 168 289 - a "-v [variable]" flag to assign a variable to make the polygon visible/invisible.; -#X text 168 323 - "-x" flag to inhibit selecting the object when the -shape is clicked on in "edit" mode.; #X text 80 390 2) *; #X text 80 364 1) *; #X text 80 414 n) *; #X text 98 442 * Any of these can be numbers (float) or field names (symbol atom).; -#X text 98 200 list; -#X text 80 294 (symbol atoms); -#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide; +#X text 98 195 list; +#X text 80 309 (symbol atoms); +#X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide +; #X obj 316 557 pddp/pddplink ../4.data.structures/09.scaling.pd -text doc/4.data.structure/09.scaling.pd; #X obj 316 572 pddp/pddplink ../4.data.structures/10.onoff.pd -text doc/4.data.structures/10.onoff.pd; #X obj 99 572 pddp/pddplink all_about_z_order.pd; #X obj 99 557 pddp/pddplink scalar-help.pd; +#X text 80 270 0-3 flags; +#X text 80 290 (optional); +#X text 168 318 - "-x" flag to inhibit selecting the object when the +shape is clicked on in "edit" mode or clicked-and-dragged in "run mode". +; |