I understood that it was possible to position actors with subpixel
precision. I have a texture that I want to move by 0.1f along the x and
y axis every 30ms. I'm sure the best way to do this would be using a
timeline, but as a test implementation, I just did:
gboolean slide(gpointer data)
{
ClutterActor *tex = data;
ClutterUnit x, y;
clutter_actor_get_positionu(tex, &x, &y);
clutter_actor_set_positionu(tex,
CLUTTER_UNITS_FROM_FLOAT(CLUTTER_UNITS_TO_FLOAT(x) + 0.1),
CLUTTER_UNITS_FROM_FLOAT(CLUTTER_UNITS_TO_FLOAT(y) + 0.1));
printf("Pos: %f, %f\n", CLUTTER_UNITS_TO_FLOAT(x),
CLUTTER_UNITS_TO_FLOAT(y));
}
[...]
g_timeout_add(30, slide, tex);
What actually happens is that although the position outputted is
incrementing by 0.1, the actor itself only actually moves by full
pixels.
Am I missing something?
Thanks,
Jason.
--
To unsubscribe send a mail to [EMAIL PROTECTED]