clutter-actor: Initialize with the identity matrix in get_transform

The documentation and name of the get_transformation_matrix function
implies that 'matrix' is purely an out parameter. However it wasn't
initializing the matrix before calling the 'apply_transform' virtual
so it was basically just a wrapper for the virtual. The virtual
assumes the matrix parameter is in/out and applies the actor's
transformation on top of any existing transformations. This causes
unexpected semantics that are inconsistent with the documentation.
This commit is contained in:
Neil Roberts 2010-03-02 18:30:31 +00:00
parent e550755f3d
commit 048fcea988

View File

@ -9802,6 +9802,8 @@ clutter_actor_get_transformation_matrix (ClutterActor *self,
{
g_return_if_fail (CLUTTER_IS_ACTOR (self));
cogl_matrix_init_identity (matrix);
CLUTTER_ACTOR_GET_CLASS (self)->apply_transform (self, matrix);
}