Skip to content
Snippets Groups Projects
Commit cd5333c9 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add coords tutorial for ds shapes

parent 82e3c588
No related branches found
No related tags found
No related merge requests found
#N struct drawtut-coords float x float y;
#N canvas 1 25 537 571 10;
#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 text 0 1 New Drawing Commands: coordinate data;
#X text 1 1 _____________________________________;
#X obj 51 30 struct drawtut-coords float x float y;
#X obj 135 321 draw polyline;
#X scalar drawtut-coords 85 159 \;;
#X obj 135 113 tgl 15 0 empty empty Auto 17 7 0 10 -262144 -1 -1 0
1;
#X obj 135 133 metro 400;
#X obj 135 155 tgl 15 0 empty empty Click_me 17 7 0 10 -262144 -1 -1
0 1;
#X obj 135 182 * 30;
#X obj 135 204 + 30;
#X msg 135 231 points 0 0 30 0 30 \$1 0 \$1;
#X obj 158 256 loadbang;
#X msg 158 278 stroke black \, stroke-width 1 \, fill none \, points
0 0 30 0 30 30 0 30;
#X obj 46 431 draw path m -60 20 20 0 0 20 -20 0 z m 30 0 10 0 0 10
-10 0 z;
#X msg 46 406 d m -60 20 20 0 0 20 -20 0 z m \$1 0 10 0 0 10 -10 0
z;
#X text 184 189 Polygons and polylines take the "points" message to
set their coordinate data.;
#X text 94 371 For paths \, use the "d" message to send new path data.
;
#X text 49 64 You can dynamically set the coordinate data for polygons
\, polylines \, and paths.;
#X connect 6 0 7 0;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 10 0 15 0;
#X connect 11 0 4 0;
#X connect 12 0 13 0;
#X connect 13 0 4 0;
#X connect 15 0 14 0;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment