}
}
}
- if (!sd->scale_up)
+ if (!sd->resize_up)
{
if (w > iw) w = iw;
if (h > ih) h = ih;
}
- if (!sd->scale_down)
+ if (!sd->resize_down)
{
if (w < iw) w = iw;
if (h < ih) h = ih;
else
evas_object_image_size_get(sd->img, &tw, &th);
- if ((sd->scale_up) || (sd->scale_down))
+ if ((sd->resize_up) || (sd->resize_down))
evas_object_geometry_get(sd->img, NULL, NULL, &cw, &ch);
tw = tw > cw ? tw : cw;
}
static void
-_elm_image_smart_scale_up_set(Evas_Object *obj,
- Eina_Bool scale_up)
+_elm_image_smart_resize_up_set(Evas_Object *obj,
+ Eina_Bool resize_up)
{
ELM_IMAGE_DATA_GET(obj, sd);
- scale_up = !!scale_up;
+ resize_up = !!resize_up;
- if (sd->scale_up == scale_up) return;
+ if (sd->resize_up == resize_up) return;
- sd->scale_up = scale_up;
+ sd->resize_up = resize_up;
_elm_image_internal_sizing_eval(sd);
}
static Eina_Bool
-_elm_image_smart_scale_up_get(const Evas_Object *obj)
+_elm_image_smart_resize_up_get(const Evas_Object *obj)
{
ELM_IMAGE_DATA_GET(obj, sd);
- return sd->scale_up;
+ return sd->resize_up;
}
static void
-_elm_image_smart_scale_down_set(Evas_Object *obj,
- Eina_Bool scale_down)
+_elm_image_smart_resize_down_set(Evas_Object *obj,
+ Eina_Bool resize_down)
{
ELM_IMAGE_DATA_GET(obj, sd);
- scale_down = !!scale_down;
+ resize_down = !!resize_down;
- if (sd->scale_down == scale_down) return;
+ if (sd->resize_down == resize_down) return;
- sd->scale_down = scale_down;
+ sd->resize_down = resize_down;
_elm_image_internal_sizing_eval(sd);
}
static Eina_Bool
-_elm_image_smart_scale_down_get(const Evas_Object *obj)
+_elm_image_smart_resize_down_get(const Evas_Object *obj)
{
ELM_IMAGE_DATA_GET(obj, sd);
- return sd->scale_up;
+ return sd->resize_up;
}
static void
priv->smooth = EINA_TRUE;
priv->fill_inside = EINA_TRUE;
- priv->scale_up = EINA_TRUE;
- priv->scale_down = EINA_TRUE;
+ priv->resize_up = EINA_TRUE;
+ priv->resize_down = EINA_TRUE;
priv->aspect_fixed = EINA_TRUE;
priv->load_size = 64;
{
maxw = minw = w;
maxh = minh = h;
- if ((sd->scale > 1.0) && (sd->scale_up))
+ if ((sd->scale > 1.0) && (sd->resize_up))
{
maxw = minw = w * sd->scale;
maxh = minh = h * sd->scale;
}
- else if ((sd->scale < 1.0) && (sd->scale_down))
+ else if ((sd->scale < 1.0) && (sd->resize_down))
{
maxw = minw = w * sd->scale;
maxh = minh = h * sd->scale;
}
else
{
- if (!sd->scale_down)
+ if (!sd->resize_down)
{
minw = w * sd->scale;
minh = h * sd->scale;
}
- if (!sd->scale_up)
+ if (!sd->resize_up)
{
maxw = w * sd->scale;
maxh = h * sd->scale;
sc->orient_get = _elm_image_smart_orient_get;
sc->orient_set = _elm_image_smart_orient_set;
sc->preload_set = _elm_image_smart_preload_set;
- sc->scale_down_get = _elm_image_smart_scale_down_get;
- sc->scale_down_set = _elm_image_smart_scale_down_set;
+ sc->resize_down_get = _elm_image_smart_resize_down_get;
+ sc->resize_down_set = _elm_image_smart_resize_down_set;
sc->scale_get = _elm_image_smart_scale_get;
sc->scale_set = _elm_image_smart_scale_set;
- sc->scale_up_get = _elm_image_smart_scale_up_get;
- sc->scale_up_set = _elm_image_smart_scale_up_set;
+ sc->resize_up_get = _elm_image_smart_resize_up_get;
+ sc->resize_up_set = _elm_image_smart_resize_up_set;
sc->size_get = _elm_image_smart_size_get;
sc->sizing_eval = _elm_image_smart_sizing_eval;
sc->smooth_scale_get = _elm_image_smart_smooth_scale_get;
ELM_IMAGE_CHECK(obj);
ELM_IMAGE_DATA_GET(obj, sd);
- sd->scale_up = !!up;
- sd->scale_down = !!down;
+ sd->resize_up = !!up;
+ sd->resize_down = !!down;
ELM_IMAGE_CLASS(ELM_WIDGET_DATA(sd)->api)->sizing_eval(obj);
}
ELM_IMAGE_CHECK(obj);
ELM_IMAGE_DATA_GET(obj, sd);
- if (size_up) *size_up = sd->scale_up;
- if (size_down) *size_down = sd->scale_down;
+ if (size_up) *size_up = sd->resize_up;
+ if (size_down) *size_down = sd->resize_down;
}
EAPI void
void (*smooth_scale_set)(Evas_Object *obj,
Eina_Bool smooth); /* 'Virtual' function on setting whether the object's image should be scaled smoothly or not. */
Eina_Bool (*smooth_scale_get)(const Evas_Object *obj); /* 'Virtual' function on retrieving whether the object's image is to scaled smoothly or not. */
- void (*scale_up_set)(Evas_Object *obj,
- Eina_Bool scale_up); /* 'Virtual' function on setting whether the object's image can be resized to a size greater than the original one. */
- Eina_Bool (*scale_up_get)(const Evas_Object *obj); /* 'Virtual' function on retrieving whether the object's image can be resized to a size greater than the original one. */
- void (*scale_down_set)(Evas_Object *obj,
- Eina_Bool scale_down); /* 'Virtual' function on setting whether the object's image can be resized to a size smaller than the original one. */
- Eina_Bool (*scale_down_get)(const Evas_Object *obj); /* 'Virtual' function on retrieving whether the object's image can be resized to a size smaller than the original one. */
+ void (*resize_up_set)(Evas_Object *obj,
+ Eina_Bool resize_up); /* 'Virtual' function on setting whether the object's image can be resized to a size greater than the original one. */
+ Eina_Bool (*resize_up_get)(const Evas_Object *obj); /* 'Virtual' function on retrieving whether the object's image can be resized to a size greater than the original one. */
+ void (*resize_down_set)(Evas_Object *obj,
+ Eina_Bool resize_down); /* 'Virtual' function on setting whether the object's image can be resized to a size smaller than the original one. */
+ Eina_Bool (*resize_down_get)(const Evas_Object *obj); /* 'Virtual' function on retrieving whether the object's image can be resized to a size smaller than the original one. */
void (*load_size_set)(Evas_Object *obj,
int size); /* 'Virtual' function on setting the object's image loading size (in pixels, applied to both axis). */
int (*load_size_get)(const Evas_Object *obj); /* 'Virtual' function on retrieving the object's image loading size. */
Eina_Bool aspect_fixed : 1;
Eina_Bool fill_inside : 1;
- Eina_Bool scale_down : 1;
+ Eina_Bool resize_down : 1;
Eina_Bool preloading : 1;
- Eina_Bool scale_up : 1;
+ Eina_Bool resize_up : 1;
Eina_Bool no_scale : 1;
Eina_Bool smooth : 1;
Eina_Bool show : 1;