On Mon, Aug 18, 2008 at 8:19 PM, Havoc Pennington <[EMAIL PROTECTED]> wrote:
> The anchor feature of Clutter is just the "translate" part of an
> affine transform, except it's backward (negative numbers are needed to
> translate toward the bottom right).

The anchor point is the point of the actor you position when you set
it's position. Using normalized coordinates for the anchor point makes
for instance 0.5, 0.5 indicate the center of the image. This is the
recommended manner of animating an actor along a path where the path
is in the center of the actor (this also makes scales operate around
the center of the path).

This is the geometric reasoning behind the current numbers; and the
naming. Adding the ability to set the anchor point as normalized
numbers would in my opinion aid use of the code, maybe it could be
extended to do so by enhancing the units framework.

> The transform made up of the
> anchor, the scale, and the rotation is entirely a matter of how actors
> are painted, so animating these properties will not result in
> relayout.

This depends on the implementation of the container. It is sometimes
desirable to implement containers taking into consideration the anchor
points as well as the scale and rotation of the children.

> Anyway, if "anchor" were called "translate" it would be a
> lot more intuitive imo.

This doesn't add up with the geometric description of the concept used
above, a concept that is also possible to
visualize on the actor. Perhaps "offset" could work as an alternate naming.

/Øyvind K.
-- 
«The future is already here. It's just not very evenly distributed»
 -- William Gibson
http://pippin.gimp.org/ http://ffii.org/
--
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to