Peter Csaszar wrote:
> Hi,
> 
> I have found myself in a problem I have no idea how to solve. Could
> someone please help me on this?
> 
> The next code :
> 
> g_debug("Received event coordinates: %d,%d", event->x, event->y);
> x = y = 0;
> if(!clutter_actor_transform_stage_point(CLUTTER_ACTOR(self), event->x,
> event->y, &x, &y)) return FALSE;
> g_debug("Transformed event coordinates: %d,%d", x, y);

The function expects input, and returns values in ClutterUnits, not
pixels. The event coords are in pixels, so you need to convert them
first with CLUTTER_UNITS_FROM_DEVICE, and then also convert the result
to pixels with CLUTTER_UNITS_TO_DEVICE for the human-readable output.

> It is absolutely sure I am pointing to a right place. It might have some
> meaning that the actor s rotated and it's depth is incremented by some
> value.

Yes, if the actor is rotated or at non-0 depth, that will certainly
effect the result, which is in the coordinate space of the actor (self).

Tomas

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

Reply via email to