Hi,

Bob Dickinson wrote:
> I've run into a problem, either with get_abs_position, or with my
> understanding of it.
> 
> I have been using get_abs_position in order to do coordinate
> transformations to position actors relative to each other.  I have a
> lot of little spacing problems, which I have tracked down to
> get_abs_position returning values with a higher granularity than
> get_position (on the order of 3-4 pixels when the stage is full
> screen).
> 
> Is get_abs_position broken, or am I using it incorrectly?  The docs
> say "Gets the absolute position of an actor, in pixels, relative to
> the stage", which does not seem to be the case.

The error is inherent to the nature of the problem, and the function
cannot be expected to be pixel perfect, so that any code that uses it
needs to allow for the inherent error. In any case, you should not need
it to position actors, since actors are always placed relative to their
parent, not the stage. If you need to coordinate the actor positions
relative to some other ancestor than the immediate parent, then as you
mentioned you need to walk the ancestor hierarchy and do the adding up.

Tomas

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to