jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9d4ca6f352a465cc6e0bcc70aeb3ac3108917e67

commit 9d4ca6f352a465cc6e0bcc70aeb3ac3108917e67
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Fri Mar 18 11:29:55 2016 +0900

    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?
---
 src/lib/evas/canvas/evas_image_legacy.c  |  2 +-
 src/lib/evas/canvas/evas_image_private.h |  3 +++
 src/lib/evas/canvas/evas_object_image.c  | 15 ++++++++++++---
 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 9b510dd..cd92e6f 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 ff7ffcd..7274c41 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 097c04f..5b4114f 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)
 {

-- 


Reply via email to