From b0d554fae7cd1450449da18f2bcd3826797f0d17 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Wed, 11 May 2016 20:11:49 -0400 Subject: [PATCH] add metadata for data structure [draw] tutorials --- .../ds-tutorials/00.under.construction.pd | 16 +++-- .../pd-l2ork/ds-tutorials/01.intro.pd | 9 ++- .../pd-l2ork/ds-tutorials/02.draw.pd | 9 ++- .../pd-l2ork/ds-tutorials/03.rect.pd | 10 ++- .../pd-l2ork/ds-tutorials/04.attributes.pd | 9 ++- .../ds-tutorials/05.more.attributes.pd | 10 ++- .../ds-tutorials/06.saving.attributes.pd | 10 ++- .../pd-l2ork/ds-tutorials/07.line.pd | 9 ++- .../pd-l2ork/ds-tutorials/08.circle.pd | 10 ++- .../pd-l2ork/ds-tutorials/09.ellipse.pd | 10 ++- .../pd-l2ork/ds-tutorials/10.polyline.pd | 10 ++- .../pd-l2ork/ds-tutorials/11.polygon.pd | 10 ++- .../pd-l2ork/ds-tutorials/12.path.pd | 10 ++- .../pd-l2ork/ds-tutorials/13.transform.pd | 64 +++++++++++-------- .../pd-l2ork/ds-tutorials/14.group.pd | 10 ++- .../pd-l2ork/ds-tutorials/15.events.pd | 9 ++- .../pd-l2ork/ds-tutorials/16.animation.pd | 12 +++- 17 files changed, 179 insertions(+), 48 deletions(-) diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/00.under.construction.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/00.under.construction.pd index 6820d2105..77096f2f8 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/00.under.construction.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/00.under.construction.pd @@ -1,5 +1,5 @@ #N struct working-man-scalar float x float y; -#N canvas 0 19 895 618 10; +#N canvas 1 25 895 618 10; #N canvas 195 124 671 300 template 1; #X obj 121 -2492 struct working-man-scalar float x float y; #N canvas 725 143 450 300 init 0; @@ -260,10 +260,18 @@ for drawing instructions \, but that isn't supported at the moment. ; #X text 43 570 * scalar bbox caching. Should give more control to the user as with mouse-dragging.; -#X text 480 503 * way to reset an svg attribute. Probably by just sending -a message with no arguments (not sure if tkpath supports this yet) -; #X text 480 313 New:; #X text 480 333 * messages to set path data \, polygon points \, x \, y \, cx \, cy \, r \, height \, width \, etc.; #X text 480 373 Needed:; +#N canvas 290 275 450 300 META 0; +#X text 16 6 KEYWORDS tutorial data_structure draw; +#X text 16 26 LICENSE SIBSD; +#X text 16 46 DESCRIPTION overview of svg-based data structure drawing +commands; +#X text 16 76 AUTHOR Jonathan Wilkes; +#X text 16 96 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X restore 771 580 pd META; +#X text 480 502 * way to reset an svg attribute. Probably by just sending +a message with no arguments (not sure if tkpath supports this yet) +; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/01.intro.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/01.intro.pd index a66c444a3..8b97e4889 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/01.intro.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/01.intro.pd @@ -1,5 +1,5 @@ #N struct foo float x float y; -#N canvas 230 130 565 491 10; +#N canvas 1 25 565 491 10; #X scalar foo 96 105 \;; #N canvas 429 132 808 465 welcome-animation 0; #X obj 147 7 bng 54 250 50 0 empty empty empty 17 7 0 10 -262144 -1 @@ -739,5 +739,12 @@ concepts. (Even the animation above doesn't use any pointers.); #X connect 25 0 22 0; #X restore 339 106 pd sfx~; #X obj 339 127 output~; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION short demo of the [draw] command; +#X restore 502 455 pd META; #X connect 6 0 1 0; #X connect 11 0 12 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/02.draw.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/02.draw.pd index d80e133e1..56c37e6cb 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/02.draw.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/02.draw.pd @@ -1,5 +1,5 @@ #N struct drawtut-one float x float y; -#N canvas 87 38 495 603 10; +#N canvas 1 25 495 603 10; #X text 0 1 New Drawing Commands: draw; #X text 0 1 __________________________; #X obj 53 47 struct drawtut-one float x float y; @@ -40,3 +40,10 @@ defined here. To keep things organized Pd expects there to be only one [struct] object per canvas. That way it's simple to know which [draw] commands go with which data structure.; #X text 178 218 <- rectangle \, 40x40 pixels at offset (0 \, 0); +#N canvas 291 300 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION introducing the [draw] command; +#X restore 435 575 pd META; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/03.rect.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/03.rect.pd index bc0e6198e..ef09c07bb 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/03.rect.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/03.rect.pd @@ -1,5 +1,5 @@ #N struct drawtut-rect float x float y; -#N canvas 15 32 515 614 10; +#N canvas 1 25 515 614 10; #X text 0 1 __________________________; #X text 0 1 New Drawing Commands: rect; #X obj 53 87 struct drawtut-rect float x float y; @@ -34,3 +34,11 @@ to integers.); The first two are the width and height of the rectangle. The third and fourth arguments are the x/y coordinates of the top-left corner of the rectangle. That's it!; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing a rectangle with the [draw] command +; +#X restore 446 583 pd META; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/04.attributes.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/04.attributes.pd index ebd06fbf5..b6c45f340 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/04.attributes.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/04.attributes.pd @@ -1,5 +1,5 @@ #N struct drawtut-attr float x float y; -#N canvas 13 25 517 671 10; +#N canvas 1 25 517 671 10; #X text 0 1 New Drawing Commands: attributes; #X text 0 1 ________________________________; #X text 53 23 Our shapes are pretty boring so far. Black lines around @@ -40,6 +40,13 @@ for all scalars created from this [struct]. Later you will see how to set attributes to be different for each scalar.; #X msg 123 252 fill green; #X obj 53 313 draw rect 50 50 0 0; +#N canvas 291 300 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION basic attributes for the [draw] command; +#X restore 450 639 pd META; #X connect 8 0 19 0; #X connect 15 0 16 0; #X connect 16 0 19 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/05.more.attributes.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/05.more.attributes.pd index 68ff53844..8fa4be4d3 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/05.more.attributes.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/05.more.attributes.pd @@ -1,5 +1,5 @@ #N struct drawtut-attr-cont float x float y; -#N canvas 194 25 638 671 10; +#N canvas 1 25 638 671 10; #X msg 93 112 fill red; #X text 0 1 New Drawing Commands: attributes (continued); #X text 0 1 ____________________________________________; @@ -51,6 +51,14 @@ the appearance of a shape:; #X obj 93 85 loadbang; #X obj 161 533 * 0.5; #X obj 93 583 draw rect 50 50 0 0; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 76 AUTHOR Jonathan Wilkes; +#X text 16 96 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION more detail about display attributes with +the [draw] command; +#X restore 573 640 pd META; #X connect 0 0 42 0; #X connect 8 0 42 0; #X connect 10 0 12 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/06.saving.attributes.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/06.saving.attributes.pd index d17880cc5..a1b075cdf 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/06.saving.attributes.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/06.saving.attributes.pd @@ -1,5 +1,5 @@ #N struct drawtut-attr-saving float x float y; -#N canvas 194 100 638 551 10; +#N canvas 1 25 638 551 10; #X text 0 1 New Drawing Commands: attributes (continued); #X text 0 1 ____________________________________________; #X text 53 23 Saving attributes is fairly straightforward using message @@ -22,5 +22,13 @@ each scalar.; #X text 228 280 <- Create another scalar in the empty object box by typing the struct name "drawtut-attr-saving" into it.; #X obj 53 153 draw rect 50 50 0 0; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 76 AUTHOR Jonathan Wilkes; +#X text 16 96 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION specifying display attributes with the [draw] +command; +#X restore 573 520 pd META; #X connect 3 0 6 0; #X connect 6 0 11 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/07.line.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/07.line.pd index dd6f11a3f..e58fd2fe6 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/07.line.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/07.line.pd @@ -1,5 +1,5 @@ #N struct drawtut-line float x float y; -#N canvas 31 34 638 634 10; +#N canvas 1 25 638 634 10; #X obj 53 84 loadbang; #X text 0 1 New Drawing Commands: line; #X text 0 1 __________________________; @@ -30,6 +30,13 @@ past the end point.; #X text 173 138 rounded; #X text 258 138 square; #X msg 53 107 stroke blue \, stroke-width 15; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing a line with the [draw] command; +#X restore 567 601 pd META; #X connect 0 0 21 0; #X connect 10 0 5 0; #X connect 15 0 10 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/08.circle.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/08.circle.pd index 443055d57..7ffc23871 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/08.circle.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/08.circle.pd @@ -1,5 +1,5 @@ #N struct drawtut-circle float x float y; -#N canvas 13 29 638 554 10; +#N canvas 1 25 638 554 10; #X msg 143 117 stroke blue; #X text 52 484 Lines are only a single stroke. They don't have any inner area to fill \, so none of the messages like "fill" or "fill-rule" @@ -21,6 +21,14 @@ by value you use for the radius. (That would be [draw circle 80 80 #X obj 53 153 draw circle 80 0 0; #X text 52 374 The [draw] object above creates a circle with a radius of 80 pixels \, with the center of the circle at (0 \, 0).; +#N canvas 291 300 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing a circle with the [draw] command +; +#X restore 568 522 pd META; #X connect 0 0 12 0; #X connect 8 0 12 0; #X connect 9 0 12 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/09.ellipse.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/09.ellipse.pd index 0eee80aef..d795335e3 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/09.ellipse.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/09.ellipse.pd @@ -1,5 +1,5 @@ #N struct drawtut-ellipse float x float y; -#N canvas 1 25 509 498 10; +#N canvas 3 25 509 498 10; #X msg 141 117 stroke blue; #X msg 54 117 fill yellow; #X msg 228 117 stroke-width \$1; @@ -18,6 +18,14 @@ values \, respectively. (So the one above would be [draw ellipse 86 #X obj 53 153 draw ellipse 86 42 0 0; #X text 52 334 The [draw] object above creates an ellipse with an x-radius of 86 and a y-radius of 42 \, centered at (0 \, 0).; +#N canvas 291 300 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing an ellipse with the [draw] command +; +#X restore 445 465 pd META; #X connect 0 0 11 0; #X connect 1 0 11 0; #X connect 2 0 11 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/10.polyline.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/10.polyline.pd index 0fe6240e9..91858833c 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/10.polyline.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/10.polyline.pd @@ -1,5 +1,5 @@ #N struct drawtut-polyline float x float y; -#N canvas 0 19 532 554 10; +#N canvas 1 25 532 554 10; #X msg 228 137 stroke-width \$1; #X floatatom 228 116 5 0 0 0 - - -, f 5; #X text 0 1 New Drawing Commands: polyline; @@ -29,6 +29,14 @@ the [draw] object quite powerful.; #X obj 53 103 loadbang; #X obj 440 114 * 0.001; #X msg 440 72 300; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing a polyline with the [draw] command +; +#X restore 464 521 pd META; #X connect 0 0 6 0; #X connect 1 0 0 0; #X connect 9 0 19 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/11.polygon.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/11.polygon.pd index 2c4389453..ae8e40df3 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/11.polygon.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/11.polygon.pd @@ -1,5 +1,5 @@ #N struct drawtut-polygon float x float y; -#N canvas 0 19 845 575 10; +#N canvas 1 25 845 575 10; #X msg 53 117 stroke blue; #X msg 142 117 fill yellow; #X msg 228 117 stroke-width \$1; @@ -26,6 +26,14 @@ for how to fill overlapping areas.; #X text 517 57 nonzero; #X text 527 87 evenodd; #X msg 442 86 fill-rule 1; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing polygons with the [draw] command +; +#X restore 780 544 pd META; #X connect 0 0 9 0; #X connect 1 0 9 0; #X connect 2 0 9 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd index d6b5fe082..fc1b5ff03 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/12.path.pd @@ -1,5 +1,5 @@ #N struct drawtut-path float x float y; -#N canvas 0 19 850 556 10; +#N canvas 1 25 850 556 10; #X text 0 1 New Drawing Commands: path; #X text 1 1 __________________________; #X text 53 23 Paths are complex drawings.; @@ -36,5 +36,13 @@ each letter.; curves doesn't work as precisely as it should. This means some paths may extend past the edges of the selection rectangle in Pd. (Like the bottom of the "O" in the example above; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION drawing paths to display data structure data +; +#X restore 776 520 pd META; #X connect 5 0 11 0; #X connect 7 0 5 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/13.transform.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/13.transform.pd index 7c4fcb9a8..051135921 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/13.transform.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/13.transform.pd @@ -1,53 +1,61 @@ #N struct drawtut-transform float x float y; -#N canvas 80 106 867 589 10; +#N canvas 22 32 867 625 10; #X text 0 1 New Drawing Commands: transform; #X text 1 1 _______________________________; #X text 53 23 All [draw] objects understand the "transform" message. It allows you to do affine transformations on shapes.; #X text 53 83 Let's start with a simple rectangle:; -#X floatatom 57 187 5 0 0 0 x/y - -, f 5; -#X scalar drawtut-transform 197 449 \;; -#X floatatom 97 187 5 0 0 0 - - -, f 5; -#X obj 97 208 t b a; -#X floatatom 177 187 5 0 0 0 rotate - -, f 5; -#X obj 177 208 t b a; -#X floatatom 257 167 5 0 0 0 scale - -, f 5; -#X obj 257 208 t b a; -#X floatatom 337 167 5 -100 100 0 skewx - -, f 5; -#X obj 337 208 t b a; -#X floatatom 407 167 5 -100 100 0 skewy - -, f 5; -#X obj 407 208 t b a; -#X floatatom 127 315 5 0 0 0 - - -, f 5; -#X msg 127 336 transform rotate \$1 50 20; -#X text 447 449 For "scale" \, you can either specify a single value +#X floatatom 57 173 5 0 0 0 x/y - -, f 5; +#X scalar drawtut-transform 197 435 \;; +#X floatatom 97 173 5 0 0 0 - - -, f 5; +#X obj 97 194 t b a; +#X floatatom 177 173 5 0 0 0 rotate - -, f 5; +#X obj 177 194 t b a; +#X floatatom 257 153 5 0 0 0 scale - -, f 5; +#X obj 257 194 t b a; +#X floatatom 337 153 5 -100 100 0 skewx - -, f 5; +#X obj 337 194 t b a; +#X floatatom 407 153 5 -100 100 0 skewy - -, f 5; +#X obj 407 194 t b a; +#X floatatom 127 301 5 0 0 0 - - -, f 5; +#X msg 127 322 transform rotate \$1 50 20; +#X text 447 435 For "scale" \, you can either specify a single value to applied to both the x- and y-axis \, or one value for each. For rotation \, you can supply an additional x/y coordinate to specify the center of rotation. An example is in the second message box above. ; -#X text 57 529 After the word "transform" \, you specify the name of +#X text 57 515 After the word "transform" \, you specify the name of the affine transformation you'd like to apply. All are shown above. Pd then takes them and applies them in the order you specified.; -#X msg 127 362 transform matrix 1 0 0 1 0 0; -#X text 312 362 <- You can just feed the matrix values directly \, +#X msg 127 348 transform matrix 1 0 0 1 0 0; +#X text 312 348 <- You can just feed the matrix values directly \, too.; -#X text 295 319 <- For rotations \, you can specify two extra floats +#X text 295 305 <- For rotations \, you can specify two extra floats for the center of rotation. Here \, it makes the rotation happen around the center of the rectangle.; -#X text 447 519 Notice that "transform" data doesn't accumulate in +#X text 447 505 Notice that "transform" data doesn't accumulate in a [draw] object. When you send a new "transform" message the old values are forgotten. That's why you have to gang them all together in a single message if you want multiple transformations.; -#X obj 257 119 loadbang; -#X obj 57 258 pack 0 0 0 0 0 0; +#X obj 257 105 loadbang; +#X obj 57 244 pack 0 0 0 0 0 0; #X obj 53 57 struct drawtut-transform float x float y; -#X obj 257 140 f 100; -#X obj 257 188 * 0.01; -#X text 470 168 <- The attributes skewx and skewy can take any value. +#X obj 257 126 f 100; +#X obj 257 174 * 0.01; +#X text 470 154 <- The attributes skewx and skewy can take any value. Here I limit them to be between -1 and 1 \, just so that the rectangle's dimensions don't grow too large.; -#X msg 57 279 transform translate \$1 \$2 rotate \$3 scale \$4 skewx +#X msg 57 265 transform translate \$1 \$2 rotate \$3 scale \$4 skewx \$5 skewy \$6; -#X obj 57 388 draw rect 100 40 0 0; +#X obj 57 374 draw rect 100 40 0 0; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 76 AUTHOR Jonathan Wilkes; +#X text 16 96 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION applying affine transforms to data structure +drawings; +#X restore 784 593 pd META; #X connect 4 0 25 0; #X connect 6 0 7 0; #X connect 7 0 4 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/14.group.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/14.group.pd index db2ee1d1e..4b6ebd4c0 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/14.group.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/14.group.pd @@ -1,5 +1,5 @@ #N struct drawtut-group float x float y; -#N canvas 1 26 648 468 10; +#N canvas 2 51 648 468 10; #X scalar drawtut-group 54 159 \;; #X text 1 1 ___________________________; #X text 0 1 New Drawing Commands: group; @@ -39,6 +39,14 @@ always the furthest to the right.; with an inlet. You can send it all the same messages that you can send to shapes. This will set the attributes for any drawing commands inside the [draw group] which you haven't already set explicitly.; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X text 16 46 DESCRIPTION how to group data structure drawings with +[draw]; +#X restore 574 433 pd META; #X connect 5 0 6 0; #X connect 6 0 7 0; #X connect 7 0 10 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/15.events.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/15.events.pd index cc38a8a23..2637b9d57 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/15.events.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/15.events.pd @@ -1,5 +1,5 @@ #N struct drawtut-events float x float y; -#N canvas 231 71 591 620 10; +#N canvas 1 25 591 620 10; #X scalar drawtut-events 54 255 \;; #X text 1 1 __________________________________; #X text 0 1 New Drawing Commands: mouse events; @@ -30,6 +30,13 @@ of the shape.; gets sent to the outlet of the corresponding [draw] object.; #X obj 303 185 draw circle 25 300 30; #X obj 53 173 draw rect 60 60 0 0; +#N canvas 290 275 450 300 META 0; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 46 DESCRIPTION mouse events for the [draw] command; +#X text 16 6 KEYWORDS tutorial data_structure draw gui; +#X restore 506 578 pd META; #X connect 3 0 10 0; #X connect 7 0 24 0; #X connect 8 0 22 0; diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/16.animation.pd b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/16.animation.pd index ab2941cfb..8fe242bf6 100644 --- a/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/16.animation.pd +++ b/pd/doc/4.data.structures/pd-l2ork/ds-tutorials/16.animation.pd @@ -1,5 +1,5 @@ #N struct drawtut-animation float x float y; -#N canvas 2 69 537 571 10; +#N canvas 14 48 537 571 10; #X scalar drawtut-animation 47 309 \;; #X obj 47 131 struct drawtut-animation float x float y; #X text 0 1 New Drawing Commands: animation; @@ -33,7 +33,7 @@ in the other direction!; #X text 112 524 How does it know?; #X msg 47 250 fill \$1 \$1 \$1; #X obj 47 188 * 255; -#X obj 177 158 tgl 23 0 empty empty empty 17 7 0 10 -4034 -1 -1 1 1 +#X obj 177 158 tgl 23 0 empty empty empty 17 7 0 10 -4034 -1 -1 0 1 ; #X msg 177 210 \$1 500; #X obj 177 188 * 255; @@ -41,6 +41,14 @@ in the other direction!; #X obj 177 230 line 0 16.7; #X text 255 229 <- 2nd argument sets the "grain" rate; #X obj 47 279 draw rect 40 40 0 0; +#N canvas 290 275 450 300 META 0; +#X text 16 6 KEYWORDS tutorial data_structure draw; +#X text 16 26 LICENSE SIBSD; +#X text 16 66 AUTHOR Jonathan Wilkes; +#X text 16 86 HELP_PATCH_AUTHORS Jonathan Wilkes; +#X text 16 46 DESCRIPTION animating scalars with the [draw] command +; +#X restore 450 538 pd META; #X connect 6 0 17 0; #X connect 7 0 13 0; #X connect 9 0 10 0; -- GitLab