actor: Allow querying the paint volume

An actor has an implicit "paint volume", that is the volume in 3D space
occupied when painting itself.

The paint volume is defined as a cuboid with the origin placed at the
top-left corner of the actor; the size of the cuboid is given by three
vectors: width, height and depth.

ClutterActor provides API to convert the paint volume into a 2D box in
screen coordinates, to compute the on-screen area that an actor will
occupy when painted.

Actors can override the default implementation of the get_paint_volume()
virtual function to provide a different volume.
This commit is contained in:
Emmanuele Bassi
2010-08-16 15:53:28 +01:00
committed by Robert Bragg
parent 27aebb5c9d
commit 94ce747f83
4 changed files with 305 additions and 5 deletions

View File

@ -409,6 +409,10 @@ gpointer _clutter_event_get_platform_data (const ClutterEvent *event);
#endif
ClutterPaintVolume *_clutter_paint_volume_new (ClutterActor *actor);
void _clutter_paint_volume_get_box (ClutterPaintVolume *pv,
ClutterActorBox *box);
G_END_DECLS
#endif /* _HAVE_CLUTTER_PRIVATE_H */