* elm_image_orient_set() is used to flip the image around the (1, 0) (0, 1)
* diagonal.
*
- * elm_image_aspect_ratio_retained_set() is used to keep the original aspect
+ * elm_image_aspect_fixed_set() is used to keep the original aspect
* ratio of the image, even when the window is resized to another aspect ratio.
*
* elm_image_fill_outside_set() is used to ensure that the image will fill the
elm_image_scale_set(image, EINA_FALSE, EINA_TRUE);
elm_image_smooth_set(image, EINA_FALSE);
elm_image_orient_set(image, ELM_IMAGE_FLIP_HORIZONTAL);
- elm_image_aspect_ratio_retained_set(image, EINA_TRUE);
+ elm_image_aspect_fixed_set(image, EINA_TRUE);
elm_image_fill_outside_set(image, EINA_TRUE);
elm_image_editable_set(image, EINA_TRUE);
}
EAPI void
-elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained)
+elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- return _els_smart_icon_aspect_ratio_retained_set(wd->img, retained);
+ return _els_smart_icon_aspect_fixed_set(wd->img, fixed);
}
EAPI Eina_Bool
-elm_image_aspect_ratio_retained_get(const Evas_Object *obj)
+elm_image_aspect_fixed_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- return _els_smart_icon_aspect_ratio_retained_get(wd->img);
+ return _els_smart_icon_aspect_fixed_get(wd->img);
}
/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-3f0^-2{2(0W1st0 :*/
* and the image will fill the entire object (@p fill_outside is @c EINA_TRUE).
*
* @note This option will have no effect if
- * elm_image_aspect_ratio_retained_set() is set to @c EINA_FALSE.
+ * elm_image_aspect_fixed_set() is set to @c EINA_FALSE.
*
* @see elm_image_fill_outside_get()
- * @see elm_image_aspect_ratio_retained_set()
+ * @see elm_image_aspect_fixed_set()
*
* @ingroup Image
*/
* Set whether the original aspect ratio of the image should be kept on resize.
*
* @param obj The image object.
- * @param retained @c EINA_TRUE if the image should retain the aspect,
+ * @param fixed @c EINA_TRUE if the image should retain the aspect,
* @c EINA_FALSE otherwise.
*
* The original aspect ratio (width / height) of the image is usually
* this original aspect, and the way that the image is fit into the object's
* area depends on the option set by elm_image_fill_outside_set().
*
- * @see elm_image_aspect_ratio_retained_get()
+ * @see elm_image_aspect_fixed_get()
* @see elm_image_fill_outside_set()
*
* @ingroup Image
*/
-EAPI void elm_image_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained);
+EAPI void elm_image_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
/**
* Get if the object retains the original aspect ratio.
*
* @ingroup Image
*/
-EAPI Eina_Bool elm_image_aspect_ratio_retained_get(const Evas_Object *obj);
+EAPI Eina_Bool elm_image_aspect_fixed_get(const Evas_Object *obj);
/**
* @}
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- return _els_smart_icon_aspect_ratio_retained_set(wd->img, fixed);
+ return _els_smart_icon_aspect_fixed_set(wd->img, fixed);
}
EAPI Eina_Bool
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- return _els_smart_icon_aspect_ratio_retained_get(wd->img);
+ return _els_smart_icon_aspect_fixed_get(wd->img);
}
Eina_Bool show : 1;
Eina_Bool edit : 1;
Eina_Bool edje : 1;
- Eina_Bool aspect_ratio_retained: 1;
+ Eina_Bool aspect_fixed: 1;
Elm_Image_Orient orient;
};
}
void
-_els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained)
+_els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed)
{
Smart_Data *sd;
sd = evas_object_smart_data_get(obj);
if (!sd) return;
- retained = !!retained;
- if (sd->aspect_ratio_retained == retained) return;
- sd->aspect_ratio_retained = retained;
+ fixed = !!fixed;
+ if (sd->aspect_fixed == fixed) return;
+ sd->aspect_fixed = fixed;
_smart_reconfigure(sd);
}
Eina_Bool
-_els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj)
+_els_smart_icon_aspect_fixed_get(const Evas_Object *obj)
{
Smart_Data *sd;
sd = evas_object_smart_data_get(obj);
if (!sd) return EINA_FALSE;
- return sd->aspect_ratio_retained;
+ return sd->aspect_fixed;
}
/* local subsystem globals */
if (iw < 1) iw = 1;
if (ih < 1) ih = 1;
- if (sd->aspect_ratio_retained)
+ if (sd->aspect_fixed)
{
h = ((double)ih * w) / (double)iw;
if (sd->fill_inside)
sd->fill_inside = EINA_TRUE;
sd->scale_up = EINA_TRUE;
sd->scale_down = EINA_TRUE;
- sd->aspect_ratio_retained = EINA_TRUE;
+ sd->aspect_fixed = EINA_TRUE;
sd->size = 64;
sd->scale = 1.0;
evas_object_smart_member_add(sd->obj, obj);
void _els_smart_icon_edit_set(Evas_Object *obj, Eina_Bool, Evas_Object *parent);
Eina_Bool _els_smart_icon_edit_get(const Evas_Object *obj);
Evas_Object *_els_smart_icon_edje_get(Evas_Object *obj);
-void _els_smart_icon_aspect_ratio_retained_set(Evas_Object *obj, Eina_Bool retained);
-Eina_Bool _els_smart_icon_aspect_ratio_retained_get(const Evas_Object *obj);
+void _els_smart_icon_aspect_fixed_set(Evas_Object *obj, Eina_Bool fixed);
+Eina_Bool _els_smart_icon_aspect_fixed_get(const Evas_Object *obj);
void _els_smart_icon_preload_set(Evas_Object *obj, Eina_Bool disable);