aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-03-02 15:07:03 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-03-15 11:11:59 +0900
commite9508ea80e6d333ad89645a1e03c084a7589e1f6 (patch)
tree7b81a013aab1a04e6e38b0ce1d5d7d94c51b4d6b
parentEvas filters: Simplify evas_filter_dirty (diff)
downloadefl-e9508ea80e6d333ad89645a1e03c084a7589e1f6.tar.gz
Efl.Gfx.Fill: Remove fill_spread
It's not actually implemented anywhere. There's a flag that's never read. Proper support would require quite some work. Once we actually implement fill_spread support, we can bring the API back without breaking compatibility.
-rw-r--r--src/lib/ector/ector_private.h2
-rw-r--r--src/lib/ector/ector_renderer_generic_buffer.c15
-rw-r--r--src/lib/ector/ector_renderer_generic_buffer.eo2
-rw-r--r--src/lib/efl/interfaces/efl_gfx_fill.eo71
-rw-r--r--src/lib/evas/Evas_Common.h12
-rw-r--r--src/lib/evas/canvas/evas_image.eo2
-rw-r--r--src/lib/evas/canvas/evas_object_image.c39
7 files changed, 41 insertions, 102 deletions
diff --git a/src/lib/ector/ector_private.h b/src/lib/ector/ector_private.h
index 013b1de9be..450a4ba941 100644
--- a/src/lib/ector/ector_private.h
+++ b/src/lib/ector/ector_private.h
@@ -124,7 +124,7 @@ struct _Ector_Renderer_Generic_Buffer_Data
{
Ector_Buffer *eo_buffer;
struct {
- Efl_Gfx_Fill_Spread spread;
+ /* Efl_Gfx_Fill_Spread spread; */
int x, y, w, h;
} fill;
};
diff --git a/src/lib/ector/ector_renderer_generic_buffer.c b/src/lib/ector/ector_renderer_generic_buffer.c
index 5359970867..d5755682b1 100644
--- a/src/lib/ector/ector_renderer_generic_buffer.c
+++ b/src/lib/ector/ector_renderer_generic_buffer.c
@@ -10,18 +10,6 @@
#define MY_CLASS ECTOR_RENDERER_GENERIC_BUFFER_MIXIN
-EOLIAN static Efl_Gfx_Fill_Spread
-_ector_renderer_generic_buffer_efl_gfx_fill_fill_spread_get(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd)
-{
- return pd->fill.spread;
-}
-
-EOLIAN static void
-_ector_renderer_generic_buffer_efl_gfx_fill_fill_spread_set(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd, Efl_Gfx_Fill_Spread spread)
-{
- pd->fill.spread = spread;
-}
-
EOLIAN static void
_ector_renderer_generic_buffer_efl_gfx_fill_fill_get(Eo *obj EINA_UNUSED, Ector_Renderer_Generic_Buffer_Data *pd, int *x, int *y, int *w, int *h)
{
@@ -55,12 +43,11 @@ _ector_renderer_generic_buffer_buffer_get(Eo *obj EINA_UNUSED, Ector_Renderer_Ge
}
EOLIAN static Eo_Base *
-_ector_renderer_generic_buffer_eo_base_constructor(Eo *obj, Ector_Renderer_Generic_Buffer_Data *pd)
+_ector_renderer_generic_buffer_eo_base_constructor(Eo *obj, Ector_Renderer_Generic_Buffer_Data *pd EINA_UNUSED)
{
Eo_Base *ret;
ret = eo_constructor(eo_super(obj, MY_CLASS));
- pd->fill.spread = EFL_GFX_FILL_REPEAT;
return ret;
}
diff --git a/src/lib/ector/ector_renderer_generic_buffer.eo b/src/lib/ector/ector_renderer_generic_buffer.eo
index 4d881052ad..85d361e41c 100644
--- a/src/lib/ector/ector_renderer_generic_buffer.eo
+++ b/src/lib/ector/ector_renderer_generic_buffer.eo
@@ -14,8 +14,6 @@ mixin Ector.Renderer.Generic.Buffer (Ector.Renderer.Generic.Base, Efl.Gfx.Fill)
}
implements {
Eo.Base.constructor;
- Efl.Gfx.Fill.fill_spread.get;
- Efl.Gfx.Fill.fill_spread.set;
Efl.Gfx.Fill.fill.get;
Efl.Gfx.Fill.fill.set;
}
diff --git a/src/lib/efl/interfaces/efl_gfx_fill.eo b/src/lib/efl/interfaces/efl_gfx_fill.eo
index 0ea3be93bc..74aff4cb6b 100644
--- a/src/lib/efl/interfaces/efl_gfx_fill.eo
+++ b/src/lib/efl/interfaces/efl_gfx_fill.eo
@@ -1,53 +1,26 @@
-enum Efl.Gfx.Fill_Spread {
- [[Type defining how an image content gets filled.
- @since 1.14
- ]]
- legacy: Efl_Gfx_Fill;
- reflect = 0, [[Image fill tiling mode - tiling reflects]]
- repeat = 1, [[Tiling repeats]]
- restrict = 2, [[Tiling clamps, range offset ignored]]
- restrict_reflect = 3, [[Tiling clamps and any range offset reflects]]
- restrict_repeat = 4, [[Tiling clamps and any range offset repeats]]
- pad = 5, [[Tiling extends with end values]]
-}
-
interface Efl.Gfx.Fill {
legacy_prefix: null;
methods {
- @property fill_spread {
- set {
- [[Sets the tiling mode for the given evas image object's fill.
- $EFL_GFX_FILL_RESTRICT, or $EFL_GFX_FILL_PAD.]]
- }
- get {
- [[Retrieves the spread (tiling mode) for the given image object's
- fill.]]
- }
- values {
- spread: Efl.Gfx.Fill_Spread; [[The current spread mode of the image object.
- One of $EFL_GFX_FILL_REFLECT, $EFL_GFX_FILL_REPEAT]]
- }
- }
@property fill {
- set {
- [[Set how to fill an image object's drawing rectangle given the
- (real) image bound to it.
+ /* FIXME: bad defaults, bad doc */
+ [[Specifies how to tile an image to fill its rectangle geometry.
- Note that if $w or $h are smaller than the dimensions of
- $obj, the displayed image will be tiled around the object's
- area. To have only one copy of the bound image drawn, $x and $y
- must be 0 and $w and $h need to be the exact width and height
- of the image object itself, respectively.
+ Note that if $w or $h are smaller than the dimensions of the object,
+ the displayed image will be tiled around the object's area. To have
+ only one copy of the bound image drawn, $x and $y must be 0 and
+ $w and $h need to be the exact width and height of the image object
+ itself, respectively.
- Warning: The default values for the fill parameters are $x = 0,
- $y = 0, $w = 0 and $h = 0. Thus, if you're not using the
- evas_object_image_filled_add() helper and want your image
- displayed, you'll have to set valid values with this function on
- your object.
+ Warning: The default values for the fill parameters are $x = 0,
+ $y = 0, $w = 0 and $h = 0. Thus, if you're not using the
+ evas_object_image_filled_add() helper and want your image
+ displayed, you'll have to set valid values with this function on
+ your object.
- Note: evas_object_image_filled_set() is a helper function which
- will override the values set here automatically, for you, in a
- given way.]]
+ Note: evas_object_image_filled_set() is a helper function which
+ will override the values set here automatically, for you, in a
+ given way.
+ ]]
/* FIXME-doc
* See the following image to better understand the effects of this
* call. On this diagram, both image object and original image source
@@ -58,16 +31,8 @@ interface Efl.Gfx.Fill {
* @image rtf image-fill.png
* @image latex image-fill.eps
*/
- }
- get {
- [[Retrieve how an image object is to fill its drawing rectangle,
- given the (real) image bound to it.
-
- Note: Use $null pointers on the fill components you're not
- interested in: they'll be ignored by the function.
-
- See @.fill.set() for more details.]]
- }
+ set {}
+ get {}
values {
x: int; [[The x coordinate (from the top left corner of the bound
image) to start drawing from.]]
diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 63f9d4a928..50205a775e 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -264,6 +264,18 @@ typedef enum _Evas_Alloc_Error
EVAS_ALLOC_ERROR_RECOVERED = 2 /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */
} Evas_Alloc_Error; /**< Possible allocation errors returned by evas_alloc_error() */
+/* not implemented! removed from the interface, kept as legacy only */
+typedef enum _Efl_Gfx_Fill_Spread {
+ /** Fill spread mode. Warning: support is not implemented!
+ * @since 1.14 */
+ EFL_GFX_FILL_REFLECT = 0, /**< Tiling reflects and repeats */
+ EFL_GFX_FILL_REPEAT = 1, /**< Tiling repeats like a mosaic */
+ EFL_GFX_FILL_RESTRICT = 2, /**< Tiling clamps, range offset ignored */
+ EFL_GFX_FILL_RESTRICT_REFLECT = 3, /**< Tiling clamps and any range offset reflects */
+ EFL_GFX_FILL_RESTRICT_REPEAT = 4, /**< Tiling clamps and any range offset repeats */
+ EFL_GFX_FILL_PAD = 5, /**< Tiling extends with end values */
+} Efl_Gfx_Fill_Spread;
+
typedef Efl_Gfx_Fill_Spread Evas_Fill_Spread;
#define EVAS_TEXTURE_REFLECT EFL_GFX_FILL_REFLECT
#define EVAS_TEXTURE_REPEAT EFL_GFX_FILL_REPEAT
diff --git a/src/lib/evas/canvas/evas_image.eo b/src/lib/evas/canvas/evas_image.eo
index 7eff63ae7e..beb066bb3c 100644
--- a/src/lib/evas/canvas/evas_image.eo
+++ b/src/lib/evas/canvas/evas_image.eo
@@ -778,8 +778,6 @@ class Evas.Image (Evas.Object, Efl.File, Efl.Image, Efl.Gfx.Fill, Efl.Gfx.View,
Efl.Image.load_size.get;
Efl.Image.smooth_scale.set;
Efl.Image.smooth_scale.get;
- Efl.Gfx.Fill.fill_spread.set;
- Efl.Gfx.Fill.fill_spread.get;
Efl.Gfx.Fill.fill.set;
Efl.Gfx.Fill.fill.get;
Efl.Gfx.View.size.set;
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 8fd8c94c8b..351c481502 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -93,7 +93,6 @@ struct _Evas_Object_Image_State
} u;
const char *key;
int frame;
- int spread;
Evas_Colorspace cspace;
Evas_Image_Orient orient;
@@ -244,7 +243,6 @@ static const Evas_Object_Image_State default_state = {
{ NULL }, //u
NULL, //key
0, //frame
- EVAS_TEXTURE_REPEAT,
EVAS_COLORSPACE_ARGB8888,
EVAS_IMAGE_ORIENT_NONE,
@@ -1039,39 +1037,17 @@ _evas_image_efl_gfx_fill_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o,
}
EAPI void
-evas_object_image_fill_spread_set(Evas_Image *obj, Evas_Fill_Spread spread)
+evas_object_image_fill_spread_set(Evas_Image *obj EINA_UNUSED, Evas_Fill_Spread spread)
{
- efl_gfx_fill_spread_set((Evas_Image *)obj, spread);
-}
-
-EOLIAN static void
-_evas_image_efl_gfx_fill_fill_spread_set(Eo *eo_obj, Evas_Image_Data *o,
- Efl_Gfx_Fill_Spread spread)
-{
- Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
-
- if (spread == (Evas_Fill_Spread)o->cur->spread) return;
-
- evas_object_async_block(obj);
- EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
- state_write->spread = spread;
- EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
-
- o->changed = EINA_TRUE;
- evas_object_change(eo_obj, obj);
+ /* not implemented! */
+ if (spread != EFL_GFX_FILL_REPEAT)
+ WRN("Fill spread support is not implemented!");
}
EAPI Evas_Fill_Spread
-evas_object_image_fill_spread_get(const Evas_Image *obj)
-{
- return efl_gfx_fill_spread_get((Evas_Image *)obj);
-}
-
-EOLIAN static Efl_Gfx_Fill_Spread
-_evas_image_efl_gfx_fill_fill_spread_get(Eo *eo_obj EINA_UNUSED,
- Evas_Image_Data *o)
+evas_object_image_fill_spread_get(const Evas_Image *obj EINA_UNUSED)
{
- return (Evas_Fill_Spread)o->cur->spread;;
+ return EFL_GFX_FILL_REPEAT;
}
EAPI void
@@ -4938,12 +4914,14 @@ evas_object_image_mmap_get(const Evas_Image *obj, const Eina_File **f, const cha
EAPI Eina_Bool
evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags)
{
+ Eina_Bool ret;
return efl_file_save((Eo *) obj, file, key, flags);
}
EAPI Eina_Bool
evas_object_image_animated_get(const Eo *obj)
{
+ Eina_Bool ret;
return efl_image_animated_get((Eo *) obj);
}
@@ -4968,6 +4946,7 @@ evas_object_image_smooth_scale_set(Eo *obj, Eina_Bool smooth_scale)
EAPI Eina_Bool
evas_object_image_smooth_scale_get(const Eo *obj)
{
+ Eina_Bool ret;
return efl_image_smooth_scale_get((Eo *) obj);
}