diff --git a/doc/reference/ChangeLog b/doc/reference/ChangeLog index 30f9505ca..d8dfd1251 100644 --- a/doc/reference/ChangeLog +++ b/doc/reference/ChangeLog @@ -1,3 +1,8 @@ +2008-06-23 Emmanuele Bassi + + * clutter/subclassing-ClutterActor.sgml: Remove mention of the + get_paint_area() function and virtual function. + 2008-06-23 Øyvind Kolås * clutter/subclassing-ClutterActor.sgml: added missing call to diff --git a/doc/reference/clutter/subclassing-ClutterActor.sgml b/doc/reference/clutter/subclassing-ClutterActor.sgml index ecae6d322..50634fbaa 100644 --- a/doc/reference/clutter/subclassing-ClutterActor.sgml +++ b/doc/reference/clutter/subclassing-ClutterActor.sgml @@ -320,90 +320,8 @@ foo_actor_allocate (ClutterActor *actor, - An actor should always paint inside its allocation. It is, - however, possible to paint outside the negotiated size by overriding - the ClutterActor::get_paint_area() virtual - function and setting the passed #ClutterActorBox with their - untransformed paint area. This allows writing - actors that can effectively paint on an area different in size and - position from the allocation area. - - The ClutterActor::get_paint_area() method of - a #ClutterActor is internally invoked when clutter_actor_get_paint_area() - is called on an instance of that actor class. The get_paint_area() - virtual function must return the untransformed area used by the - actor to paint itself; clutter_actor_get_paint_area() will then - proceed to transform the area coordinates into the frame of reference - of the actor's parent (taking into account anchor point, scaling - and rotation). - - The default paint area is the allocation area of the - actor. - - - Implementation of get_paint_area() - In this example, FooActor implements - the get_paint_area() virtual function to return an area equivalent - to those of its children plus a border which is not taken into - account by the size negotiation process. - -static void -foo_actor_get_paint_area (ClutterActor *actor, - ClutterActorBox *box) -{ - FooActor *foo_actor = FOO_ACTOR (actor); - - if (!foo_actor->children) - { - /* if we don't have any children we return the - * allocation given to us - */ - clutter_actor_get_allocation_box (actor, box); - } - else - { - ClutterActorBox all_box = { 0, }; - GList *l; - - /* our paint area is the union of the children - * paint areas, plus a border - */ - for (l = foo_actor->children; l != NULL; l = l>next) - { - ClutterActor *child = l->data; - ClutterActorBox child_box = { 0, }; - - clutter_actor_get_paint_area (child, &child_box); - - if (l == foo_actor->children) - all_box = child_box; - else - { - if (child_box.x1 < all_box.x1) - all_box.x1 = child_box.x1; - - if (child_box.y1 < all_box.y1) - all_box.y1 = child_box.y1; - - if (child_box.x2 < all_box.x2) - all_box.x2 = child_box.x2; - - if (child_box.y2 < all_box.y2) - all_box.y2 = child_box.y2; - } - } - - /* apply the border width around the box */ - all_box.x1 -= (foo_actor->border_width / 2); - all_box.y1 -= (foo_actor->border_width / 2); - all_box.x2 += (foo_actor->border_width / 2); - all_box.y2 += (foo_actor->border_width / 2); - - *box = all_box; - } -} - - + The allocation is also the "paint area", that is the area where + the paint operations should be performed. @@ -512,10 +430,6 @@ foo_actor_paint (ClutterActor *actor) - A container imposing a layout on its children may - opt to use the paint area as returned by clutter_actor_get_paint_area() - instead of the allocation. - If the actor has a non-rectangular shape, or it has internal children that need to be distinguished by the events delivery mechanism, the ClutterActor::pick() method should also be @@ -527,7 +441,7 @@ foo_actor_paint (ClutterActor *actor) In this example, FooActor overrides the pick() virtual function default implementation to paint itself with a shaped silhouette, to allow events only on the actual shape of the actor - instead of the paint area. + instead of the whole paint area. static void foo_actor_pick (ClutterActor *actor,