On 8/31/26 21:08, Oliver via Pd-list wrote:


It's clearly visible in [text3d]'s helppatch, where, if you drag the first numberbox on the rotateXYZ object, you can see that the rotation axis is not centered.

Can somebody help or explain ?

the "problem" is, that the justification ("center", "middle") uses the *font* properties rather than the actual text you are rendering. this is entirely intentional: in general you wouldn't want your text to jump, just because the text changed from "m" to "q" (characters starting to grow downwards) or "O" or even "Ö" (characters growing upwards).

the solution is of course simple to adjust to pivot point (the text around which to rotate) of your text to be in the middle of the vertical center of the bounding box.

to adjust the pivot point, use a [translate] *after* the [rotate] object.
see attached modification of your patch.

mfda
IOhannes
#N canvas 561 133 692 458 10;
#X declare -lib Gem;
#X obj 405 19 cnv 15 100 60 empty empty empty 20 12 0 14 #bcbcbc #404040 0;
#N canvas 0 22 450 300 gemwin 0;
#X obj 132 136 gemwin;
#X obj 67 89 outlet;
#X obj 67 10 inlet;
#X obj 67 41 route create;
#X msg 67 70 set destroy;
#X msg 142 68 set create;
#X msg 198 112 destroy;
#X msg 132 112 create \, 1;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 3 0 7 0;
#X connect 3 1 5 0;
#X connect 3 1 6 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 6 0 0 0;
#X connect 7 0 0 0;
#X restore 410 58 pd gemwin;
#X msg 410 39 create;
#X text 406 18 Create window:;
#X obj 50 18 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 50 98 rotateXYZ;
#X floatatom 64 74 5 0 0 0 - - - 0;
#X obj 50 201 ortho;
#X obj 50 43 gemhead 50;
#X obj 406 137 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 406 162 gemhead 60;
#X obj 406 211 rectangle 4 0.01;
#X obj 416 186 rectangle 0.01 4;
#X obj 50 175 translateXYZ;
#X obj 243 78 vsl 25 50 0 1 0 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 243 136 * 180;
#X text 276 80 vertical flipping is not centered, f 12;
#X text 126 13 changing translateXYZ to center the text doesn't help, f 15;
#X obj 50 226 text3d 33333;
#X text 432 137 cross;
#X obj 23 381 _textbbox \; width 2;
#X obj 119 389 hradio 18 1 0 4 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0;
#X obj 119 412 - 1;
#X obj 23 354 color 1 0 0;
#X obj 531 19 declare -lib Gem;
#X obj 119 341 loadbang;
#X msg 119 364 1;
#X obj 245 287 route bbox;
#X obj 245 310 unpack 0 0 0 0 0 0;
#X obj 266 332 +;
#X obj 266 354 / -2;
#X obj 416 267 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 416 292 gemhead 60;
#X obj 416 341 rectangle 4 0.01;
#X obj 426 316 rectangle 0.01 4;
#X text 442 267 cross;
#X obj 23 287 gemhead;
#X obj 23 310 translateXYZ;
#X obj 23 333 ortho;
#X obj 266 410 s offY;
#X obj 96 149 r offY;
#X obj 78 282 r offY;
#X obj 119 246 t a a;
#X floatatom 266 377 5 0 0 0 - - - 0;
#X connect 1 0 2 0;
#X connect 2 0 1 0;
#X connect 4 0 8 0;
#X connect 5 0 13 0;
#X connect 6 0 5 1;
#X connect 7 0 18 0;
#X connect 8 0 5 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 10 0 12 0;
#X connect 13 0 7 0;
#X connect 14 0 15 0;
#X connect 15 0 6 0;
#X connect 18 1 42 0;
#X connect 21 0 22 0;
#X connect 22 0 20 2;
#X connect 23 0 20 0;
#X connect 25 0 26 0;
#X connect 26 0 21 0;
#X connect 27 0 28 0;
#X connect 28 1 29 0;
#X connect 28 4 29 1;
#X connect 29 0 30 0;
#X connect 30 0 43 0;
#X connect 31 0 32 0;
#X connect 32 0 33 0;
#X connect 32 0 34 0;
#X connect 36 0 37 0;
#X connect 37 0 38 0;
#X connect 38 0 23 0;
#X connect 40 0 13 2;
#X connect 41 0 37 2;
#X connect 42 0 20 1;
#X connect 42 1 27 0;
#X connect 43 0 39 0;

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

---
[email protected] - the Pure Data mailinglist
https://lists.iem.at/hyperkitty/list/[email protected]/message/XTYBWMM66PZE5DQRHHH2PHCMCMPMBXEN/

To unsubscribe send an email to [email protected] mailing list
UNSUBSCRIBE and account-management -> https://lists.iem.at/

Reply via email to