Edje_Edit: add forgotten API for map.zoom.x/y

This commit is contained in:
Vitalii Vorobiov 2017-01-17 16:30:45 +02:00
parent ba4370f8df
commit bbdfe393e4
2 changed files with 53 additions and 0 deletions

View File

@ -5732,6 +5732,36 @@ EAPI Eina_Bool edje_edit_state_map_perspective_zplane_set(Evas_Object *obj, cons
**/
EAPI const char * edje_edit_state_map_rotation_center_get(Evas_Object *obj, const char *part, const char *state, double value);
/** Set map.zoom (x and y) values of given part state.
*
* @param obj Object being edited.
* @param part The name of the part.
* @param state The name of the state (not including the state value).
* @param value The state value.
* @param x value of x
* @param y value of y
*
* @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
* @since 1.19
**/
EAPI Eina_Bool
edje_edit_state_map_zoom_set(Evas_Object *obj, const char *part, const char *state, double value, double x, double y);
/** Get map.zoom (x and y) values of given part state.
*
* @param obj Object being edited.
* @param part The name of the part.
* @param state The name of the state (not including the state value).
* @param value The state value.
* @param x variable to store value of x
* @param y variable to store value of y
*
* @return @c EINA_TRUE in case of success, @c EINA_FALSE otherwise.
* @since 1.19
**/
EAPI Eina_Bool
edje_edit_state_map_zoom_get(Evas_Object *obj, const char *part, const char *state, double value, double *x, double *y);
/** This sets the part that is used as the center of rotation when rotating the part with this description. If no center is given, the parts original center itself is used for the rotation center.
*
* @param obj Object being edited.

View File

@ -7856,6 +7856,29 @@ edje_edit_state_map_rotation_get(Evas_Object *obj, const char *part, const char
return EINA_TRUE;
}
EAPI Eina_Bool
edje_edit_state_map_zoom_set(Evas_Object *obj, const char *part, const char *state, double value, double x, double y)
{
GET_PD_OR_RETURN(EINA_FALSE);
pd->map.zoom.x = FROM_DOUBLE(x);
pd->map.zoom.y = FROM_DOUBLE(y);
edje_object_calc_force(obj);
return EINA_TRUE;
}
EAPI Eina_Bool
edje_edit_state_map_zoom_get(Evas_Object *obj, const char *part, const char *state, double value, double *x, double *y)
{
GET_PD_OR_RETURN(EINA_FALSE);
if (x) *x = TO_DOUBLE(pd->map.zoom.x);
if (y) *y = TO_DOUBLE(pd->map.zoom.y);
return EINA_TRUE;
}
EAPI Eina_Bool
edje_edit_state_map_perspective_zplane_set(Evas_Object *obj, const char *part, const char *state, double value, int zplane)
{