#N struct drawtext-template float x float y float cat float dog symbol
weasel text boom;
#N canvas 649 47 583 258 12;
#X text 19 217 see also:;
#X obj 37 12 drawnumber;
#X obj 178 216 plot;
#X obj 92 216 drawpolygon;
#X obj 37 36 drawsymbol;
#X obj 37 59 drawtext;
#N canvas 287 329 988 381 drawtext-template 0;
#X obj 511 188 drawsymbol weasel 0 -30 0 weasel=;
#X obj 767 188 drawtext boom 0 -45 0 boom=;
#X text 40 132 - the field name to draw \; - an (x \, y) pair giving
relative coordinates \; - RGB color (0=black \, 999=white \, 900=red
\, 90=green \, 9=blue \, 555=grey \, etc.) \; - an optional label ("cat="
for instance).;
#X obj 38 286 drawnumber cat 0 0 0 cat=;
#X text 502 22 When not in "edit" mode \, you can click and drag vertically
on the numbers to change their values. Keyboard entry is also supported
\, just click and type., f 65;
#X msg 38 234 1;
#X msg 71 234 0;
#X text 125 254 (if no -v [field name] flag was given);
#X text 502 74 In edit mode you can move \, cut \, copy and paste the
objects.;
#X text 53 323 Instead of float arguments to set color and position
you can specify field names., f 53;
#X text 504 96 Here we use [drawsymbol] and [drawtext] to draw \, respectively
\, a symbol whose field name is 'weasel' and a text whose field name
is 'boom'. You can't directly edit symbols/text though - they can be
changed through "set" and "text" objects \, respectively \, or via
properties., f 66;
#X text 18 15 [drawnumber]/[drawsymbol]/[drawtext] take these arguments:
;
#X obj 232 286 drawnumber dog 0 -15 900 dog\ =\ ;
#X obj 579 307 struct drawtext-template float x float y float cat float
dog symbol weasel text boom, f 47;
#X text 39 41 - Optional flags:, f 54;
#X text 53 62 - "-n": make invisible initially \; - "-v [const or field
name]": assign a variable to make this visible/invisible.;
#X text 28 113 Arguments:;
#X text 538 238 This [sruct] object below defines the fields for this
template. You can see them by right-clicking on the object in the "drawtext-data"
window and selecting "properties.";
#X text 104 234 <-- inlet sets visibility (1: visible \, 0: invisible)
;
#X connect 5 0 3 0;
#X connect 6 0 3 0;
#X restore 401 125 pd drawtext-template;
#N canvas 179 45 455 265 drawtext-data 1;
#X scalar drawtext-template 63 167 0 0 symbol \; \;;
#X scalar drawtext-template 235 108 0 0 symbol \; \;;
#X restore 401 152 pd drawtext-data;
#X text 353 218 updated for Pd version 0.50.;
#X obj 216 216 set;
#X obj 8 91 cnv 1 570 1 empty empty empty 8 12 0 13 #000000 #000000
0;
#N canvas 36 265 573 351 reference 0;
#X obj 6 60 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000
0;
#X obj 6 103 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000
0;
#X obj 6 137 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000
0;
#X obj 5 321 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000
0;
#X text 112 75 float -;
#X text 143 113 NONE, f 54;
#X text 169 75 sets visibility (1: visible \, 0: invisible)., f 46
;
#X obj 6 165 cnv 1 550 1 empty empty flags: 8 12 0 13 #9f9f9f #000000
0;
#X obj 6 213 cnv 1 550 1 empty empty args: 8 12 0 13 #9f9f9f #000000
0;
#X text 97 189 "-v" <symbol>: assigns a field to make it visible/invisible.
, f 63;
#X text 97 171 "-n": makes it invisible initially., f 63;
#X text 102 219 1) symbol -;
#X text 185 218 field name to draw., f 46;
#X text 101 272 4) symbol - optional label., f 58;
#X text 101 236 2) list* - (x \, y) coordinates pair (default 0 0).
, f 58;
#X text 101 254 3) float* - color (default 0)., f 58;
#X text 131 294 * position and color can also be field names.;
#X obj 26 21 drawtext;
#X text 94 20 - draw numbers \, symbols or texts fields in Scalars.
;
#X restore 397 33 pd reference;
#X text 495 34 <= click;
#X text 25 106 All these objects are actually aliases of the same class.
There's no difference in them. Use them to draw either numbers \, symbols
or texts fields., f 34;
#X obj 8 199 cnv 1 570 1 empty empty empty 8 12 0 13 #000000 #000000
0;
#X text 125 23 - draw numbers \, symbols or texts fields in Scalars.
, f 26;
#X obj 250 216 get;
#X text 291 125 explanation -->;
