/usr/lib/pd/extra/iemguts/canvasposition-help.pd is in pd-iemguts 0.2.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | #N canvas 1388 107 635 592 10;
#X text 47 547 (c) 2008 IOhannes m zmoelnig;
#X text 55 471 you can specify the depth of the parent-patch via a
optional argument:;
#X text 178 504 will work on the grandparent (parent-depth:2) of this
patch;
#X text 207 25 get/set the position of the containing patch within
it's parent;
#X text 39 88 this object allows you to retrieve the position of an
abstraction/subpatch within it's containing canvas;
#X msg 98 124 bang;
#X obj 98 172 unpack;
#X floatatom 137 194 5 0 0 0 - - -;
#X floatatom 98 194 5 0 0 0 - - -;
#X text 178 145 <--- you can move this object and click "bang" again
;
#X msg 88 253 bang;
#X obj 88 292 unpack;
#X floatatom 127 314 5 0 0 0 - - -;
#X floatatom 88 314 5 0 0 0 - - -;
#X text 168 269 <--- you can move this object and click "bang" again
;
#X text 39 218 you can also query the size of the containing canvas
via the 2nd outlet;
#N canvas 0 0 450 300 getsize 0;
#X obj 75 48 inlet;
#X obj 75 189 outlet;
#X obj 75 129 canvasposition;
#X connect 0 0 2 0;
#X connect 2 1 1 0;
#X restore 88 272 pd getsize;
#N canvas 0 0 450 300 getpos 0;
#X obj 75 48 inlet;
#X obj 75 189 outlet;
#X obj 75 129 canvasposition;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 98 148 pd getpos;
#X text 69 333 note: there is a bug in Pd that might require you to
save a patch \, before the "size" will actually change;
#N canvas 0 0 450 300 setpos 0;
#X obj 75 48 inlet;
#X obj 75 129 canvasposition;
#X connect 0 0 1 0;
#X restore 100 440 pd setpos;
#X obj 103 398 hsl 128 15 100 400 0 0 empty empty empty -2 -8 0 10
-262144 -1 -1 0 1;
#X obj 52 505 canvasposition 2;
#X text 46 368 finally you can move an object around (without any hackish
mouse emulation);
#X msg 100 418 \$1 440;
#X obj 81 25 canvasposition;
#X connect 5 0 17 0;
#X connect 6 0 8 0;
#X connect 6 1 7 0;
#X connect 10 0 16 0;
#X connect 11 0 13 0;
#X connect 11 1 12 0;
#X connect 16 0 11 0;
#X connect 17 0 6 0;
#X connect 20 0 23 0;
#X connect 23 0 19 0;
|