elementary/transit - added elm_transit_smooth_set(), elm_transit_smooth_get()

This commit is contained in:
ChunEon Park 2013-02-28 17:21:07 +09:00
parent b651a6efac
commit 79fd0192d9
4 changed files with 58 additions and 1 deletions

View File

@ -1071,3 +1071,7 @@
* Add the option about sending signals in content_pos_set.
When the scroller is resized, the signals("elm,action,scroll", "elm,edge,top" so on) shouldn't be sent,
because it's not a scroll-action. So in this case, the content_pos_set should be called without the signals.
2013-02-28 ChunEon Park (Hermet)
* Add elm_transit_smooth_set(), elm_transit_smooth_get()

View File

@ -42,6 +42,7 @@ Additions:
* Support widget orientation mode in order to widgets have multiple styles for each window degree.
* Add elm_drop_target_add() elm_drop_target_del() and elm_drag_start()
* Add the option about sending signals in content_pos_set.
* Add elm_transit_smooth_set(), elm_transit_smooth_get()
Improvements:

View File

@ -59,6 +59,7 @@ struct _Elm_Transit
Eina_Bool deleted : 1;
Eina_Bool state_keep : 1;
Eina_Bool finished : 1;
Eina_Bool smooth : 1;
};
struct _Elm_Transit_Effect_Module
@ -472,6 +473,7 @@ elm_transit_add(void)
transit->v1 = 1.0;
transit->v2 = 0.0;
transit->smooth = EINA_TRUE;
return transit;
}
@ -579,6 +581,20 @@ elm_transit_objects_get(const Elm_Transit *transit)
return transit->objs;
}
EAPI void
elm_transit_smooth_set(Elm_Transit *transit, Eina_Bool smooth)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit);
transit->smooth = !!smooth;
}
EAPI Eina_Bool
elm_transit_smooth_get(const Elm_Transit *transit)
{
ELM_TRANSIT_CHECK_OR_RETURN(transit, EINA_FALSE);
return transit->smooth;
}
EAPI void
elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled)
{
@ -1069,6 +1085,7 @@ _transit_effect_zoom_op(Elm_Transit_Effect *effect, Elm_Transit *transit , doubl
_recover_image_uv(obj, map, EINA_FALSE, EINA_FALSE);
evas_map_util_3d_perspective(map, x + (w / 2), y + (h / 2), 0,
_TRANSIT_FOCAL);
if (!transit->smooth) evas_map_smooth_set(map, EINA_FALSE);
evas_object_map_set(obj, map);
evas_object_map_enable_set(obj, EINA_TRUE);
}
@ -1225,6 +1242,7 @@ _transit_effect_flip_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double
evas_map_util_3d_perspective(map, x + half_w, y + half_h, 0, _TRANSIT_FOCAL);
evas_object_map_enable_set(front, EINA_TRUE);
evas_object_map_enable_set(back, EINA_TRUE);
if (!transit->smooth) evas_map_smooth_set(map, EINA_FALSE);
evas_object_map_set(obj, map);
}
evas_map_free(map);
@ -1531,6 +1549,7 @@ _transit_effect_resizable_flip_op(Elm_Transit_Effect *effect, Elm_Transit *trans
_TRANSIT_FOCAL);
evas_object_map_enable_set(resizable_flip_node->front, EINA_TRUE);
evas_object_map_enable_set(resizable_flip_node->back, EINA_TRUE);
if (!transit->smooth) evas_map_smooth_set(map, EINA_FALSE);
evas_object_map_set(obj, map);
}
evas_map_free(map);
@ -1753,7 +1772,7 @@ _transit_effect_wipe_op(Elm_Transit_Effect *effect, Elm_Transit *transit, double
_elm_fx_wipe_show(map, wipe->dir, _x, _y, _w, _h, (float)progress);
else
_elm_fx_wipe_hide(map, wipe->dir, _x, _y, _w, _h, (float)progress);
if (!transit->smooth) evas_map_smooth_set(map, EINA_FALSE);
evas_object_map_enable_set(obj, EINA_TRUE);
evas_object_map_set(obj, map);
}
@ -2273,6 +2292,7 @@ _transit_effect_rotation_op(Elm_Transit_Effect *effect, Elm_Transit *transit, do
half_h = (float)h * 0.5;
evas_map_util_rotate(map, degree, x + half_w, y + half_h);
if (!transit->smooth) evas_map_smooth_set(map, EINA_FALSE);
evas_object_map_enable_set(obj, EINA_TRUE);
evas_object_map_set(obj, map);
}

View File

@ -630,6 +630,38 @@ EAPI void elm_transit_chain_transit_del(Elm_Transit *transit,
*/
EAPI Eina_List *elm_transit_chain_transits_get(const Elm_Transit *transit);
/**
* Set the smooth effect for a transit.
*
* @param obj The transit object
* @param enabled enable or disable smooth map rendering
*
* This sets smoothing for transit map rendering. If the object added in a
* transit is a type that has its own smoothing settings, then both the smooth
* settings for this object and the map must be turned off. By default smooth
* maps are enabled.
*
* @see evas_map_smooth_set()
* @since 1.8
*
* @ingroup Transit
*/
EAPI void elm_transit_smooth_set(Elm_Transit *transit, Eina_Bool smooth);
/**
* Get the smooth scaling for transit map rendering
*
* This gets smooth scaling for transit map rendering.
*
* @param obj The transit object
* @return @c EINA_TRUE if the smooth is enabled, @c EINA_FALSE otherwise.
*
* @see elm_transit_smooth_set()
* @since 1.8
*
*/
Eina_Bool elm_transit_smooth_get(const Elm_Transit *transit);
/**
* Add the Resizing Effect to Elm_Transit.
*