From e2b00d3801f07062c800221039271287ba7cc812 Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Mon, 2 May 2016 21:12:02 -0400
Subject: [PATCH] fix jwilkes/purr-data#44 make [draw] arguments more closely
 follow the svg spec * [draw circle 20 1 2]: radius=20, xcenter=1, ycenter=2 *
 [draw rect 5 10 20 40]: width=5, height=10, xoffset=20, yoffset=40 * [draw
 ellipse 5 10 20 40]: xradius=5, yradius=10, xcenter=20, ycenter=40

---
 .../pd-l2ork/ds-demos/arcs.pd                 |   4 +-
 .../pd-l2ork/ds-demos/bat-and-ball.pd         |  97 +++--
 .../pd-l2ork/ds-demos/circlehand.pd           |  96 ++---
 .../pd-l2ork/ds-demos/curver.pd               |  46 +--
 .../pd-l2ork/ds-demos/easing.pd               | 122 +++---
 .../pd-l2ork/ds-demos/ellipses.pd             |  54 +--
 .../pd-l2ork/ds-demos/hexshifter.pd           | 366 +++++++++---------
 .../pd-l2ork/ds-demos/opacity.pd              |  62 +--
 .../pd-l2ork/ds-demos/polar-clock.pd          |  23 +-
 .../pd-l2ork/ds-demos/quick-graph.pd          |  58 +--
 .../pd-l2ork/ds-demos/quick-graph2.pd         |  46 +--
 .../pd-l2ork/ds-demos/raphael-animation.pd    |  54 +--
 .../pd-l2ork/ds-demos/simon-game.pd           |  48 +--
 .../pd-l2ork/ds-demos/spin-spin-spin.pd       | 132 +++----
 .../pd-l2ork/ds-demos/stroke-dasharray.pd     |   2 +-
 .../pd-l2ork/ds-demos/unit-circle.pd          |  70 ++--
 .../pd-l2ork/ds-demos/yin-yang.pd             |  72 ++--
 .../pd-l2ork/ds-tutorials/01.intro.pd         |  16 +-
 .../pd-l2ork/ds-tutorials/02.draw.pd          |  16 +-
 .../pd-l2ork/ds-tutorials/03.rect.pd          |  24 +-
 .../pd-l2ork/ds-tutorials/04.attributes.pd    |  12 +-
 .../ds-tutorials/05.more.attributes.pd        |  38 +-
 .../ds-tutorials/06.saving.attributes.pd      |   8 +-
 .../pd-l2ork/ds-tutorials/07.line.pd          |   2 +-
 .../pd-l2ork/ds-tutorials/08.circle.pd        |  14 +-
 .../pd-l2ork/ds-tutorials/09.ellipse.pd       |  14 +-
 .../pd-l2ork/ds-tutorials/13.transform.pd     |  52 +--
 .../pd-l2ork/ds-tutorials/14.group.pd         |  20 +-
 .../pd-l2ork/ds-tutorials/15.events.pd        |  22 +-
 .../pd-l2ork/ds-tutorials/16.animation.pd     |  28 +-
 pd/src/g_template.c                           |  23 +-
 31 files changed, 823 insertions(+), 818 deletions(-)

diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/arcs.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/arcs.pd
index c4596b4ac..909ed4401 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/arcs.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/arcs.pd
@@ -1,5 +1,5 @@
 #N struct arcs float x float y;
-#N canvas 0 19 730 583 10;
+#N canvas 145 33 730 583 10;
 #N canvas 497 68 781 562 arcs 0;
 #X obj 110 13 struct arcs float x float y;
 #X obj 48 109 draw path M 20 350 l 50 -25 a 25 25 -30 0 1 50 -25 l
@@ -65,7 +65,7 @@ M -6 -10 l -6 -6 M -6 -10 l -6 6;
 #X connect 30 0 23 0;
 #X connect 31 0 14 0;
 #X connect 32 0 1 0;
-#X restore 177 100 pd arcs;
+#X restore 197 100 pd arcs;
 #X scalar arcs 148 150 \;;
 #X obj 248 100 pddp/pddplink http://tclbitprint.sourceforge.net/tkpath/quartz/
 ;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/bat-and-ball.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/bat-and-ball.pd
index 05b3ea0b1..8fdf387c5 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/bat-and-ball.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/bat-and-ball.pd
@@ -1,47 +1,43 @@
 #N struct ball-and-bat float x float y;
-#N canvas 0 19 624 562 10;
-#X obj 132 -12 struct ball-and-bat float x float y;
-#X scalar ball-and-bat -79 55 \;;
-#X obj 132 9 route displace;
-#X obj 132 30 unpack p f;
-#X obj 189 82 t a b;
-#X msg 216 109 clear;
-#X obj 189 139 pipe 100;
-#X obj 189 160 * 50;
-#X msg 189 181 1000 \$1;
-#X obj 189 202 -;
-#X floatatom 127 226 5 0 0 0 - - -, f 5;
-#X obj 189 244 line;
-#X msg 188 223 0 \, 100 \$1;
-#X obj 289 185 del;
-#X obj 250 357 draw circle 0 20 20;
-#X obj -45 304 loadbang;
-#X obj 289 227 f;
-#X msg 289 248 0 \$1;
-#X obj 293 163 + 250;
-#X obj 150 56 moses 1;
-#X obj -45 429 draw path m 22.9167 966.945 c -5.21812 0 -8.33333 3.13916
+#N canvas 200 61 624 577 10;
+#X obj 132 12 struct ball-and-bat float x float y;
+#X scalar ball-and-bat -79 79 \;;
+#X obj 132 33 route displace;
+#X obj 132 54 unpack p f;
+#X obj 189 106 t a b;
+#X msg 216 133 clear;
+#X obj 189 163 pipe 100;
+#X obj 189 184 * 50;
+#X msg 189 205 1000 \$1;
+#X obj 189 226 -;
+#X floatatom 127 250 5 0 0 0 - - -, f 5;
+#X obj 189 268 line;
+#X msg 188 247 0 \, 100 \$1;
+#X obj 289 209 del;
+#X obj -45 328 loadbang;
+#X obj 289 251 f;
+#X msg 289 272 0 \$1;
+#X obj 293 187 + 250;
+#X obj 150 80 moses 1;
+#X obj -45 453 draw path m 22.9167 966.945 c -5.21812 0 -8.33333 3.13916
 -8.33333 8.33333 0 4.16666 8.33333 10.4166 12.5 14.5833 8.33312 8.3334
 22.0911 15.8413 35.4167 29.1667 l 12.5 12.5 -2.08334 2.0833 c 0 2.0833
 2.08334 4.1667 4.16667 4.1667 l 4.16667 -4.1667 4.16666 -4.1667 c 0
 -2.0833 -2.08333 -4.1666 -4.16666 -4.1666 l -2.08334 2.0833 -12.5 -12.5
 c -11.9306 -11.9304 -20.8335 -27.0833 -29.1667 -35.4167 -4.16667 -4.16666
 -10.4167 -12.5 -14.5833 -12.5 z;
-#X obj -45 367 loadbang;
-#X obj 260 315 loadbang;
-#X msg 250 294 transform translate \$1 0;
-#X obj -45 346 draw rect -35 -35 225 205;
-#X msg 432 15 0.57;
-#X obj 432 36 * 180;
-#X obj 432 57 / 3.14;
-#X floatatom 432 78 5 0 0 0 - - -, f 5;
-#X msg 260 336 stroke-width 2 \, stroke black \, fill none;
-#X msg -45 388 transform translate 590 -1800 rotate 32.67 65 1010 scale
+#X obj -45 391 loadbang;
+#X obj 260 339 loadbang;
+#X msg 250 318 transform translate \$1 0;
+#X msg 260 360 stroke-width 2 \, stroke black \, fill none;
+#X msg -45 412 transform translate 590 -1800 rotate 32.67 65 1010 scale
 2 \, stroke black \, fill none;
-#X msg -45 325 stroke-dasharray 5 5 \, stroke black \, fill none;
+#X msg -45 349 stroke-dasharray 5 5 \, stroke black \, fill none;
+#X obj 250 381 draw circle 20 0 20;
+#X obj -45 370 draw rect 225 205 -35 -35;
 #X connect 0 0 2 0;
 #X connect 2 0 3 0;
-#X connect 3 1 19 0;
+#X connect 3 1 18 0;
 #X connect 4 0 6 0;
 #X connect 4 1 5 0;
 #X connect 5 0 6 0;
@@ -50,22 +46,19 @@ c -11.9306 -11.9304 -20.8335 -27.0833 -29.1667 -35.4167 -4.16667 -4.16666
 #X connect 8 0 9 0;
 #X connect 9 0 12 0;
 #X connect 9 0 10 0;
-#X connect 9 0 16 1;
-#X connect 9 0 18 0;
-#X connect 11 0 23 0;
+#X connect 9 0 15 1;
+#X connect 9 0 17 0;
+#X connect 11 0 22 0;
 #X connect 12 0 11 0;
-#X connect 13 0 16 0;
-#X connect 15 0 31 0;
-#X connect 16 0 17 0;
-#X connect 17 0 11 0;
-#X connect 18 0 13 0;
-#X connect 19 1 4 0;
-#X connect 21 0 30 0;
-#X connect 22 0 29 0;
-#X connect 23 0 14 0;
-#X connect 25 0 26 0;
-#X connect 26 0 27 0;
-#X connect 27 0 28 0;
-#X connect 29 0 14 0;
-#X connect 30 0 20 0;
-#X connect 31 0 24 0;
+#X connect 13 0 15 0;
+#X connect 14 0 25 0;
+#X connect 15 0 16 0;
+#X connect 16 0 11 0;
+#X connect 17 0 13 0;
+#X connect 18 1 4 0;
+#X connect 20 0 24 0;
+#X connect 21 0 23 0;
+#X connect 22 0 26 0;
+#X connect 23 0 26 0;
+#X connect 24 0 19 0;
+#X connect 25 0 27 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/circlehand.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/circlehand.pd
index 1b7a87dac..1e203c934 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/circlehand.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/circlehand.pd
@@ -1,55 +1,55 @@
 #N struct circlehand float x float y;
-#N canvas 0 23 826 503 10;
-#X obj 481 1 struct circlehand float x float y;
-#X scalar circlehand -135 -183 \;;
-#X obj 594 205 draw path M 320 240 c -50 100 50 110 0 190;
-#X obj 519 332 draw circle 320 430 5;
-#X obj 357 452 draw circle 320 220 20;
-#X obj 519 278 loadbang;
-#X obj 519 403 draw circle 530 430 20;
-#X obj 519 251 draw circle 320 220 20;
-#X msg 519 135 transform rotate \$1 320 430;
-#X obj 519 92 pow 2;
-#X msg 518 48 0 \, 1 1000;
-#X obj 357 408 loadbang;
-#X msg 357 429 fill blue \, stroke blue \, stroke-width 2 \, fill-opacity
+#N canvas 42 53 885 503 10;
+#X obj 461 1 struct circlehand float x float y;
+#X scalar circlehand -155 -183 \;;
+#X obj 574 205 draw path M 320 240 c -50 100 50 110 0 190;
+#X obj 499 278 loadbang;
+#X msg 499 135 transform rotate \$1 320 430;
+#X obj 499 92 pow 2;
+#X msg 498 48 0 \, 1 1000;
+#X obj 337 408 loadbang;
+#X msg 337 429 fill blue \, stroke blue \, stroke-width 2 \, fill-opacity
 0.4;
-#X obj 519 68 line;
-#X msg 519 305 fill blue \, stroke blue \, stroke-opacity 1 \, fill-opacity
+#X obj 499 68 line;
+#X msg 499 305 fill blue \, stroke blue \, stroke-opacity 1 \, fill-opacity
 1;
-#X msg 599 47 0;
-#X obj 519 360 loadbang;
-#X msg 519 381 stroke-width 2 \, stroke blue \, fill blue \, fill-opacity
+#X msg 579 47 0;
+#X obj 499 360 loadbang;
+#X msg 499 381 stroke-width 2 \, stroke blue \, fill blue \, fill-opacity
 0.4;
-#X obj 481 22 route click;
-#X obj 594 156 loadbang;
-#X obj 531 205 loadbang;
-#X text 81 303 This is just a quick animation \, based on a demo from
+#X obj 461 22 route click;
+#X obj 574 156 loadbang;
+#X obj 511 205 loadbang;
+#X text 61 303 This is just a quick animation \, based on a demo from
 Raphael.js.;
-#X text 81 343 It uses [line] to control the animation. You can essentially
+#X text 61 343 It uses [line] to control the animation. You can essentially
 control the frame rate using the second argument of [line].;
-#X text 81 383 The original is here:;
-#X obj 81 404 pddp/pddplink http://raphaeljs.com/hand.html;
-#X obj 519 113 * 90;
-#X msg 531 228 stroke-width 2 \, stroke blue \, stroke-opacity 0.4
+#X text 61 383 The original is here:;
+#X obj 61 404 pddp/pddplink http://raphaeljs.com/hand.html;
+#X obj 499 113 * 90;
+#X msg 511 228 stroke-width 2 \, stroke blue \, stroke-opacity 0.4
 \, fill none;
-#X msg 594 180 stroke-width 2 \, stroke blue \, fill none;
-#X connect 0 0 18 0;
-#X connect 5 0 14 0;
-#X connect 8 0 2 0;
-#X connect 8 0 7 0;
-#X connect 9 0 25 0;
-#X connect 10 0 13 0;
-#X connect 11 0 12 0;
-#X connect 12 0 4 0;
-#X connect 13 0 9 0;
-#X connect 14 0 3 0;
-#X connect 15 0 13 0;
-#X connect 16 0 17 0;
-#X connect 17 0 6 0;
-#X connect 18 0 10 0;
-#X connect 19 0 27 0;
-#X connect 20 0 26 0;
-#X connect 25 0 8 0;
-#X connect 26 0 7 0;
-#X connect 27 0 2 0;
+#X msg 574 180 stroke-width 2 \, stroke blue \, fill none;
+#X obj 337 452 draw circle 20 320 220;
+#X obj 499 403 draw circle 20 530 430;
+#X obj 499 332 draw circle 5 320 430;
+#X obj 499 251 draw circle 20 320 220;
+#X connect 0 0 14 0;
+#X connect 3 0 10 0;
+#X connect 4 0 2 0;
+#X connect 4 0 27 0;
+#X connect 5 0 21 0;
+#X connect 6 0 9 0;
+#X connect 7 0 8 0;
+#X connect 8 0 24 0;
+#X connect 9 0 5 0;
+#X connect 10 0 26 0;
+#X connect 11 0 9 0;
+#X connect 12 0 13 0;
+#X connect 13 0 25 0;
+#X connect 14 0 6 0;
+#X connect 15 0 23 0;
+#X connect 16 0 22 0;
+#X connect 21 0 4 0;
+#X connect 22 0 27 0;
+#X connect 23 0 2 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/curver.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/curver.pd
index 455190857..b0798afe5 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/curver.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/curver.pd
@@ -1,31 +1,27 @@
 #N struct rcurver float x float y float x1 float y1 float ax float
 ay float bx float by float zx float zy float r float g float b;
-#N canvas 0 19 813 626 10;
+#N canvas 1 25 813 626 10;
 #X obj 92 401 cnv 15 461 213 empty empty empty 20 12 0 14 -33289 -66577
 0;
-#X scalar rcurver 150 439 42 137 -18 141 29 -3 -29 -2 255 40 100 \;
+#X scalar rcurver 150 439 42 137 -18 141 27 -1 -29 -2 255 40 100 \;
 ;
 #X obj 95 69 loadbang;
 #X obj 95 114 draw path M x1 y1 C ax ay bx by zx zy;
 #X obj 95 177 draw path M x1 y1 L ax ay M bx by L zx zy;
 #X msg 95 156 stroke #ccc \, stroke-dasharray 1 1;
 #X obj 95 135 loadbang;
-#X scalar rcurver 250 442 23 125 -31 135 23 -9 -28 -5 80 2 150 \;;
-#X scalar rcurver 365 445 18 131 -31 135 18 -10 -39 -5 150 6 50 \;
+#X scalar rcurver 250 442 23 125 -31 135 13 -5 -31 -6 80 2 150 \;;
+#X scalar rcurver 365 445 18 131 -31 135 18 -10 -41 -4 150 6 50 \;
 ;
-#X scalar rcurver 480 441 34 136 -32 143 17 -9 -37 -5 70 255 60 \;
+#X scalar rcurver 480 441 34 136 -32 143 11 -8 -37 -5 70 255 60 \;
 ;
 #X obj 95 17 struct rcurver float x float y float x1 float y1 float
 ax float ay float bx float by float zx float zy float r float g float
 b;
-#X obj 95 228 draw circle x1 y1 5;
-#X obj 95 269 draw circle ax ay 5;
-#X obj 95 310 draw circle bx by 5;
-#X obj 95 351 draw circle zx zy 5;
 #X obj 16 182 loadbang;
 #X text 424 112 Raphael Curver;
 #X text 424 112 ______________;
-#X text 424 322 So \, though it makes this patch easier to write \,
+#X text 424 336 So \, though it makes this patch easier to write \,
 a more powerful method of defining interactive behavior is needed.
 ;
 #X text 575 430 <- Click and drag the white circles;
@@ -36,14 +32,13 @@ this patch is a full port of the Raphael.js demo and it's much shorter.
 This is because the mouse interaction with the variables is implicit--
 we just define them in the drawing commands and Pd assumes that they
 should be clickable.;
-#X text 424 232 Unfortunately this isn't a very flexible system. There
+#X text 424 241 Unfortunately this isn't a very flexible system. There
 are times when you don't want mouse interaction at a variable \, or
 would like it for some but not all of them. Or you may want some other
 behavior than dragging a vertice of the polygon underneath the mouse.
 At present you can't define any other behavior-- only turn off mouse
 interaction altogether.;
 #X msg 16 203 fill white \, mousedown 1 \, drag 1;
-#X obj 95 249 drag-event rcurver x1 y1;
 #X text 465 24 Note: this can be improved with a set method for [set]:the
 [drag-event] abstraction can be removed;
 #X obj 95 289 drag-event rcurver ax ay;
@@ -51,16 +46,21 @@ interaction altogether.;
 #X obj 95 373 drag-event rcurver zx zy;
 #X msg 95 90 stroke-width 4 \, stroke-linecap 1 \, stroke r g b \,
 fill none;
-#X connect 2 0 28 0;
+#X obj 95 228 draw circle 5 x1 y1;
+#X obj 95 269 draw circle 5 ax ay;
+#X obj 95 310 draw circle 5 bx by;
+#X obj 95 351 draw circle 5 zx zy;
+#X obj 95 249 drag-event rcurver x1 y1;
+#X connect 2 0 23 0;
 #X connect 5 0 4 0;
 #X connect 6 0 5 0;
-#X connect 11 0 23 0;
-#X connect 12 0 25 0;
-#X connect 13 0 26 0;
-#X connect 14 0 27 0;
-#X connect 15 0 22 0;
-#X connect 22 0 11 0;
-#X connect 22 0 12 0;
-#X connect 22 0 13 0;
-#X connect 22 0 14 0;
-#X connect 28 0 3 0;
+#X connect 11 0 18 0;
+#X connect 18 0 24 0;
+#X connect 18 0 25 0;
+#X connect 18 0 26 0;
+#X connect 18 0 27 0;
+#X connect 23 0 3 0;
+#X connect 24 0 28 0;
+#X connect 25 0 20 0;
+#X connect 26 0 21 0;
+#X connect 27 0 22 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/easing.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/easing.pd
index 37647edc1..3119dcf2a 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/easing.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/easing.pd
@@ -1,39 +1,66 @@
 #N struct targets float x float y;
 #N struct movers float x float y float x1 float y1 float style float
 opacity float r float g float b float sw;
-#N canvas 0 25 668 654 10;
-#N canvas 651 83 645 479 targets 0;
-#X obj 323 179 draw rect 0 50 400 450;
+#N canvas 1 25 668 654 10;
+#N canvas 651 83 645 479 targets 1;
 #X obj 119 13 struct targets float x float y;
 #X obj 119 60 loadbang;
-#X obj 159 175 draw circle 300 150 20;
-#X obj 159 215 draw circle 300 200 20;
-#X obj 159 255 draw circle 300 250 20;
-#X obj 159 295 draw circle 300 300 20;
-#X obj 159 335 draw circle 300 350 20;
-#X obj 159 375 draw circle 300 400 20;
-#X obj 159 415 draw circle 300 450 20;
-#X obj 159 135 draw circle 300 100 20;
 #X msg 323 157 fill #333333;
 #X obj 323 135 loadbang;
 #X msg 119 81 fill #000 \, stroke #fff \, stroke-dasharray 4 3 \, stroke-opacity
 1.2 \, fill-opacity 0.2;
-#X connect 2 0 13 0;
-#X connect 11 0 0 0;
-#X connect 12 0 11 0;
-#X connect 13 0 3 0;
-#X connect 13 0 4 0;
-#X connect 13 0 5 0;
-#X connect 13 0 6 0;
-#X connect 13 0 7 0;
-#X connect 13 0 8 0;
-#X connect 13 0 9 0;
-#X connect 13 0 10 0;
+#X obj 323 179 draw rect 400 450 0 50;
+#X obj 159 135 draw circle 20 300 100;
+#X obj 159 175 draw circle 20 300 150;
+#X obj 159 215 draw circle 20 300 200;
+#X obj 159 255 draw circle 20 300 250;
+#X obj 159 295 draw circle 20 300 300;
+#X obj 159 335 draw circle 20 300 350;
+#X obj 159 375 draw circle 20 300 400;
+#X obj 159 415 draw circle 20 300 450;
+#X connect 1 0 4 0;
+#X connect 2 0 5 0;
+#X connect 3 0 2 0;
+#X connect 4 0 6 0;
+#X connect 4 0 7 0;
+#X connect 4 0 8 0;
+#X connect 4 0 9 0;
+#X connect 4 0 10 0;
+#X connect 4 0 11 0;
+#X connect 4 0 12 0;
+#X connect 4 0 13 0;
 #X restore 33 19 pd targets;
 #X scalar targets 33 9 \;;
-#N canvas 710 109 645 479 movers 1;
+#X scalar movers 133 109 200 0 0 1 255 0 0 3 \;;
+#X scalar movers 133 159 200 0 1 1 100 100 0 3 \;;
+#X scalar movers 133 209 200 0 2 1 0 100 100 3 \;;
+#X scalar movers 133 310 200 -1 4 1 50 210 0 3 \;;
+#X scalar movers 133 359 200 0 5 1 210 0 80 3 \;;
+#X scalar movers 133 409 200 0 6 1 42 84 126 3 \;;
+#X scalar movers 133 459 200 0 7 1 80 80 0 3 \;;
+#X scalar movers 133 259 200 0 3 0.999999 100 0 0 3 \;;
+#X text 450 99 linear;
+#X text 450 149 easein;
+#X text 450 199 easeout;
+#X text 450 249 easeinout;
+#X text 450 299 backin;
+#X text 450 349 backout;
+#X text 450 399 elastic;
+#X text 450 449 bounce;
+#X text 33 1021 Click a "mover" ^;
+#X text 33 531 Easing;
+#X text 33 531 ______;
+#X text 33 551 Here are a few animation styles taken from Raphael.js.
+This demo defines two different data structures-- one for the dashed
+circles and background \, and another for the animated circles. Currently
+this doesn't work well because you can't control z-ordering-- the most
+recently moved scalar is always at the front. But since only one type
+of scalar is being animated and none of them overlap \, it isn't a
+problem here.;
+#X text 450 531 Based on:;
+#X obj 450 552 pddp/pddplink http://raphaeljs.com/easing.html;
+#N canvas 710 109 645 479 movers 0;
 #X obj 119 250 loadbang;
-#X obj 119 312 draw circle x1 y1 20;
 #X obj 119 52 route click;
 #X obj 119 73 trigger anything anything;
 #X obj 298 151 print junk;
@@ -403,41 +430,14 @@ opacity float r float g float b float sw;
 style float opacity float r float g float b float sw;
 #X msg 119 270 fill r g b \, stroke #fff \, stroke-dasharray \, fill-opacity
 opacity \, stroke-width sw;
-#X connect 0 0 9 0;
-#X connect 2 0 3 0;
-#X connect 3 0 7 0;
-#X connect 3 1 5 0;
-#X connect 5 0 6 2;
-#X connect 7 0 6 0;
-#X connect 7 1 6 1;
-#X connect 8 0 2 0;
-#X connect 9 0 1 0;
+#X obj 120 312 draw circle 20 x1 y1;
+#X connect 0 0 8 0;
+#X connect 1 0 2 0;
+#X connect 2 0 6 0;
+#X connect 2 1 4 0;
+#X connect 4 0 5 2;
+#X connect 6 0 5 0;
+#X connect 6 1 5 1;
+#X connect 7 0 1 0;
+#X connect 8 0 9 0;
 #X restore 113 19 pd movers;
-#X scalar movers 133 109 0 0 0 0 255 0 0 1 \;;
-#X scalar movers 133 159 0 0 1 0 100 100 0 1 \;;
-#X scalar movers 133 209 0 0 2 0 0 100 100 1 \;;
-#X scalar movers 133 310 0 -1 4 0 50 210 0 1 \;;
-#X scalar movers 133 359 0 0 5 0 210 0 80 1 \;;
-#X scalar movers 133 409 0 0 6 0 42 84 126 1 \;;
-#X scalar movers 133 459 0 0 7 0 80 80 0 1 \;;
-#X scalar movers 133 259 0.000244141 0 3 1.2207e-06 100 0 0 1 \;;
-#X text 450 99 linear;
-#X text 450 149 easein;
-#X text 450 199 easeout;
-#X text 450 249 easeinout;
-#X text 450 299 backin;
-#X text 450 349 backout;
-#X text 450 399 elastic;
-#X text 450 449 bounce;
-#X text 33 511 Click a "mover" ^;
-#X text 33 531 Easing;
-#X text 33 531 ______;
-#X text 33 551 Here are a few animation styles taken from Raphael.js.
-This demo defines two different data structures-- one for the dashed
-circles and background \, and another for the animated circles. Currently
-this doesn't work well because you can't control z-ordering-- the most
-recently moved scalar is always at the front. But since only one type
-of scalar is being animated and none of them overlap \, it isn't a
-problem here.;
-#X text 450 531 Based on:;
-#X obj 450 552 pddp/pddplink http://raphaeljs.com/easing.html;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/ellipses.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/ellipses.pd
index a52d18bc3..10ecc729e 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/ellipses.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/ellipses.pd
@@ -1,30 +1,20 @@
 #N struct ellipses float x float y;
-#N canvas 0 19 638 643 10;
+#N canvas 1 25 638 643 10;
 #X obj 344 33 loadbang;
 #X msg 344 53 stroke #c8c8c8 \, fill #e6e6e6;
-#X obj 344 73 draw circle 60 60 32;
 #X obj 344 93 loadbang;
 #X msg 344 113 stroke #a19de2 \, fill #d6d6ff;
-#X obj 344 133 draw circle 200 60 32;
 #X obj 344 153 loadbang;
 #X msg 344 173 stroke #9ac790 \, fill #cae2c5;
-#X obj 344 193 draw circle 60 160 40;
 #X obj 344 213 loadbang;
 #X msg 344 233 stroke #e2a19d \, fill #ffd6d6;
-#X obj 344 253 draw circle 200 160 40;
 #X obj 344 273 loadbang;
-#X obj 344 313 draw ellipse 200 280 20 60;
 #X obj 344 333 loadbang;
-#X obj 344 373 draw ellipse 100 260 60 20;
 #X msg 344 353 stroke #666666 \, stroke-width 3 \, fill #bdbdbd;
 #X obj 344 393 loadbang;
-#X obj 344 433 draw ellipse 280 280 20 60;
 #X obj 344 453 loadbang;
-#X obj 344 493 draw circle 300 220 8;
 #X obj 344 513 loadbang;
-#X obj 344 553 draw circle 300 240 8;
 #X obj 344 573 loadbang;
-#X obj 344 610 draw circle 300 260 8;
 #X obj 344 13 struct ellipses float x float y;
 #X scalar ellipses 3 0 \;;
 #X msg 344 593 fill blue;
@@ -32,23 +22,33 @@
 #X msg 344 473 fill red;
 #X msg 344 293 stroke #999999 \, fill none;
 #X msg 344 413 fill none \, stroke black;
+#X obj 344 610 draw circle 8 300 260;
+#X obj 344 553 draw circle 8 300 240;
+#X obj 344 493 draw circle 8 300 220;
+#X obj 344 433 draw ellipse 20 60 280 280;
+#X obj 344 373 draw ellipse 60 20 100 260;
+#X obj 344 313 draw ellipse 20 60 200 280;
+#X obj 344 253 draw circle 40 200 160;
+#X obj 344 193 draw circle 40 60 160;
+#X obj 344 133 draw circle 32 200 60;
+#X obj 344 73 draw circle 32 60 60;
 #X connect 0 0 1 0;
-#X connect 1 0 2 0;
-#X connect 3 0 4 0;
+#X connect 1 0 31 0;
+#X connect 2 0 3 0;
+#X connect 3 0 30 0;
 #X connect 4 0 5 0;
+#X connect 5 0 29 0;
 #X connect 6 0 7 0;
-#X connect 7 0 8 0;
+#X connect 7 0 28 0;
+#X connect 8 0 20 0;
 #X connect 9 0 10 0;
-#X connect 10 0 11 0;
-#X connect 12 0 30 0;
-#X connect 14 0 16 0;
-#X connect 16 0 15 0;
-#X connect 17 0 31 0;
-#X connect 19 0 29 0;
-#X connect 21 0 28 0;
-#X connect 23 0 27 0;
-#X connect 27 0 24 0;
-#X connect 28 0 22 0;
-#X connect 29 0 20 0;
-#X connect 30 0 13 0;
-#X connect 31 0 18 0;
+#X connect 10 0 26 0;
+#X connect 11 0 21 0;
+#X connect 12 0 19 0;
+#X connect 13 0 18 0;
+#X connect 14 0 17 0;
+#X connect 17 0 22 0;
+#X connect 18 0 23 0;
+#X connect 19 0 24 0;
+#X connect 20 0 27 0;
+#X connect 21 0 25 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/hexshifter.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/hexshifter.pd
index 51a82d26e..2bfa385ff 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/hexshifter.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/hexshifter.pd
@@ -1,200 +1,200 @@
 #N struct http://prescottfoland.co/hexshifter/ float x float y;
-#N canvas 122 24 947 656 10;
-#X scalar http://prescottfoland.co/hexshifter/ 57 53 \;;
-#X obj 708 611 draw rect -20 -20 863 615;
+#N canvas 1 25 947 656 10;
 #X obj 274 3 struct http://prescottfoland.co/hexshifter/ float x float
 y;
-#X msg 68 67 1;
-#X obj 68 254 +;
-#X msg 108 67 -1;
-#X obj 68 275 min 15;
-#X obj 68 296 max 0;
-#X msg 198 67 1;
-#X obj 198 224 +;
-#X msg 238 67 -1;
-#X obj 198 245 min 15;
-#X obj 198 266 max 0;
-#X msg 328 67 1;
-#X obj 328 194 +;
-#X msg 368 67 -1;
-#X obj 328 215 min 15;
-#X obj 328 236 max 0;
-#X msg 458 67 1;
-#X obj 458 164 +;
-#X msg 498 67 -1;
-#X obj 458 185 min 15;
-#X obj 458 206 max 0;
-#X msg 588 67 1;
-#X obj 588 129 +;
-#X msg 628 67 -1;
-#X obj 588 150 min 15;
-#X obj 588 171 max 0;
-#X msg 718 67 1;
-#X obj 718 104 +;
-#X msg 758 67 -1;
-#X obj 718 125 min 15;
-#X obj 718 146 max 0;
-#X symbolatom 778 585 10 0 0 0 - - -, f 10;
-#X obj 68 438 << 20;
-#X obj 778 541 +;
-#X obj 198 408 << 16;
-#X obj 328 378 << 12;
-#X obj 778 468 t b a;
-#X obj 778 489 +;
-#X obj 778 510 t b a;
-#X obj 458 348 << 8;
-#X obj 778 445 +;
-#X obj 778 397 +;
-#X obj 588 313 << 4;
-#X obj 778 352 +;
-#X obj 778 420 t b a;
-#X obj 778 374 t b a;
-#X obj 778 328 t b a;
-#X msg 112 418 fill \$1 0 0;
-#X obj 112 358 + 1;
-#X obj 112 378 << 4;
-#X obj 112 398 - 1;
-#X msg 245 388 fill \$1 0 0;
-#X obj 245 328 + 1;
-#X obj 245 348 << 4;
-#X obj 245 368 - 1;
-#X obj 375 298 + 1;
-#X obj 375 318 << 4;
-#X obj 375 338 - 1;
-#X msg 375 358 fill 0 \$1 0;
-#X obj 495 268 + 1;
-#X obj 495 288 << 4;
-#X obj 495 308 - 1;
-#X msg 495 328 fill 0 \$1 0;
-#X obj 626 233 + 1;
-#X obj 626 253 << 4;
-#X obj 626 273 - 1;
-#X obj 718 208 + 1;
-#X obj 718 228 << 4;
-#X obj 718 248 - 1;
-#X msg 718 268 fill 0 0 \$1;
-#X msg 626 293 fill 0 0 \$1;
-#X obj 68 327 t a a;
-#X obj 198 297 t a a;
-#X obj 328 267 t a a;
-#X obj 458 237 t a a;
-#X obj 588 202 t a a;
-#X obj 718 177 trigger anything anything;
-#X obj 68 98 t a;
-#X obj 198 98 t a;
-#X obj 328 98 t a;
-#X obj 458 98 t a;
-#X obj 588 98 t a;
-#X obj 112 438 draw rect 0 0 133 420;
-#X obj 245 408 draw rect 133 0 133 380;
-#X obj 375 378 draw rect 266 0 129 350;
-#X obj 495 348 draw rect 395 0 129 320;
-#X obj 626 313 draw rect 524 0 133 290;
-#X obj 718 288 draw rect 655 0 168 258;
-#X msg 708 585 fill #\$1;
-#X obj 330 564 loadbang;
-#X msg 330 585 stroke-width 2 \, stroke gray \, stroke-dasharray \,
+#X scalar http://prescottfoland.co/hexshifter/ 57 52 \;;
+#X msg 68 62 1;
+#X obj 68 249 +;
+#X msg 108 62 -1;
+#X obj 68 270 min 15;
+#X obj 68 291 max 0;
+#X msg 198 62 1;
+#X obj 198 219 +;
+#X msg 238 62 -1;
+#X obj 198 240 min 15;
+#X obj 198 261 max 0;
+#X msg 328 62 1;
+#X obj 328 189 +;
+#X msg 368 62 -1;
+#X obj 328 210 min 15;
+#X obj 328 231 max 0;
+#X msg 458 62 1;
+#X obj 458 159 +;
+#X msg 498 62 -1;
+#X obj 458 180 min 15;
+#X obj 458 201 max 0;
+#X msg 588 62 1;
+#X obj 588 124 +;
+#X msg 628 62 -1;
+#X obj 588 145 min 15;
+#X obj 588 166 max 0;
+#X msg 718 62 1;
+#X obj 718 99 +;
+#X msg 758 62 -1;
+#X obj 718 120 min 15;
+#X obj 718 141 max 0;
+#X symbolatom 778 580 10 0 0 0 - - -, f 10;
+#X obj 68 433 << 20;
+#X obj 778 536 +;
+#X obj 198 403 << 16;
+#X obj 328 373 << 12;
+#X obj 778 463 t b a;
+#X obj 778 484 +;
+#X obj 778 505 t b a;
+#X obj 458 343 << 8;
+#X obj 778 440 +;
+#X obj 778 392 +;
+#X obj 588 308 << 4;
+#X obj 778 347 +;
+#X obj 778 415 t b a;
+#X obj 778 369 t b a;
+#X obj 778 323 t b a;
+#X msg 112 413 fill \$1 0 0;
+#X obj 112 353 + 1;
+#X obj 112 373 << 4;
+#X obj 112 393 - 1;
+#X msg 245 383 fill \$1 0 0;
+#X obj 245 323 + 1;
+#X obj 245 343 << 4;
+#X obj 245 363 - 1;
+#X obj 375 293 + 1;
+#X obj 375 313 << 4;
+#X obj 375 333 - 1;
+#X msg 375 353 fill 0 \$1 0;
+#X obj 495 263 + 1;
+#X obj 495 283 << 4;
+#X obj 495 303 - 1;
+#X msg 495 323 fill 0 \$1 0;
+#X obj 626 228 + 1;
+#X obj 626 248 << 4;
+#X obj 626 268 - 1;
+#X obj 718 203 + 1;
+#X obj 718 223 << 4;
+#X obj 718 243 - 1;
+#X msg 718 263 fill 0 0 \$1;
+#X msg 626 288 fill 0 0 \$1;
+#X obj 68 322 t a a;
+#X obj 198 292 t a a;
+#X obj 328 262 t a a;
+#X obj 458 232 t a a;
+#X obj 588 197 t a a;
+#X obj 718 172 trigger anything anything;
+#X obj 68 93 t a;
+#X obj 198 93 t a;
+#X obj 328 93 t a;
+#X obj 458 93 t a;
+#X obj 588 93 t a;
+#X obj 112 433 draw rect 0 0 133 420;
+#X obj 245 403 draw rect 133 0 133 380;
+#X obj 375 373 draw rect 266 0 129 350;
+#X obj 495 343 draw rect 395 0 129 320;
+#X obj 626 308 draw rect 524 0 133 290;
+#X obj 718 283 draw rect 655 0 168 258;
+#X msg 708 580 fill #\$1;
+#X obj 330 559 loadbang;
+#X msg 330 580 stroke-width 2 \, stroke gray \, stroke-dasharray \,
 rx 30 \, ry 30;
-#X obj 778 563 makefilename %.6x;
-#X connect 3 0 79 0;
-#X connect 4 0 6 0;
-#X connect 5 0 79 0;
-#X connect 6 0 7 0;
-#X connect 7 0 73 0;
-#X connect 8 0 80 0;
-#X connect 9 0 11 0;
-#X connect 10 0 80 0;
-#X connect 11 0 12 0;
-#X connect 12 0 74 0;
-#X connect 13 0 81 0;
-#X connect 14 0 16 0;
-#X connect 15 0 81 0;
-#X connect 16 0 17 0;
-#X connect 17 0 75 0;
-#X connect 18 0 82 0;
-#X connect 19 0 21 0;
-#X connect 20 0 82 0;
-#X connect 21 0 22 0;
-#X connect 22 0 76 0;
-#X connect 23 0 83 0;
-#X connect 24 0 26 0;
-#X connect 25 0 83 0;
-#X connect 26 0 27 0;
-#X connect 27 0 77 0;
-#X connect 28 0 29 0;
-#X connect 29 0 31 0;
-#X connect 30 0 29 0;
-#X connect 31 0 32 0;
-#X connect 32 0 78 0;
-#X connect 34 0 35 0;
-#X connect 35 0 93 0;
-#X connect 36 0 39 0;
-#X connect 37 0 42 0;
+#X obj 778 558 makefilename %.6x;
+#X obj 708 606 draw rect 863 615 -20 -20;
+#X connect 2 0 78 0;
+#X connect 3 0 5 0;
+#X connect 4 0 78 0;
+#X connect 5 0 6 0;
+#X connect 6 0 72 0;
+#X connect 7 0 79 0;
+#X connect 8 0 10 0;
+#X connect 9 0 79 0;
+#X connect 10 0 11 0;
+#X connect 11 0 73 0;
+#X connect 12 0 80 0;
+#X connect 13 0 15 0;
+#X connect 14 0 80 0;
+#X connect 15 0 16 0;
+#X connect 16 0 74 0;
+#X connect 17 0 81 0;
+#X connect 18 0 20 0;
+#X connect 19 0 81 0;
+#X connect 20 0 21 0;
+#X connect 21 0 75 0;
+#X connect 22 0 82 0;
+#X connect 23 0 25 0;
+#X connect 24 0 82 0;
+#X connect 25 0 26 0;
+#X connect 26 0 76 0;
+#X connect 27 0 28 0;
+#X connect 28 0 30 0;
+#X connect 29 0 28 0;
+#X connect 30 0 31 0;
+#X connect 31 0 77 0;
+#X connect 33 0 34 0;
+#X connect 34 0 92 0;
+#X connect 35 0 38 0;
+#X connect 36 0 41 0;
+#X connect 37 0 38 0;
+#X connect 37 1 38 1;
 #X connect 38 0 39 0;
-#X connect 38 1 39 1;
-#X connect 39 0 40 0;
-#X connect 40 0 35 0;
-#X connect 40 1 35 1;
-#X connect 41 0 43 0;
-#X connect 42 0 38 0;
-#X connect 43 0 46 0;
-#X connect 44 0 45 0;
-#X connect 45 0 47 0;
+#X connect 39 0 34 0;
+#X connect 39 1 34 1;
+#X connect 40 0 42 0;
+#X connect 41 0 37 0;
+#X connect 42 0 45 0;
+#X connect 43 0 44 0;
+#X connect 44 0 46 0;
+#X connect 45 0 41 0;
+#X connect 45 1 41 1;
 #X connect 46 0 42 0;
 #X connect 46 1 42 1;
-#X connect 47 0 43 0;
-#X connect 47 1 43 1;
-#X connect 48 0 45 0;
-#X connect 48 1 45 1;
-#X connect 49 0 84 0;
+#X connect 47 0 44 0;
+#X connect 47 1 44 1;
+#X connect 48 0 83 0;
+#X connect 49 0 50 0;
 #X connect 50 0 51 0;
-#X connect 51 0 52 0;
-#X connect 52 0 49 0;
-#X connect 53 0 85 0;
+#X connect 51 0 48 0;
+#X connect 52 0 84 0;
+#X connect 53 0 54 0;
 #X connect 54 0 55 0;
-#X connect 55 0 56 0;
-#X connect 56 0 53 0;
+#X connect 55 0 52 0;
+#X connect 56 0 57 0;
 #X connect 57 0 58 0;
 #X connect 58 0 59 0;
-#X connect 59 0 60 0;
-#X connect 60 0 86 0;
+#X connect 59 0 85 0;
+#X connect 60 0 61 0;
 #X connect 61 0 62 0;
 #X connect 62 0 63 0;
-#X connect 63 0 64 0;
-#X connect 64 0 87 0;
+#X connect 63 0 86 0;
+#X connect 64 0 65 0;
 #X connect 65 0 66 0;
-#X connect 66 0 67 0;
-#X connect 67 0 72 0;
+#X connect 66 0 71 0;
+#X connect 67 0 68 0;
 #X connect 68 0 69 0;
 #X connect 69 0 70 0;
-#X connect 70 0 71 0;
-#X connect 71 0 89 0;
-#X connect 72 0 88 0;
-#X connect 73 0 34 0;
-#X connect 73 0 4 1;
-#X connect 73 1 50 0;
-#X connect 74 0 9 1;
+#X connect 70 0 88 0;
+#X connect 71 0 87 0;
+#X connect 72 0 33 0;
+#X connect 72 0 3 1;
+#X connect 72 1 49 0;
+#X connect 73 0 8 1;
+#X connect 73 0 35 0;
+#X connect 73 1 53 0;
+#X connect 74 0 13 1;
 #X connect 74 0 36 0;
-#X connect 74 1 54 0;
-#X connect 75 0 14 1;
-#X connect 75 0 37 0;
-#X connect 75 1 57 0;
-#X connect 76 0 19 1;
-#X connect 76 0 41 0;
-#X connect 76 1 61 0;
-#X connect 77 0 24 1;
-#X connect 77 0 44 0;
-#X connect 77 1 65 0;
-#X connect 78 0 29 1;
-#X connect 78 0 68 0;
-#X connect 78 1 48 0;
-#X connect 79 0 4 0;
-#X connect 80 0 9 0;
-#X connect 81 0 14 0;
-#X connect 82 0 19 0;
-#X connect 83 0 24 0;
-#X connect 90 0 1 0;
-#X connect 91 0 92 0;
-#X connect 92 0 1 0;
-#X connect 93 0 90 0;
-#X connect 93 0 33 0;
+#X connect 74 1 56 0;
+#X connect 75 0 18 1;
+#X connect 75 0 40 0;
+#X connect 75 1 60 0;
+#X connect 76 0 23 1;
+#X connect 76 0 43 0;
+#X connect 76 1 64 0;
+#X connect 77 0 28 1;
+#X connect 77 0 67 0;
+#X connect 77 1 47 0;
+#X connect 78 0 3 0;
+#X connect 79 0 8 0;
+#X connect 80 0 13 0;
+#X connect 81 0 18 0;
+#X connect 82 0 23 0;
+#X connect 89 0 93 0;
+#X connect 90 0 91 0;
+#X connect 91 0 93 0;
+#X connect 92 0 89 0;
+#X connect 92 0 32 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/opacity.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/opacity.pd
index 96a4d5383..df50e6041 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/opacity.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/opacity.pd
@@ -1,12 +1,9 @@
 #N struct opacity float x float y;
-#N canvas 0 19 821 586 10;
+#N canvas 102 82 821 586 10;
 #X obj 208 24 struct opacity float x float y;
 #X obj 266 541 loadbang;
-#X obj 266 583 draw circle 0 60 60;
 #X obj 326 448 loadbang;
-#X obj 326 490 draw circle 0 60 60;
 #X obj 366 357 loadbang;
-#X obj 366 399 draw circle 0 60 60;
 #X obj 251 120 f;
 #X floatatom 278 147 5 0 0 1 speed - -, f 5;
 #X obj 251 192 pack 0 100;
@@ -33,31 +30,34 @@
 #X msg 366 378 fill blue \, fill-opacity 0.5;
 #X msg 326 469 fill green \, fill-opacity 0.5;
 #X msg 266 562 fill red \, fill-opacity 0.5;
-#X connect 1 0 29 0;
-#X connect 3 0 28 0;
-#X connect 5 0 27 0;
-#X connect 7 0 22 0;
-#X connect 7 0 23 0;
-#X connect 8 0 23 1;
-#X connect 9 0 11 0;
-#X connect 10 0 9 1;
+#X obj 366 399 draw circle 60 0 60;
+#X obj 326 490 draw circle 60 0 60;
+#X obj 266 583 draw circle 60 0 60;
+#X connect 1 0 26 0;
+#X connect 2 0 25 0;
+#X connect 3 0 24 0;
+#X connect 4 0 19 0;
+#X connect 4 0 20 0;
+#X connect 5 0 20 1;
+#X connect 6 0 8 0;
+#X connect 7 0 6 1;
+#X connect 8 0 11 0;
+#X connect 8 1 11 1;
+#X connect 8 2 10 0;
+#X connect 8 3 10 1;
+#X connect 8 4 9 0;
+#X connect 8 5 9 1;
+#X connect 9 0 12 0;
+#X connect 10 0 13 0;
 #X connect 11 0 14 0;
-#X connect 11 1 14 1;
-#X connect 11 2 13 0;
-#X connect 11 3 13 1;
-#X connect 11 4 12 0;
-#X connect 11 5 12 1;
-#X connect 12 0 15 0;
-#X connect 13 0 16 0;
-#X connect 14 0 17 0;
-#X connect 15 0 6 0;
-#X connect 16 0 4 0;
-#X connect 17 0 2 0;
-#X connect 19 0 23 0;
-#X connect 20 0 7 0;
-#X connect 21 0 20 0;
-#X connect 22 0 7 1;
-#X connect 23 0 9 0;
-#X connect 27 0 6 0;
-#X connect 28 0 4 0;
-#X connect 29 0 2 0;
+#X connect 12 0 27 0;
+#X connect 13 0 28 0;
+#X connect 14 0 29 0;
+#X connect 16 0 20 0;
+#X connect 17 0 4 0;
+#X connect 18 0 17 0;
+#X connect 19 0 4 1;
+#X connect 20 0 6 0;
+#X connect 24 0 27 0;
+#X connect 25 0 28 0;
+#X connect 26 0 29 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/polar-clock.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/polar-clock.pd
index 908b227f6..63d99ec92 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/polar-clock.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/polar-clock.pd
@@ -1,13 +1,12 @@
 #N struct polar-clock float x float y float ax float ay float flag
 float xloc float yloc float mx float my float r;
-#N canvas 0 19 1062 664 10;
-#X scalar polar-clock 281 372 -111.804 -67.5566 1 0 0 50 -150 200 \;
+#N canvas 1 32 1022 664 10;
+#X scalar polar-clock 281 372 131.348 -132.709 0 0 0 50 -150 200 \;
 ;
 #X obj 137 29 struct polar-clock float x float y float ax float ay
 float flag float xloc float yloc float mx float my float r;
 #X obj 139 65 loadbang;
-#X scalar polar-clock 281 372 -44.046 -79.4424 1 0 0 50 -110 160 \;
-;
+#X scalar polar-clock 281 372 210 50 0 0 0 50 -110 160 \;;
 #X scalar polar-clock 281 372 -53.9232 -9.9997 1 0 0 50 -70 120 \;
 ;
 #X scalar polar-clock 281 372 33.3672 128.252 1 0 0 50 -30 80 \;;
@@ -160,9 +159,7 @@ float flag float xloc float yloc float mx float my float r;
 #X floatatom 648 592 5 0 0 0 - - -, f 5;
 #X floatatom 607 592 5 0 0 1 : - -, f 5;
 #X obj 509 29 namecanvas polar_clock;
-#X obj 395 126 draw circle mx mx r;
-#X obj 139 110 draw path M mx my A r r 0 flag 1 ax ay;
-#X obj 395 65 loadbang;
+#X obj 415 65 loadbang;
 #X text 604 148 Raphael Polar Clock;
 #X text 604 148 ___________________;
 #X text 604 253 In addition \, drawing the arcs for this patch has
@@ -191,14 +188,16 @@ as the main (and probably _only_) reference. So take a sip of coffee
 \, think how much easier it is to write code for a living than loading
 shit into a truck \, and get to work;
 #X msg 139 86 stroke-width 30 \, stroke ay ax ay \, fill none;
-#X msg 395 89 stroke gray \, stroke-width 5 \, stroke-dasharray 1 15
+#X msg 415 89 stroke gray \, stroke-width 5 \, stroke-dasharray 1 15
 \, stroke-linecap 1 \, stroke-opacity 0.4 \, fill none;
-#X connect 2 0 24 0;
+#X obj 415 126 draw circle r mx mx;
+#X obj 139 110 draw path M mx my A r r 0 flag 1 ax ay;
+#X connect 2 0 22 0;
 #X connect 7 0 12 0;
 #X connect 7 1 11 0;
 #X connect 7 2 10 0;
 #X connect 7 3 9 0;
 #X connect 7 4 8 0;
-#X connect 16 0 25 0;
-#X connect 24 0 15 0;
-#X connect 25 0 14 0;
+#X connect 14 0 23 0;
+#X connect 22 0 25 0;
+#X connect 23 0 24 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph.pd
index fdd7697f5..99f0eb6c2 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph.pd
@@ -1,7 +1,7 @@
 #N struct quick-graph float x float y float y0 float y1 float y2 float
 y3 float y4 float y5 float y6;
 #N struct hotspot float x float y float radius;
-#N canvas 0 19 619 390 10;
+#N canvas 203 180 619 390 10;
 #X scalar quick-graph 30 105 99 89 83 72 56 63 32 \;;
 #X msg 243 97 fill blue \, stroke blue \, stroke-width 2 \, fill-opacity
 0.6;
@@ -16,7 +16,6 @@ y2 float y3 float y4 float y5 float y6;
 #X msg 131 184 fill blue \, stroke blue \, fill-opacity 0.6 \, mousedown
 1 \, drag 1;
 #X obj 268 158 draw circle 0 0 8;
-#X obj 131 219 draw circle 0 0 radius;
 #X msg 224 74 4 \$1;
 #X obj 224 95 set hotspot radius;
 #X obj 131 118 set hotspot radius;
@@ -39,37 +38,38 @@ y2 float y3 float y4 float y5 float y6;
 #X obj 241 541 set;
 #X msg 241 482 set quick-graph y\$1 \, \$2;
 #X msg 268 139 fill none;
-#X connect 0 0 10 0;
-#X connect 0 2 7 0;
+#X obj 131 219 draw circle radius 0 0;
+#X connect 0 0 9 0;
+#X connect 0 2 6 0;
 #X connect 1 0 4 0;
-#X connect 2 0 28 0;
+#X connect 2 0 27 0;
 #X connect 3 0 0 0;
-#X connect 4 0 6 0;
-#X connect 6 0 11 0;
-#X connect 7 0 8 0;
-#X connect 10 0 9 0;
-#X connect 11 0 12 0;
+#X connect 4 0 28 0;
+#X connect 6 0 7 0;
+#X connect 9 0 8 0;
+#X connect 10 0 11 0;
+#X connect 11 0 15 0;
+#X connect 11 1 12 0;
+#X connect 12 0 13 1;
 #X connect 12 0 16 0;
-#X connect 12 1 13 0;
-#X connect 13 0 14 1;
-#X connect 13 0 17 0;
+#X connect 14 0 13 0;
 #X connect 15 0 14 0;
-#X connect 16 0 15 0;
-#X connect 17 0 20 0;
-#X connect 17 1 15 1;
-#X connect 17 1 25 0;
-#X connect 18 0 19 0;
-#X connect 19 0 24 0;
-#X connect 20 0 18 0;
-#X connect 20 1 21 0;
-#X connect 21 0 22 0;
-#X connect 22 0 26 1;
-#X connect 22 1 23 0;
-#X connect 23 0 22 0;
-#X connect 24 0 27 0;
-#X connect 25 0 24 1;
-#X connect 27 0 26 0;
-#X connect 28 0 5 0;
+#X connect 16 0 19 0;
+#X connect 16 1 14 1;
+#X connect 16 1 24 0;
+#X connect 17 0 18 0;
+#X connect 18 0 23 0;
+#X connect 19 0 17 0;
+#X connect 19 1 20 0;
+#X connect 20 0 21 0;
+#X connect 21 0 25 1;
+#X connect 21 1 22 0;
+#X connect 22 0 21 0;
+#X connect 23 0 26 0;
+#X connect 24 0 23 1;
+#X connect 26 0 25 0;
+#X connect 27 0 5 0;
+#X connect 28 0 10 0;
 #X restore 243 174 pd hotspot;
 #X scalar hotspot 30 194 4 \;;
 #X scalar hotspot 50 185 4 \;;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph2.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph2.pd
index b35abb999..6ffe86516 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph2.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/quick-graph2.pd
@@ -1,6 +1,6 @@
 #N struct quick-graph2 float x float y float y0 float y1 float y2 float
 y3 float y4 float y5 float y6;
-#N canvas 0 19 619 638 10;
+#N canvas 203 56 619 638 10;
 #X scalar quick-graph2 35 123 98 89 72 125 58 79 109 \;;
 #X msg 243 97 fill blue \, stroke blue \, stroke-width 2 \, fill-opacity
 0.6;
@@ -20,7 +20,6 @@ only happened with the mouse enters a shape \, rather than the bbox.
 #X obj 243 120 draw path M 0 y0 C 10 y0 10 y1 20 y1 C 30 y1 30 y2 40
 y2 C 50 y2 50 y3 60 y3 C 70 y3 70 y4 80 y4 C 90 y4 90 y5 100 y5 110
 y5 110 y6 120 y6 L 120 150 0 150 z;
-#X obj 233 224 draw circle 0 y0(-150:150)(-160:140) 5;
 #X obj 233 247 drag-event-y quick-graph2 y0;
 #X obj 233 307 drag-event-y quick-graph2 y1;
 #X obj 233 357 drag-event-y quick-graph2 y2;
@@ -28,12 +27,6 @@ y5 110 y6 120 y6 L 120 150 0 150 z;
 #X obj 233 467 drag-event-y quick-graph2 y4;
 #X obj 233 517 drag-event-y quick-graph2 y5;
 #X obj 233 567 drag-event-y quick-graph2 y6;
-#X obj 233 284 draw circle 20 y1(-150:150)(-160:140) 5;
-#X obj 233 334 draw circle 40 y2(-150:150)(-160:140) 5;
-#X obj 233 394 draw circle 60 y3(-150:150)(-160:140) 5;
-#X obj 233 444 draw circle 80 y4(-150:150)(-160:140) 5;
-#X obj 233 494 draw circle 100 y5(-150:150)(-160:140) 5;
-#X obj 233 544 draw circle 120 y6(-150:150)(-160:140) 5;
 #X obj 194 168 loadbang;
 #X msg 194 188 mousedown 1 \, drag 1 \, fill blue \, fill-opacity 0.6
 ;
@@ -45,20 +38,27 @@ y5 110 y6 120 y6 L 120 150 0 150 z;
 #X text 19 443 patch is a bit more clunky and;
 #X text 19 463 harder to read.;
 #X text 19 323 Here's another quick graph \,;
+#X obj 233 224 draw circle 5 0 y0(-150:150)(-160:140);
+#X obj 233 284 draw circle 5 20 y1(-150:150)(-160:140);
+#X obj 233 334 draw circle 5 40 y2(-150:150)(-160:140);
+#X obj 233 394 draw circle 5 60 y3(-150:150)(-160:140);
+#X obj 233 444 draw circle 5 80 y4(-150:150)(-160:140);
+#X obj 233 494 draw circle 5 100 y5(-150:150)(-160:140);
+#X obj 233 544 draw circle 5 120 y6(-150:150)(-160:140);
 #X connect 1 0 9 0;
 #X connect 3 0 1 0;
-#X connect 10 0 11 0;
-#X connect 18 0 12 0;
-#X connect 19 0 13 0;
-#X connect 20 0 14 0;
-#X connect 21 0 15 0;
-#X connect 22 0 16 0;
-#X connect 23 0 17 0;
-#X connect 24 0 25 0;
-#X connect 25 0 10 0;
-#X connect 25 0 18 0;
-#X connect 25 0 19 0;
-#X connect 25 0 20 0;
-#X connect 25 0 21 0;
-#X connect 25 0 22 0;
-#X connect 25 0 23 0;
+#X connect 17 0 18 0;
+#X connect 18 0 27 0;
+#X connect 18 0 28 0;
+#X connect 18 0 29 0;
+#X connect 18 0 30 0;
+#X connect 18 0 31 0;
+#X connect 18 0 32 0;
+#X connect 18 0 33 0;
+#X connect 27 0 10 0;
+#X connect 28 0 11 0;
+#X connect 29 0 12 0;
+#X connect 30 0 13 0;
+#X connect 31 0 14 0;
+#X connect 32 0 15 0;
+#X connect 33 0 16 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/raphael-animation.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/raphael-animation.pd
index faa7fa661..39e14631b 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/raphael-animation.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/raphael-animation.pd
@@ -1,18 +1,12 @@
 #N struct animation float x float y;
-#N canvas 0 19 774 535 10;
+#N canvas 126 108 774 535 10;
 #X obj 202 20 struct animation float x float y;
 #X scalar animation 93 121 \;;
 #X obj 310 50 loadbang;
 #X obj 310 141 loadbang;
-#X obj 310 182 draw rect -100 -100 200 200;
-#X obj 310 94 draw path m -10 -10 l 20 0 0 -6 10 16 -10 16 0 -6 -20
-0 0 6 -10 -16 10 -16 z;
 #X obj 380 262 loadbang;
-#X obj 380 305 draw circle -50 0 20;
 #X obj 380 339 loadbang;
-#X obj 380 397 draw circle -50 0 20;
 #X obj 384 421 loadbang;
-#X obj 384 476 draw circle 50 0 20;
 #X obj 202 98 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
 #X msg 202 118 \$1 1000;
@@ -42,24 +36,30 @@ of the drawings.);
 0.2 \, stroke-width 2 \, fill none;
 #X msg 380 360 stroke-dasharray 5 2 \, stroke #fff \, stroke-opacity
 0.2 \, stroke-width 2 \, fill none;
-#X connect 0 0 19 0;
-#X connect 2 0 26 0;
-#X connect 3 0 27 0;
-#X connect 6 0 18 0;
-#X connect 8 0 29 0;
-#X connect 10 0 28 0;
-#X connect 12 0 13 0;
-#X connect 13 0 21 0;
+#X obj 310 182 draw rect 200 200 -100 -100;
+#X obj 380 305 draw circle 20 -50 0;
+#X obj 380 397 draw circle 20 -50 0;
+#X obj 384 476 draw circle 20 50 0;
+#X obj 311 94 draw path m -10 -10 l 20 0 0 -6 10 16 -10 16 0 -6 -20
+0 0 6 -10 -16 10 -16 z;
+#X connect 0 0 14 0;
+#X connect 2 0 21 0;
+#X connect 3 0 22 0;
+#X connect 4 0 13 0;
+#X connect 5 0 24 0;
+#X connect 6 0 23 0;
+#X connect 7 0 8 0;
+#X connect 8 0 16 0;
+#X connect 9 0 10 0;
+#X connect 9 1 11 1;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 12 0 26 0;
+#X connect 13 0 26 0;
 #X connect 14 0 15 0;
-#X connect 14 1 16 1;
-#X connect 15 0 16 0;
-#X connect 16 0 17 0;
-#X connect 17 0 7 0;
-#X connect 18 0 7 0;
-#X connect 19 0 20 0;
-#X connect 20 0 12 0;
-#X connect 21 0 14 0;
-#X connect 26 0 5 0;
-#X connect 27 0 4 0;
-#X connect 28 0 11 0;
-#X connect 29 0 9 0;
+#X connect 15 0 7 0;
+#X connect 16 0 9 0;
+#X connect 21 0 29 0;
+#X connect 22 0 25 0;
+#X connect 23 0 28 0;
+#X connect 24 0 27 0;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/simon-game.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/simon-game.pd
index e94599c09..0f5b85e3c 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/simon-game.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/simon-game.pd
@@ -1,16 +1,12 @@
 #N struct simon float x float y float nc float ec float sc float wc
 ;
-#N canvas -9 19 678 546 10;
+#N canvas 128 57 678 546 10;
 #X obj 341 212 r simon-click;
 #X obj 116 18 struct simon float x float y float nc float ec float
 sc float wc;
 #X scalar simon 53 128 0 0 0 0 \;;
 #N canvas 433 184 583 300 (subpatch) 0;
 #X obj 124 42 loadbang;
-#X obj 218 102 draw rect 50 0 100 50;
-#X obj 218 303 draw rect 0 50 50 100;
-#X obj 218 169 draw rect 150 50 50 100;
-#X obj 218 236 draw rect 50 150 100 50;
 #X obj 218 123 list prepend n;
 #X obj 218 190 list prepend e;
 #X obj 218 257 list prepend s;
@@ -26,27 +22,31 @@ sc float wc;
 #X msg 422 190 fill sc 20 170;
 #X msg 422 240 fill wc 20 170;
 #X obj 505 60 loadbang;
-#X connect 0 0 13 0;
-#X connect 1 0 5 0;
-#X connect 2 0 8 0;
+#X obj 218 102 draw rect 100 50 50 0;
+#X obj 218 169 draw rect 50 100 150 50;
+#X obj 218 236 draw rect 100 50 50 150;
+#X obj 218 303 draw rect 50 100 0 50;
+#X connect 0 0 9 0;
+#X connect 1 0 8 0;
+#X connect 2 0 5 0;
 #X connect 3 0 6 0;
 #X connect 4 0 7 0;
-#X connect 5 0 12 0;
-#X connect 6 0 9 0;
-#X connect 7 0 10 0;
-#X connect 8 0 11 0;
-#X connect 13 0 1 0;
-#X connect 13 0 3 0;
-#X connect 13 0 4 0;
-#X connect 13 0 2 0;
-#X connect 14 0 1 0;
-#X connect 15 0 3 0;
-#X connect 16 0 4 0;
-#X connect 17 0 2 0;
-#X connect 18 0 14 0;
-#X connect 18 0 17 0;
-#X connect 18 0 16 0;
-#X connect 18 0 15 0;
+#X connect 9 0 15 0;
+#X connect 9 0 16 0;
+#X connect 9 0 17 0;
+#X connect 9 0 18 0;
+#X connect 10 0 15 0;
+#X connect 11 0 16 0;
+#X connect 12 0 17 0;
+#X connect 13 0 18 0;
+#X connect 14 0 10 0;
+#X connect 14 0 13 0;
+#X connect 14 0 12 0;
+#X connect 14 0 11 0;
+#X connect 15 0 1 0;
+#X connect 16 0 2 0;
+#X connect 17 0 3 0;
+#X connect 18 0 4 0;
 #X restore 375 166 draw group;
 #X obj 341 233 t b a;
 #X obj 375 461 set simon nc;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/spin-spin-spin.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/spin-spin-spin.pd
index 0c9f1028d..23cfaa9d0 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/spin-spin-spin.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/spin-spin-spin.pd
@@ -1,20 +1,7 @@
 #N struct leaf float x float y;
-#N canvas 0 19 910 539 10;
-#N canvas 2 65 668 608 render 0;
-#X obj 92 557 draw rect 0 0 300 300;
+#N canvas 24 92 910 539 10;
+#N canvas 3 88 668 608 render 0;
 #X obj 53 47 struct leaf float x float y;
-#X obj 417 116 draw path M 145 75 L 145 25;
-#X obj 417 184 draw path M 180 84.3782 L 205 41.077;
-#X obj 417 309 draw path M 215 145 L 265 145;
-#X obj 417 374 draw path M 205.622 180 L 248.923 205;
-#X obj 417 438 draw path M 180 205.622 L 205 248.923;
-#X obj 417 508 draw path M 145 215 L 145 265;
-#X obj 417 574 draw path M 110 205.622 L 85 248.923;
-#X obj 417 638 draw path M 84.3782 180 L 41.077 205;
-#X obj 417 703 draw path M 75 145 L 25 145;
-#X obj 417 768 draw path M 84.3782 110 L 41.077 85;
-#X obj 417 829 draw path M 110 84.3782 L 85 41.077;
-#X obj 417 248 draw path M 205.622 110 L 248.923 85;
 #X obj 121 92 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
 1;
 #X obj 121 134 f;
@@ -60,58 +47,71 @@
 #X obj 61 417 bang;
 #X msg 92 520 fill #333333 \, stroke #333333 \, fill-opacity 0.6 \,
 stroke-opacity 0.6 \, rx 30 \, ry 30;
-#X connect 14 0 48 0;
-#X connect 15 0 16 0;
-#X connect 15 0 17 0;
-#X connect 16 0 15 1;
-#X connect 17 0 44 0;
-#X connect 18 0 12 0;
-#X connect 19 0 12 0;
-#X connect 20 0 11 0;
-#X connect 21 0 11 0;
-#X connect 22 0 23 0;
-#X connect 24 0 10 0;
-#X connect 25 0 10 0;
-#X connect 26 0 9 0;
-#X connect 27 0 9 0;
-#X connect 28 0 8 0;
-#X connect 29 0 8 0;
-#X connect 30 0 7 0;
-#X connect 31 0 7 0;
-#X connect 32 0 6 0;
-#X connect 33 0 6 0;
+#X obj 92 557 draw rect 300 300 0 0;
+#X obj 416 116 draw path M 145 75 L 145 25;
+#X obj 417 184 draw path M 180 84.3782 L 205 41.077;
+#X obj 417 248 draw path M 205.622 110 L 248.923 85;
+#X obj 417 309 draw path M 215 145 L 265 145;
+#X obj 417 374 draw path M 205.622 180 L 248.923 205;
+#X obj 417 438 draw path M 180 205.622 L 205 248.923;
+#X obj 417 508 draw path M 145 215 L 145 265;
+#X obj 417 574 draw path M 110 205.622 L 85 248.923;
+#X obj 417 638 draw path M 84.3782 180 L 41.077 205;
+#X obj 417 703 draw path M 75 145 L 25 145;
+#X obj 417 768 draw path M 84.3782 110 L 41.077 85;
+#X obj 417 829 draw path M 110 84.3782 L 85 41.077;
+#X connect 1 0 35 0;
+#X connect 2 0 3 0;
+#X connect 2 0 4 0;
+#X connect 3 0 2 1;
+#X connect 4 0 31 0;
+#X connect 5 0 52 0;
+#X connect 6 0 52 0;
+#X connect 7 0 51 0;
+#X connect 8 0 51 0;
+#X connect 9 0 10 0;
+#X connect 11 0 50 0;
+#X connect 12 0 50 0;
+#X connect 13 0 49 0;
+#X connect 14 0 49 0;
+#X connect 15 0 48 0;
+#X connect 16 0 48 0;
+#X connect 17 0 47 0;
+#X connect 18 0 47 0;
+#X connect 19 0 46 0;
+#X connect 20 0 46 0;
+#X connect 21 0 45 0;
+#X connect 22 0 45 0;
+#X connect 23 0 44 0;
+#X connect 24 0 44 0;
+#X connect 25 0 43 0;
+#X connect 26 0 43 0;
+#X connect 27 0 42 0;
+#X connect 28 0 42 0;
+#X connect 29 0 41 0;
+#X connect 30 0 41 0;
+#X connect 31 0 32 0;
+#X connect 32 0 33 0;
+#X connect 32 0 34 0;
+#X connect 33 0 25 0;
+#X connect 33 1 27 0;
+#X connect 33 2 29 0;
 #X connect 34 0 5 0;
-#X connect 35 0 5 0;
-#X connect 36 0 4 0;
-#X connect 37 0 4 0;
-#X connect 38 0 13 0;
-#X connect 39 0 13 0;
-#X connect 40 0 3 0;
-#X connect 41 0 3 0;
-#X connect 42 0 2 0;
-#X connect 43 0 2 0;
-#X connect 44 0 45 0;
-#X connect 45 0 46 0;
-#X connect 45 0 47 0;
-#X connect 46 0 38 0;
-#X connect 46 1 40 0;
-#X connect 46 2 42 0;
-#X connect 47 0 18 0;
-#X connect 47 1 20 0;
-#X connect 47 2 24 0;
-#X connect 47 3 26 0;
-#X connect 47 4 28 0;
-#X connect 47 5 30 0;
-#X connect 47 6 32 0;
-#X connect 47 7 34 0;
-#X connect 47 8 36 0;
-#X connect 48 0 15 0;
-#X connect 49 0 52 0;
-#X connect 49 0 22 0;
-#X connect 50 0 14 0;
-#X connect 50 0 51 0;
-#X connect 51 0 52 0;
-#X connect 52 0 0 0;
+#X connect 34 1 7 0;
+#X connect 34 2 11 0;
+#X connect 34 3 13 0;
+#X connect 34 4 15 0;
+#X connect 34 5 17 0;
+#X connect 34 6 19 0;
+#X connect 34 7 21 0;
+#X connect 34 8 23 0;
+#X connect 35 0 2 0;
+#X connect 36 0 39 0;
+#X connect 36 0 9 0;
+#X connect 37 0 1 0;
+#X connect 37 0 38 0;
+#X connect 38 0 39 0;
+#X connect 39 0 40 0;
 #X restore 14 4 pd render;
 #X scalar leaf 1000 1000 \;;
 #X obj 438 339 bng 56 250 50 0 empty empty empty 17 7 0 10 -262144
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/stroke-dasharray.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/stroke-dasharray.pd
index 5bc51cfa1..bfef7fc2e 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/stroke-dasharray.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/stroke-dasharray.pd
@@ -1,5 +1,5 @@
 #N struct blah float x float y;
-#N canvas 19 30 618 455 10;
+#N canvas 20 55 618 455 10;
 #X obj 79 13 struct blah float x float y;
 #X scalar blah 82 64 \;;
 #X text 82 107 Stroke-dasharray method. Try it:;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/unit-circle.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/unit-circle.pd
index 128066599..216f148cd 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/unit-circle.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/unit-circle.pd
@@ -1,5 +1,5 @@
 #N struct unit_circle float x float y;
-#N canvas 11 47 683 520 10;
+#N canvas 13 97 683 520 10;
 #X scalar unit_circle 103 387 \;;
 #X obj 310 166 * 6.28;
 #X obj 310 212 sin;
@@ -11,15 +11,7 @@
 #X obj 310 5 bng 21 250 50 0 empty empty Go! 28 10 0 10 -4034 -1 -1
 ;
 #X obj 52 101 loadbang;
-#N canvas 111 79 770 578 (subpatch) 0;
-#X obj 117 -58 draw path m -120 0 l 120 0 m 0 120 l 0 -240 0 20 150
-0 m -150 100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0
-m -150 100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0 m
--150 100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0 m -150
-100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0 m -150 100
-l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 20 0 m -20 100 l 20
-0 m -20 100 l 20 0;
-#X obj 117 -140 draw circle 0 0 100;
+#N canvas 237 72 770 578 (subpatch) 0;
 #X msg 117 -174 fill black \, fill-opacity 0.1 \, stroke blue \, stroke-opacity
 0.6 \, stroke-width 4;
 #X obj 117 -195 loadbang;
@@ -57,36 +49,44 @@ l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 20 0 m -20 100 l 20
 #X text 245 189 <- radius line;
 #X text 313 292 <- progress line;
 #X text 624 329 <- guide line;
-#X msg 117 -79 stroke-width 2 \, stroke gray \, stroke-opacity 0.6
-\, fill white;
 #X msg 525 110 stroke-width 3 \, stroke red \, fill none;
-#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X connect 4 0 36 0;
-#X connect 5 0 9 0;
-#X connect 6 0 5 0;
-#X connect 7 0 9 0;
-#X connect 8 0 9 0;
-#X connect 10 0 7 0;
-#X connect 11 0 8 0;
-#X connect 13 0 12 0;
-#X connect 14 0 12 0;
+#X obj 117 -58 draw path m -120 0 l 120 0 m 0 120 l 0 -240 0 20 150
+0 m -150 100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0
+m -150 100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0 m
+-150 100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0 m -150
+100 l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 150 0 m -150 100
+l 150 0 m -150 100 l 150 0 m 0 20 l 0 -240 0 20 20 0 m -20 100 l 20
+0 m -20 100 l 20 0;
+#X msg 117 -79 stroke-width 2 \, stroke gray \, stroke-opacity 0.6
+\, fill none;
+#X obj 117 -140 draw circle 100 0 0;
+#X connect 0 0 37 0;
+#X connect 1 0 0 0;
+#X connect 2 0 36 0;
+#X connect 3 0 7 0;
+#X connect 4 0 3 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 8 0 5 0;
+#X connect 9 0 6 0;
+#X connect 11 0 10 0;
+#X connect 12 0 10 0;
+#X connect 13 0 10 0;
+#X connect 14 0 11 0;
 #X connect 15 0 12 0;
 #X connect 16 0 13 0;
-#X connect 17 0 14 0;
-#X connect 18 0 15 0;
-#X connect 19 0 21 0;
+#X connect 17 0 19 0;
+#X connect 18 0 17 0;
 #X connect 20 0 19 0;
-#X connect 22 0 21 0;
+#X connect 21 0 20 0;
+#X connect 22 0 28 0;
 #X connect 23 0 22 0;
-#X connect 24 0 30 0;
-#X connect 25 0 24 0;
-#X connect 27 0 37 0;
-#X connect 28 0 29 0;
-#X connect 29 0 12 0;
-#X connect 30 0 26 0;
-#X connect 36 0 0 0;
-#X connect 37 0 26 0;
+#X connect 25 0 34 0;
+#X connect 26 0 27 0;
+#X connect 27 0 10 0;
+#X connect 28 0 24 0;
+#X connect 34 0 24 0;
+#X connect 36 0 35 0;
 #X restore 52 247 draw group;
 #X obj 92 5 struct unit_circle float x float y;
 #X obj 364 251 * 100;
diff --git a/pd/doc/4.data.structures/pd-l2ork/ds-demos/yin-yang.pd b/pd/doc/4.data.structures/pd-l2ork/ds-demos/yin-yang.pd
index 08170df99..5f0f33161 100644
--- a/pd/doc/4.data.structures/pd-l2ork/ds-demos/yin-yang.pd
+++ b/pd/doc/4.data.structures/pd-l2ork/ds-demos/yin-yang.pd
@@ -1,5 +1,5 @@
 #N struct yin-yang float x float y float yin float yang;
-#N canvas 383 44 660 636 10;
+#N canvas 18 50 660 636 10;
 #X obj 383 468 pointer;
 #X msg 406 439 next;
 #X obj 291 415 t a a;
@@ -11,11 +11,11 @@
 #X floatatom 347 290 5 0 0 0 - - -, f 5;
 #X obj 291 383 line;
 #X msg 256 455 0;
-#X obj 74 376 cos~;
-#X obj 89 458 osc~ 440;
-#X obj 74 407 *~ -0.5;
-#X obj 74 428 +~ 0.5;
-#X obj 74 489 *~;
+#X obj 54 376 cos~;
+#X obj 69 458 osc~ 440;
+#X obj 54 407 *~ -0.5;
+#X obj 54 428 +~ 0.5;
+#X obj 54 489 *~;
 #X obj 150 411 snapshot~;
 #X obj 150 294 tgl 15 0 empty empty empty 17 7 0 10 -4034 -1 -1 0 1
 ;
@@ -25,43 +25,43 @@
 #X obj 290 315 metro 2674;
 #X obj 150 433 t a a;
 #X obj 151 508 pack;
-#X obj 74 510 output~;
+#X obj 54 510 output~;
 #X obj 382 384 loadbang;
 #X obj 71 16 struct yin-yang float x float y float yin float yang;
 #X obj 291 503 set yin-yang yin yang;
-#X msg 89 313 dsp \$1;
-#X obj 89 334 s pd;
+#X msg 69 313 dsp \$1;
+#X obj 69 334 s pd;
 #X obj 194 508 loadbang;
 #X msg 194 529 0 0;
 #X obj 150 460 * 180;
-#X obj 74 353 phasor~ 0.3;
+#X obj 54 353 phasor~ 0.3;
 #N canvas 639 282 450 300 (subpatch) 0;
-#X obj 78 -41 draw circle 233 233 231;
-#X obj 78 33 draw path M 233 459 a 226 226 0 0 1 0 -452 a 113 113 0
-0 1 0 226 z;
-#X obj 78 116 draw circle 233 346 113;
-#X obj 368 114 draw circle 233 120 30;
-#X obj 318 -41 draw circle 233 346 30;
-#X msg 78 10 fill yang yang yang \, stroke yang yang yang;
-#X msg 78 94 fill yin yin yin \, stroke-opacity 0;
-#X msg 318 -64 fill yang yang yang \, stroke-opacity 0;
-#X msg 368 94 fill yin yin yin \, stroke-opacity 0;
-#X msg 78 -64 fill yin yin yin \, stroke-opacity 0;
-#X obj 78 -84 loadbang;
-#X obj 78 -14 loadbang;
-#X obj 318 -84 loadbang;
-#X obj 78 67 loadbang;
-#X obj 368 67 loadbang;
-#X connect 5 0 1 0;
-#X connect 6 0 2 0;
-#X connect 7 0 4 0;
-#X connect 8 0 3 0;
-#X connect 9 0 0 0;
-#X connect 10 0 9 0;
-#X connect 11 0 5 0;
-#X connect 12 0 7 0;
-#X connect 13 0 6 0;
-#X connect 14 0 8 0;
+#X msg 78 100 fill yang yang yang \, stroke yang yang yang;
+#X msg 78 184 fill yin yin yin \, stroke-opacity 0;
+#X msg 318 26 fill yang yang yang \, stroke-opacity 0;
+#X msg 368 184 fill yin yin yin \, stroke-opacity 0;
+#X msg 78 26 fill yin yin yin \, stroke-opacity 0;
+#X obj 78 6 loadbang;
+#X obj 78 76 loadbang;
+#X obj 318 6 loadbang;
+#X obj 78 157 loadbang;
+#X obj 368 157 loadbang;
+#X obj 78 49 draw circle 231 233 233;
+#X obj 78 123 draw path M 233 459 a 226 226 0 0 1 0 -452 a 113 113
+0 0 1 0 226 z;
+#X obj 78 206 draw circle 113 233 346;
+#X obj 368 204 draw circle 30 233 120;
+#X obj 318 49 draw circle 30 233 346;
+#X connect 0 0 11 0;
+#X connect 1 0 12 0;
+#X connect 2 0 14 0;
+#X connect 3 0 13 0;
+#X connect 4 0 10 0;
+#X connect 5 0 4 0;
+#X connect 6 0 0 0;
+#X connect 7 0 2 0;
+#X connect 8 0 1 0;
+#X connect 9 0 3 0;
 #X restore 151 581 draw group;
 #X scalar yin-yang 114 127 188.603 66.3972 \;;
 #X scalar yin-yang 315 136 0 255 \;;
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 a7c83566a..a66c444a3 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 0 19 565 491 10;
+#N canvas 230 130 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
@@ -130,7 +130,6 @@
 #X connect 54 0 34 0;
 #X restore 339 86 pd welcome-animation;
 #N canvas 457 133 772 478 welcome-struct 0;
-#X obj 311 66 draw rect -40 -50 200 90;
 #X obj 189 -26 struct foo float x float y;
 #X obj 189 4 loadbang;
 #N canvas 433 184 450 300 welcome-text 0;
@@ -631,14 +630,15 @@ c -0.21485 -0.05859 -0.41016 -0.9375 -0.41016 -1.21094;
 #X connect 7 0 0 0;
 #X connect 8 0 7 0;
 #X restore 37 157 draw group exclamation-point;
-#X restore 189 66 draw group welcome-text;
+#X restore 189 76 draw group welcome-text;
 #X msg 189 37 fill black;
-#X msg 311 35 stroke-dasharray 10 4 \, stroke-width 4 \, stroke gray
+#X msg 341 35 stroke-dasharray 10 4 \, stroke-width 4 \, stroke gray
 \, fill none;
-#X connect 2 0 5 0;
-#X connect 2 0 4 0;
-#X connect 4 0 3 0;
-#X connect 5 0 0 0;
+#X obj 341 76 draw rect 200 90 -40 -50;
+#X connect 1 0 4 0;
+#X connect 1 0 3 0;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
 #X restore 339 39 pd welcome-struct;
 #X text 0 1 New Drawing Commands: Intro;
 #X text 0 1 ___________________________;
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 a361dee1f..d80e133e1 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,8 +1,8 @@
-#N canvas 0 19 495 603 10;
+#N struct drawtut-one float x float y;
+#N canvas 87 38 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;
-#X obj 53 219 draw rect 0 0 40 40;
 #X text 53 67 The first argument "drawtut-one" is a name we will associated
 with our shape.;
 #X text 53 98 The other arguments define data to associate with this
@@ -15,11 +15,6 @@ should hold a floating point number.;
 the name of an svg shape-- "rect" here. Any arguments after that are
 coordinates and other data telling Pd how to draw the shape. For convenience
 \, coordinates are relative to the x/y fields.;
-#X text 53 298 Any [draw] object on the same canvas as our [struct]
-will be used to draw a shape to represent the data structure we've
-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 53 369 So how do we draw something? We just type the name we
 gave to the [struct] into an object box. This will create an object
 \, referred to in Pd as a "scalar". It will have data for "x" and "y"
@@ -38,3 +33,10 @@ in the main patch \, but since there's only one [struct] per canvas
 you typically will want to keep your [struct] and any [draw] objects
 in their own subpatch.;
 #X obj 56 463;
+#X obj 53 219 draw rect 40 40 0 0;
+#X text 53 298 Any [draw] object on the same canvas as our [struct]
+will be used to draw a shape to represent the data structure we've
+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);
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 7663357e5..bc0e6198e 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,12 +1,10 @@
 #N struct drawtut-rect float x float y;
-#N canvas 0 19 515 614 10;
+#N canvas 15 32 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;
 #X text 53 63 Let's start with another [struct]:;
-#X obj 53 239 draw rect 0 0 100 40;
 #X scalar drawtut-rect 56 369 \;;
-#X obj 193 239 draw rect 120 0 40 100;
 #X text 53 115 As stated in the previous tutorial \, all [draw] objects
 have the same interface. The first word (called the selector) is always
 "draw". The first argument is the name of the svg shape to draw. Finally
@@ -17,15 +15,6 @@ move it \, cut/paste it \, and undo/redo any actions you take.;
 #X text 53 23 So what can we draw with [draw]? All shapes from the
 svg specification. These are "rect" \, "polygon" \, "polyline" \, "ellipse"
 \, "circle" \, "line" \, and "path".;
-#X text 53 179 In the case of "rect" \, there are only four coordinates.
-The first two are the x/y coordinates of the top-left corner of the
-rectangle. The third and fourth arguments are the width and height
-of the rectangle. That's it!;
-#X text 53 265 You can use positive and negative numbers for the first
-two arguments \, but only positive numbers for the width and height.
-Coordinates and dimensions can be integers or floats. (One exception
-are "flag" values in path arcs but these will just be converted automatically
-to integers.);
 #X text 53 505 Also note that you can define a [struct] without any
 "x" or "y" fields. This is because data structures may be used for
 purposes other than visualizing data. But if you do draw objects with
@@ -34,3 +23,14 @@ to move it with the mouse in "edit mode".;
 #X text 53 336 Below is a scalar defined by the [struct] above. As
 you can tell it's just two rectangles. Pretty boring stuff so far...
 ;
+#X obj 53 239 draw rect 100 40 0 0;
+#X obj 193 239 draw rect 40 100 120 0;
+#X text 53 265 You can use positive and negative numbers for the first
+two arguments \, but only positive numbers for the width and height.
+Coordinates and dimensions can be integers or floats. (One exception
+are "flag" values in path arcs but these will just be converted automatically
+to integers.);
+#X text 53 179 In the case of "rect" \, there are only four coordinates.
+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!;
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 798000e37..ebd06fbf5 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 0 19 517 678 10;
+#N canvas 13 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
@@ -12,7 +12,6 @@ object.;
 #X text 53 123 Svg is a complex specification \, and not all of its
 object attributes are supported in Pd. But the basic ones are.;
 #X obj 53 207 struct drawtut-attr float x float y;
-#X obj 53 313 draw rect 0 0 50 50;
 #X scalar drawtut-attr 55 339 \;;
 #X text 53 153 For example \, below is a [struct] definition \, [draw]
 object and a scalar created from them. Let's send a message to make
@@ -40,7 +39,8 @@ using a [loadbang] message. Notice that attributes will be the same
 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 connect 9 0 6 0;
-#X connect 16 0 17 0;
-#X connect 17 0 6 0;
-#X connect 19 0 6 0;
+#X obj 53 313 draw rect 50 50 0 0;
+#X connect 8 0 19 0;
+#X connect 15 0 16 0;
+#X connect 16 0 19 0;
+#X connect 18 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 7258142dc..68ff53844 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,6 +1,5 @@
 #N struct drawtut-attr-cont float x float y;
-#N canvas 0 19 638 678 10;
-#X obj 93 583 draw rect 0 0 50 50;
+#N canvas 194 25 638 671 10;
 #X msg 93 112 fill red;
 #X text 0 1 New Drawing Commands: attributes (continued);
 #X text 0 1 ____________________________________________;
@@ -51,22 +50,23 @@ the appearance of a shape:;
 #X text 25 348 (scalar);
 #X obj 93 85 loadbang;
 #X obj 161 533 * 0.5;
-#X connect 1 0 0 0;
-#X connect 9 0 0 0;
+#X obj 93 583 draw rect 50 50 0 0;
+#X connect 0 0 42 0;
+#X connect 8 0 42 0;
+#X connect 10 0 12 0;
 #X connect 11 0 13 0;
-#X connect 12 0 14 0;
-#X connect 13 0 0 0;
-#X connect 14 0 0 0;
-#X connect 19 0 0 0;
-#X connect 25 0 0 0;
-#X connect 26 0 0 0;
-#X connect 27 0 0 0;
-#X connect 29 0 0 0;
+#X connect 12 0 42 0;
+#X connect 13 0 42 0;
+#X connect 18 0 42 0;
+#X connect 24 0 42 0;
+#X connect 25 0 42 0;
+#X connect 26 0 42 0;
+#X connect 28 0 42 0;
+#X connect 29 0 41 0;
 #X connect 30 0 42 0;
-#X connect 31 0 0 0;
-#X connect 34 0 0 0;
-#X connect 35 0 0 0;
-#X connect 36 0 0 0;
-#X connect 37 0 9 0;
-#X connect 41 0 1 0;
-#X connect 42 0 31 0;
+#X connect 33 0 42 0;
+#X connect 34 0 42 0;
+#X connect 35 0 42 0;
+#X connect 36 0 8 0;
+#X connect 40 0 0 0;
+#X connect 41 0 30 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 b606c61a1..d17880cc5 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,6 +1,5 @@
 #N struct drawtut-attr-saving float x float y;
-#N canvas 0 19 638 551 10;
-#X obj 53 153 draw rect 0 0 50 50;
+#N canvas 194 100 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 +21,6 @@ svg attributes \, which will let use change the visual appearance of
 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 connect 4 0 7 0;
-#X connect 7 0 0 0;
+#X obj 53 153 draw rect 50 50 0 0;
+#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 b7db749d1..dd6f11a3f 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 0 19 638 634 10;
+#N canvas 31 34 638 634 10;
 #X obj 53 84 loadbang;
 #X text 0 1 New Drawing Commands: line;
 #X text 0 1 __________________________;
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 61d1ade6a..443055d57 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 0 19 638 554 10;
+#N canvas 13 29 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"
@@ -13,15 +13,15 @@ have any effect.;
 #X msg 53 117 fill yellow;
 #X msg 228 117 stroke-width \$1;
 #X floatatom 228 93 5 0 0 0 - - -, f 5;
-#X obj 53 153 draw circle 0 0 80;
-#X text 52 374 The [draw] object above creates a circle with its center
-at (0 \, 0) \, with a radius of 80 pixels.;
 #X text 51 414 Keep in mind that the coordinates for a circle specify
 its center \, not the top left corner of the shape's bounding box.
 But it's easy to that if you want to-- just offset the coordinates
 by value you use for the radius. (That would be [draw circle 80 80
 80] for the above example.);
-#X connect 0 0 11 0;
-#X connect 8 0 11 0;
-#X connect 9 0 11 0;
+#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).;
+#X connect 0 0 12 0;
+#X connect 8 0 12 0;
+#X connect 9 0 12 0;
 #X connect 10 0 9 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 65c0619be..0eee80aef 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,24 +1,24 @@
 #N struct drawtut-ellipse float x float y;
-#N canvas 0 19 509 498 10;
+#N canvas 1 25 509 498 10;
 #X msg 141 117 stroke blue;
 #X msg 54 117 fill yellow;
 #X msg 228 117 stroke-width \$1;
 #X floatatom 228 93 5 0 0 0 - - -, f 5;
-#X obj 53 153 draw ellipse 0 0 86 42;
 #X text 259 246 <- an ellipse;
 #X text 0 1 New Drawing Commands: ellipse;
 #X text 0 1 _____________________________;
 #X text 53 23 An ellipse.;
 #X obj 53 57 struct drawtut-ellipse float x float y;
 #X scalar drawtut-ellipse 155 253 \;;
-#X text 52 334 The [draw] object above creates an ellipse with its
-center at (0 \, 0) \, with an x-radius of 86 and a y-radius of 42;
 #X text 52 384 Like a circle \, the coordinate (0 \, 0) specifies the
 center of the shape \, but you can easily figure out the top-left corner
 of its bounding-box by offsetting its coordinates by the x and y radius
 values \, respectively. (So the one above would be [draw ellipse 86
 42 86 42].);
-#X connect 0 0 4 0;
-#X connect 1 0 4 0;
-#X connect 2 0 4 0;
+#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).;
+#X connect 0 0 11 0;
+#X connect 1 0 11 0;
+#X connect 2 0 11 0;
 #X connect 3 0 2 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 e67338920..4673df2a1 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,14 +1,11 @@
 #N struct drawtut-transform float x float y;
-#N canvas 0 19 867 589 10;
+#N canvas 79 81 867 589 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 obj 57 388 draw rect 0 0 100 40;
 #X floatatom 57 187 5 0 0 0 x/y - -, f 5;
-#X msg 57 279 transform translate \$1 \$2 rotate \$3 scale \$4 skewx
-\$5 skewy \$6;
 #X scalar drawtut-transform 197 449 \;;
 #X floatatom 97 187 5 0 0 0 - - -, f 5;
 #X obj 97 208 t b a;
@@ -50,29 +47,32 @@ message if you want multiple transformations.;
 #X text 470 168 <- 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 connect 5 0 27 0;
-#X connect 6 0 4 0;
+#X msg 57 279 transform translate \$1 \$2 rotate \$3 scale \$4 skewx
+\$5 skewy \$6;
+#X obj 57 388 draw rect 100 40 0 0;
+#X connect 4 0 25 0;
+#X connect 6 0 7 0;
+#X connect 7 0 4 0;
+#X connect 7 1 25 1;
 #X connect 8 0 9 0;
-#X connect 9 0 5 0;
-#X connect 9 1 27 1;
-#X connect 10 0 11 0;
+#X connect 9 0 6 0;
+#X connect 9 1 25 2;
+#X connect 10 0 28 0;
 #X connect 11 0 8 0;
-#X connect 11 1 27 2;
-#X connect 12 0 30 0;
+#X connect 11 1 25 3;
+#X connect 12 0 29 0;
 #X connect 13 0 10 0;
-#X connect 13 1 27 3;
-#X connect 14 0 31 0;
+#X connect 13 1 25 4;
+#X connect 14 0 30 0;
 #X connect 15 0 12 0;
-#X connect 15 1 27 4;
-#X connect 16 0 32 0;
-#X connect 17 0 14 0;
-#X connect 17 1 27 5;
-#X connect 18 0 19 0;
-#X connect 19 0 4 0;
-#X connect 22 0 4 0;
-#X connect 26 0 29 0;
-#X connect 27 0 6 0;
-#X connect 29 0 12 0;
-#X connect 30 0 13 0;
-#X connect 31 0 15 0;
-#X connect 32 0 17 0;
+#X connect 15 1 25 5;
+#X connect 16 0 17 0;
+#X connect 17 0 33 0;
+#X connect 20 0 33 0;
+#X connect 24 0 27 0;
+#X connect 25 0 32 0;
+#X connect 27 0 10 0;
+#X connect 28 0 11 0;
+#X connect 29 0 13 0;
+#X connect 30 0 15 0;
+#X connect 32 0 33 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 22b79cfe2..db2ee1d1e 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 44 648 468 10;
+#N canvas 1 26 648 468 10;
 #X scalar drawtut-group 54 159 \;;
 #X text 1 1 ___________________________;
 #X text 0 1 New Drawing Commands: group;
@@ -12,9 +12,7 @@ of individually.;
 #X msg 434 213 transform scale \$1;
 #X obj 434 101 loadbang;
 #X msg 434 122 100;
-#N canvas 638 82 450 300 (subpatch) 0;
-#X obj 35 72 draw rect 0 0 40 40;
-#X obj 35 175 draw circle 100 20 20 20;
+#N canvas 573 107 450 300 (subpatch) 0;
 #X obj 35 253 draw path M 160 0 l 40 40 M 160 40 l 40 -40;
 #X obj 35 26 loadbang;
 #X msg 35 47 fill blue;
@@ -22,14 +20,16 @@ of individually.;
 #X obj 35 101 loadbang;
 #X msg 49 148 fill white;
 #X msg 35 122 stroke darkgreen \, stroke-width 10 \, fill "";
+#X obj 35 72 draw rect 40 40 0 0;
+#X obj 35 175 draw circle 20 100 20;
 #X msg 35 231 stroke-width 10 \, stroke black;
-#X connect 3 0 4 0;
-#X connect 4 0 0 0;
-#X connect 5 0 9 0;
+#X connect 1 0 2 0;
+#X connect 2 0 7 0;
+#X connect 3 0 9 0;
+#X connect 4 0 6 0;
+#X connect 5 0 8 0;
 #X connect 6 0 8 0;
-#X connect 7 0 1 0;
-#X connect 8 0 1 0;
-#X connect 9 0 2 0;
+#X connect 9 0 0 0;
 #X restore 434 236 draw group;
 #X text 53 343 Like [pd] subpatches \, you can use [inlet] and [outlet].
 The "main" inlet for the group-- the one that sets attributes-- is
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 e13722bce..cc38a8a23 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 230 46 591 620 10;
+#N canvas 231 71 591 620 10;
 #X scalar drawtut-events 54 255 \;;
 #X text 1 1 __________________________________;
 #X text 0 1 New Drawing Commands: mouse events;
@@ -25,20 +25,20 @@ of the shape.;
 #X text 53 505 mousemove - mouse moves inside a shape;
 #X text 53 425 mousedown - mouse button is pressed;
 #X text 53 445 mouseup - mousebutton is released;
-#X obj 53 173 draw rect 0 0 60 60;
-#X obj 303 185 draw circle 300 30 25;
 #X msg 303 140 stroke-width 20 \, stroke black \, fill none;
 #X text 53 43 When the user mouses over or clicks a shape a message
 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;
 #X connect 3 0 10 0;
-#X connect 7 0 23 0;
-#X connect 8 0 24 0;
+#X connect 7 0 24 0;
+#X connect 8 0 22 0;
 #X connect 9 0 5 0;
-#X connect 10 0 22 0;
-#X connect 11 0 22 0;
-#X connect 11 0 23 0;
+#X connect 10 0 25 0;
+#X connect 11 0 24 0;
+#X connect 11 0 25 0;
 #X connect 12 0 11 0;
 #X connect 13 0 14 0;
-#X connect 22 0 9 0;
-#X connect 23 0 13 0;
-#X connect 24 0 23 0;
+#X connect 22 0 24 0;
+#X connect 24 0 13 0;
+#X connect 25 0 9 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 116cc5873..ab2941cfb 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,7 +1,6 @@
 #N struct drawtut-animation float x float y;
-#N canvas 1 44 537 571 10;
+#N canvas 2 69 537 571 10;
 #X scalar drawtut-animation 47 309 \;;
-#X obj 47 279 draw rect 0 0 40 40;
 #X obj 47 131 struct drawtut-animation float x float y;
 #X text 0 1 New Drawing Commands: animation;
 #X text 1 1 _______________________________;
@@ -34,23 +33,24 @@ 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 0 1
+#X obj 177 158 tgl 23 0 empty empty empty 17 7 0 10 -4034 -1 -1 1 1
 ;
 #X msg 177 210 \$1 500;
 #X obj 177 188 * 255;
 #X msg 177 250 transform matrix 1 0 0 1 \$1 0;
 #X obj 177 230 line 0 16.7;
 #X text 255 229 <- 2nd argument sets the "grain" rate;
-#X connect 7 0 18 0;
-#X connect 8 0 14 0;
+#X obj 47 279 draw rect 40 40 0 0;
+#X connect 6 0 17 0;
+#X connect 7 0 13 0;
+#X connect 9 0 10 0;
 #X connect 10 0 11 0;
 #X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 14 0 17 0;
-#X connect 17 0 1 0;
-#X connect 18 0 8 0;
-#X connect 19 0 21 0;
-#X connect 20 0 23 0;
-#X connect 21 0 20 0;
-#X connect 22 0 1 0;
-#X connect 23 0 22 0;
+#X connect 13 0 16 0;
+#X connect 16 0 24 0;
+#X connect 17 0 7 0;
+#X connect 18 0 20 0;
+#X connect 19 0 22 0;
+#X connect 20 0 19 0;
+#X connect 21 0 24 0;
+#X connect 22 0 21 0;
diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index 578b3e725..190c12be1 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -5,7 +5,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <math.h>  /* for matrix transforms */
+#include <math.h>  /* for path bbox calculations */
 
 #include "m_pd.h"
 #include "s_stuff.h"    /* for sys_hostfontsize */
@@ -1261,10 +1261,6 @@ void *svg_new(t_pd *parent, t_symbol *s, int argc, t_atom *argv)
         type == gensym("ellipse") ||
         type == gensym("line"))
     {
-        if (argc) svg_attr_setfloatarg(&x->x_x, argc--, argv++);
-        else svg_attr_setfloat_const(&x->x_x, 0);
-        if (argc) svg_attr_setfloatarg(&x->x_y, argc--, argv++);
-        else svg_attr_setfloat_const(&x->x_x, 0);
         if (type == gensym("rect"))
         {
             if (argc) svg_attr_setfloatarg(&x->x_width, argc--, argv++);
@@ -1272,7 +1268,22 @@ void *svg_new(t_pd *parent, t_symbol *s, int argc, t_atom *argv)
             if (argc) svg_attr_setfloatarg(&x->x_height, argc--, argv++);
             else svg_attr_setfloat_const(&x->x_height, 0);
         }
-        else
+        else if (type != gensym("line"))
+        {
+            if (argc) svg_attr_setfloatarg(&x->x_rx, argc--, argv++);
+            else svg_attr_setfloat_const(&x->x_rx, 0);
+            if (type != gensym("circle"))
+            {
+                if (argc) svg_attr_setfloatarg(&x->x_ry, argc--, argv++);
+                else svg_attr_setfloat_const(&x->x_ry, 0);
+            }
+        }
+        if (argc) svg_attr_setfloatarg(&x->x_x, argc--, argv++);
+        else svg_attr_setfloat_const(&x->x_x, 0);
+        if (argc) svg_attr_setfloatarg(&x->x_y, argc--, argv++);
+        else svg_attr_setfloat_const(&x->x_x, 0);
+        /* Just reuse rx and ry for x2 and y2 of "line" */
+        if (type == gensym("line"))
         {
             if (argc) svg_attr_setfloatarg(&x->x_rx, argc--, argv++);
             else svg_attr_setfloat_const(&x->x_rx, 0);
-- 
GitLab