hi everyone; in Clutter 0.4, the internals of Clutter core were mostly converted to a device independent unit, ClutterUnit. this unit gave us sub-pixel precision and the ability to abstract the core API from the pixel unit[1]. actors implementations, though, were able to use the units only when setting their bounding box, and only through the clutter_actor_query_coords() and clutter_actor_request_coords(), and had to translate back and forth between units and pixels.
in trunk, most of the ClutterActor API has now a units-based functions as well as pixel based ones. for instance: pixel based - units based ------------------------------------------------------------ clutter_actor_set_size() - clutter_actor_set_sizeu() clutter_actor_set_position() - clutter_actor_set_positionu() clutter_actor_set_clip() - clutter_actor_set_clipu() as for the fixed point variants of the API, with the -x suffix, the units-based variants are distinguished from the pixels-based ones by the -u suffix. it is now possible for actors to work in a high-precision domain using units, using a friendly API at the same time. using the provided conversion macros it is also possible to set sizes and positions with different device units, like millimeters and points, or in percentage of the stage/parent actor. the units usage is still static: an actor will not keep the bounding box to 25% of its parent when the parent scales, for instance; chances are that most of the time the developer will have to control the scaling to respect aspect ratios or actors layouts. using notification on properties changes, though, its possible to implement a dynamical units-based reallocation in a few lines of code. ciao, Emmanuele. +++ [1] while the GL abstraction layer returned to pixels when actually drawing. -- Emmanuele Bassi, OpenedHand Ltd. Unit R, Homesdale Business Centre 216-218 Homesdale Rd., Bromley - BR12QZ http://www.o-hand.com -- To unsubscribe send a mail to [EMAIL PROTECTED]
