summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-18 11:29:55 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-18 13:28:45 +0900
commit9d4ca6f352a465cc6e0bcc70aeb3ac3108917e67 (patch)
tree5cc795c8367dc08fd90da5ef47ad2f458bfbc153
parentbc2b32cba7bb562e2a558ac971fc3b95a1150511 (diff)
downloadefl-9d4ca6f352a465cc6e0bcc70aeb3ac3108917e67.tar.gz
Evas.Image: (eo) fill_set now unsets the filled flag
There's no point in calling fill_set AND fillet_set(false). If a users wants to specify the fill, that should be enough to switch to non-filled mode. Maybe the "filled" mode should even be called auto or something?
-rw-r--r--src/lib/evas/canvas/evas_image_legacy.c2
-rw-r--r--src/lib/evas/canvas/evas_image_private.h3
-rw-r--r--src/lib/evas/canvas/evas_object_image.c15
3 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c
index 9b510ddba0..cd92e6f4b7 100644
--- a/src/lib/evas/canvas/evas_image_legacy.c
+++ b/src/lib/evas/canvas/evas_image_legacy.c
@@ -47,7 +47,7 @@ evas_object_image_fill_set(Evas_Object *obj,
Evas_Coord w, Evas_Coord h)
{
EVAS_IMAGE_API(obj);
- efl_gfx_fill_set(obj, x, y, w, h);
+ _evas_image_fill_set(obj, eo_data_scope_get(obj, EVAS_IMAGE_CLASS), x, y, w, h);
}
EAPI void
diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h
index ff7ffcded4..7274c4185f 100644
--- a/src/lib/evas/canvas/evas_image_private.h
+++ b/src/lib/evas/canvas/evas_image_private.h
@@ -142,6 +142,9 @@ void _evas_image_init_set(const Eina_File *f, const char *file, const char *key,
void _evas_image_done_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o);
void _evas_image_cleanup(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o);
+/* Efl.Gfx.Fill */
+void _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h);
+
/* Efl.File */
Eina_Bool _evas_image_mmap_set(Eo *eo_obj, const Eina_File *f, const char *key);
void _evas_image_mmap_get(const Eo *eo_obj, const Eina_File **f, const char **key);
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 097c04fd02..5b4114f59f 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -542,9 +542,8 @@ _evas_image_efl_image_border_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *
return o->cur->border.scale;
}
-EOLIAN static void
-_evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
- int x, int y, int w, int h)
+void
+_evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
@@ -574,6 +573,16 @@ _evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
}
EOLIAN static void
+_evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
+ int x, int y, int w, int h)
+{
+ // Should (0,0,0,0) reset the filled flag to true?
+ o->filled = EINA_FALSE;
+ o->filled_set = EINA_TRUE;
+ _evas_image_fill_set(eo_obj, o, x, y, w, h);
+}
+
+EOLIAN static void
_evas_image_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
int *x, int *y, int *w, int *h)
{