forked from enlightenment/efl
evas vector: cancel the transformation when null is passed.
This commit is contained in:
parent
afd2c1c0be
commit
e08b942ffd
|
@ -7,6 +7,9 @@ abstract Efl.VG.Base (Eo.Base, Efl.Gfx.Base, Efl.Gfx.Stack)
|
|||
set {
|
||||
/*@
|
||||
Sets the transformation matrix to be used for this node object.
|
||||
|
||||
@note Pass @c NULL to cancel the applied transformation.
|
||||
|
||||
@since 1.14
|
||||
*/
|
||||
}
|
||||
|
@ -90,4 +93,4 @@ abstract Efl.VG.Base (Eo.Base, Efl.Gfx.Base, Efl.Gfx.Stack)
|
|||
Efl.Gfx.Stack.lower;
|
||||
@virtual .bounds_get;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,12 +28,20 @@ _efl_vg_base_transformation_set(Eo *obj,
|
|||
Efl_VG_Base_Data *pd,
|
||||
const Eina_Matrix3 *m)
|
||||
{
|
||||
if (!pd->m)
|
||||
if (m)
|
||||
{
|
||||
pd->m = malloc(sizeof (Eina_Matrix3));
|
||||
if (!pd->m) return ;
|
||||
if (!pd->m)
|
||||
{
|
||||
pd->m = malloc(sizeof (Eina_Matrix3));
|
||||
if (!pd->m) return;
|
||||
}
|
||||
memcpy(pd->m, m, sizeof (Eina_Matrix3));
|
||||
}
|
||||
else
|
||||
{
|
||||
free(pd->m);
|
||||
pd->m = NULL;
|
||||
}
|
||||
memcpy(pd->m, m, sizeof (Eina_Matrix3));
|
||||
|
||||
_efl_vg_base_changed(obj);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue