This api will be removed.
elm_image_fill_outside_get is same as !elm_image_fill_inside_get.
elm_image_fill_outside_set function is too.
}
EOLIAN static void
-_elm_image_fill_outside_set(Eo *obj, Elm_Image_Data *sd, Eina_Bool fill_outside)
-{
- sd->fill_inside = !fill_outside;
-
- elm_obj_image_sizing_eval(obj);
-}
-
-EOLIAN static Eina_Bool
-_elm_image_fill_outside_get(Eo *obj EINA_UNUSED, Elm_Image_Data *sd)
-{
- return !sd->fill_inside;
-}
-
-EOLIAN static void
_elm_image_preload_disabled_set(Eo *obj EINA_UNUSED, Elm_Image_Data *sd, Eina_Bool disable)
{
if (sd->edje || !sd->img) return;
return sd->scale;
}
+EAPI void
+elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside)
+{
+ ELM_IMAGE_CHECK(obj);
+ ELM_IMAGE_DATA_GET(obj, sd);
+
+ sd->fill_inside = !fill_outside;
+
+ elm_obj_image_sizing_eval(obj);
+}
+
+EAPI Eina_Bool
+elm_image_fill_outside_get(const Evas_Object *obj)
+{
+ ELM_IMAGE_CHECK(obj) EINA_FALSE;
+ ELM_IMAGE_DATA_GET(obj, sd);
+
+ return !sd->fill_inside;
+}
+
#include "elm_image.eo.c"
The original aspect ratio (width / height) of the image is usually
distorted to match the object's size. Enabling this option will retain
this original aspect, and the way that the image is fit into the object's
- area depends on the option set by @.fill_outside.]]
+ area depends on the option set by @.fill_inside.]]
}
get {
}
orient: Elm.Image_Orient; [[The image orientation Elm.Image.Orient Default is #ELM_IMAGE_ORIENT_NONE.]]
}
}
- @property fill_outside {
- [[Control if the image fills the entire object area, when keeping the aspect ratio.
-
- When the image should keep its aspect ratio even if resized to another
- aspect ratio, there are two possibilities to resize it: keep the entire
- image inside the limits of height and width of the object ($fill_outside
- is $false) or let the extra width or height go outside of the object,
- and the image will fill the entire object ($fill_outside is $true).
-
- Note: This option will have no effect if @.aspect_fixed
- is set to $false.
-
- See also @.fill_inside.]]
- set {
- }
- get {
- }
- values {
- fill_outside: bool; [[$true if the object is filled outside, $false otherwise. Default is $false.]]
- }
- }
@property resizable {
[[Control if the object is (up/down) resizable.
* @ingroup Elm_Image
*/
EAPI double elm_image_scale_get(const Evas_Object *obj);
+
+/**
+ * @brief Control if the image fills the entire object area, when keeping the
+ * aspect ratio.
+ *
+ * When the image should keep its aspect ratio even if resized to another
+ * aspect ratio, there are two possibilities to resize it: keep the entire
+ * image inside the limits of height and width of the object ($fill_outside is
+ * @c false) or let the extra width or height go outside of the object, and the
+ * image will fill the entire object ($fill_outside is @c true).
+ *
+ * @note This option will have no effect if @ref elm_image_aspect_fixed_get is
+ * set to @c false.
+ *
+ * See also @ref Elm.Image.fill_inside.
+ *
+ * @param[in] fill_outside @c true if the object is filled outside, @c false
+ * otherwise. Default is @c false.
+ *
+ * @ingroup Elm_Image
+ */
+EAPI void elm_image_fill_outside_set(Evas_Object *obj, Eina_Bool fill_outside);
+
+/**
+ * @brief Control if the image fills the entire object area, when keeping the
+ * aspect ratio.
+ *
+ * When the image should keep its aspect ratio even if resized to another
+ * aspect ratio, there are two possibilities to resize it: keep the entire
+ * image inside the limits of height and width of the object ($fill_outside is
+ * @c false) or let the extra width or height go outside of the object, and the
+ * image will fill the entire object ($fill_outside is @c true).
+ *
+ * @note This option will have no effect if @ref elm_image_aspect_fixed_get is
+ * set to @c false.
+ *
+ * See also @ref Elm.Image.fill_inside.
+ *
+ * @return @c true if the object is filled outside, @c false otherwise. Default
+ * is @c false.
+ *
+ * @ingroup Elm_Image
+ */
+EAPI Eina_Bool elm_image_fill_outside_get(const Evas_Object *obj);
+
#include "elm_image.eo.legacy.h"