forked from enlightenment/efl
evas: implements efl_vg_bound_get in all Efl.VG object.
This commit is contained in:
parent
c1836b97ed
commit
600e69d226
|
@ -110,6 +110,13 @@ _efl_vg_gradient_linear_eo_base_destructor(Eo *obj, Efl_VG_Gradient_Linear_Data
|
|||
static Eina_Bool
|
||||
_efl_vg_gradient_linear_efl_vg_base_bound_get(Eo *obj, Efl_VG_Gradient_Linear_Data *pd, Eina_Rectangle *r)
|
||||
{
|
||||
Efl_VG_Base_Data *nd;
|
||||
|
||||
nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
|
||||
EINA_RECTANGLE_SET(r,
|
||||
nd->x + pd->start.x, nd->y + pd->start.y,
|
||||
pd->end.x - pd->start.x, pd->end.y - pd->start.x);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -127,6 +127,14 @@ _efl_vg_gradient_radial_eo_base_destructor(Eo *obj,
|
|||
static Eina_Bool
|
||||
_efl_vg_gradient_radial_efl_vg_base_bound_get(Eo *obj, Efl_VG_Gradient_Radial_Data *pd, Eina_Rectangle *r)
|
||||
{
|
||||
Efl_VG_Base_Data *nd;
|
||||
|
||||
nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
|
||||
EINA_RECTANGLE_SET(r,
|
||||
nd->x + pd->center.x - pd->radius,
|
||||
nd->y + pd->center.y - pd->radius,
|
||||
pd->radius * 2, pd->radius * 2);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -30,10 +30,12 @@ struct _Efl_VG_Shape_Data
|
|||
|
||||
static Eina_Bool
|
||||
_efl_vg_shape_efl_vg_base_bound_get(Eo *obj,
|
||||
Efl_VG_Shape_Data *pd,
|
||||
Efl_VG_Shape_Data *pd EINA_UNUSED,
|
||||
Eina_Rectangle *r)
|
||||
{
|
||||
return EINA_FALSE;
|
||||
// FIXME: Use the renderer bounding box when it has been created instead of an estimation
|
||||
eo_do(obj, efl_gfx_shape_bounding_box_get(r));
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue