Hi,
I am arithmetically challenged, but I shall soldier-on. I want to work with Actors and Groups with the default 'anchor' being in the center.

For example, I have a 64x64 Actor (C) and a 128x128 Group (P) and another 512x512 group (P2), so:
P2
 \_P
   \_C
I want the middle of C to be in the middle of P and the middle of P to be in the middle of P2.

Is there some way to magically matrix the works so that a normal P.add(C) will also jiggle the positions and anchors etc. to make this happen? I'd like (0,0) to be in the 'middle' and negative goes left/down, positive right/up. Also, future animation (alphas and co.) should 'just work' based on same.

I am aiming towards a small animation tool and I don't want to have to keep working out offsets for centering.

Matrixes (matrices?) are bewilderingly new to me. I have mucked with them in PyCairo before (see my Things! project linked in sig) but all I am left with is the confusing memory of the wooshing sounds made flying overhead. :) I do recall that I could arrange a central function that would apply a matrix to the entire context so that everything was drawn properly. Perhaps there's something similar in Clutter.

\d
---
https://savannah.nongnu.org/projects/things/

--
To unsubscribe send a mail to [email protected]

Reply via email to