summaryrefslogtreecommitdiff
path: root/src
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 /src
parentbc2b32cba7bb562e2a558ac971fc3b95a1150511 (diff)
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?
Diffstat (limited to 'src')
-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,
47 Evas_Coord w, Evas_Coord h) 47 Evas_Coord w, Evas_Coord h)
48{ 48{
49 EVAS_IMAGE_API(obj); 49 EVAS_IMAGE_API(obj);
50 efl_gfx_fill_set(obj, x, y, w, h); 50 _evas_image_fill_set(obj, eo_data_scope_get(obj, EVAS_IMAGE_CLASS), x, y, w, h);
51} 51}
52 52
53EAPI void 53EAPI 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,
142void _evas_image_done_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o); 142void _evas_image_done_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o);
143void _evas_image_cleanup(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o); 143void _evas_image_cleanup(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Image_Data *o);
144 144
145/* Efl.Gfx.Fill */
146void _evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h);
147
145/* Efl.File */ 148/* Efl.File */
146Eina_Bool _evas_image_mmap_set(Eo *eo_obj, const Eina_File *f, const char *key); 149Eina_Bool _evas_image_mmap_set(Eo *eo_obj, const Eina_File *f, const char *key);
147void _evas_image_mmap_get(const Eo *eo_obj, const Eina_File **f, const char **key); 150void _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 *
542 return o->cur->border.scale; 542 return o->cur->border.scale;
543} 543}
544 544
545EOLIAN static void 545void
546_evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o, 546_evas_image_fill_set(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h)
547 int x, int y, int w, int h)
548{ 547{
549 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS); 548 Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
550 549
@@ -574,6 +573,16 @@ _evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
574} 573}
575 574
576EOLIAN static void 575EOLIAN static void
576_evas_image_efl_gfx_fill_fill_set(Eo *eo_obj, Evas_Image_Data *o,
577 int x, int y, int w, int h)
578{
579 // Should (0,0,0,0) reset the filled flag to true?
580 o->filled = EINA_FALSE;
581 o->filled_set = EINA_TRUE;
582 _evas_image_fill_set(eo_obj, o, x, y, w, h);
583}
584
585EOLIAN static void
577_evas_image_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, 586_evas_image_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
578 int *x, int *y, int *w, int *h) 587 int *x, int *y, int *w, int *h)
579{ 588{