forked from enlightenment/efl
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.
This commit is contained in:
parent
b640cb5ba9
commit
e9508ea80e
|
@ -124,7 +124,7 @@ struct _Ector_Renderer_Generic_Buffer_Data
|
||||||
{
|
{
|
||||||
Ector_Buffer *eo_buffer;
|
Ector_Buffer *eo_buffer;
|
||||||
struct {
|
struct {
|
||||||
Efl_Gfx_Fill_Spread spread;
|
/* Efl_Gfx_Fill_Spread spread; */
|
||||||
int x, y, w, h;
|
int x, y, w, h;
|
||||||
} fill;
|
} fill;
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,18 +10,6 @@
|
||||||
|
|
||||||
#define MY_CLASS ECTOR_RENDERER_GENERIC_BUFFER_MIXIN
|
#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
|
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)
|
_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 *
|
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;
|
Eo_Base *ret;
|
||||||
|
|
||||||
ret = eo_constructor(eo_super(obj, MY_CLASS));
|
ret = eo_constructor(eo_super(obj, MY_CLASS));
|
||||||
pd->fill.spread = EFL_GFX_FILL_REPEAT;
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,6 @@ mixin Ector.Renderer.Generic.Buffer (Ector.Renderer.Generic.Base, Efl.Gfx.Fill)
|
||||||
}
|
}
|
||||||
implements {
|
implements {
|
||||||
Eo.Base.constructor;
|
Eo.Base.constructor;
|
||||||
Efl.Gfx.Fill.fill_spread.get;
|
|
||||||
Efl.Gfx.Fill.fill_spread.set;
|
|
||||||
Efl.Gfx.Fill.fill.get;
|
Efl.Gfx.Fill.fill.get;
|
||||||
Efl.Gfx.Fill.fill.set;
|
Efl.Gfx.Fill.fill.set;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
interface Efl.Gfx.Fill {
|
||||||
legacy_prefix: null;
|
legacy_prefix: null;
|
||||||
methods {
|
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 {
|
@property fill {
|
||||||
set {
|
/* FIXME: bad defaults, bad doc */
|
||||||
[[Set how to fill an image object's drawing rectangle given the
|
[[Specifies how to tile an image to fill its rectangle geometry.
|
||||||
(real) image bound to it.
|
|
||||||
|
|
||||||
Note that if $w or $h are smaller than the dimensions of
|
Note that if $w or $h are smaller than the dimensions of the object,
|
||||||
$obj, the displayed image will be tiled around the object's
|
the displayed image will be tiled around the object's area. To have
|
||||||
area. To have only one copy of the bound image drawn, $x and $y
|
only one copy of the bound image drawn, $x and $y must be 0 and
|
||||||
must be 0 and $w and $h need to be the exact width and height
|
$w and $h need to be the exact width and height of the image object
|
||||||
of the image object itself, respectively.
|
itself, respectively.
|
||||||
|
|
||||||
Warning: The default values for the fill parameters are $x = 0,
|
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
|
$y = 0, $w = 0 and $h = 0. Thus, if you're not using the
|
||||||
evas_object_image_filled_add() helper and want your image
|
evas_object_image_filled_add() helper and want your image
|
||||||
displayed, you'll have to set valid values with this function on
|
displayed, you'll have to set valid values with this function on
|
||||||
your object.
|
your object.
|
||||||
|
|
||||||
Note: evas_object_image_filled_set() is a helper function which
|
Note: evas_object_image_filled_set() is a helper function which
|
||||||
will override the values set here automatically, for you, in a
|
will override the values set here automatically, for you, in a
|
||||||
given way.]]
|
given way.
|
||||||
|
]]
|
||||||
/* FIXME-doc
|
/* FIXME-doc
|
||||||
* See the following image to better understand the effects of this
|
* See the following image to better understand the effects of this
|
||||||
* call. On this diagram, both image object and original image source
|
* 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 rtf image-fill.png
|
||||||
* @image latex image-fill.eps
|
* @image latex image-fill.eps
|
||||||
*/
|
*/
|
||||||
}
|
set {}
|
||||||
get {
|
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.]]
|
|
||||||
}
|
|
||||||
values {
|
values {
|
||||||
x: int; [[The x coordinate (from the top left corner of the bound
|
x: int; [[The x coordinate (from the top left corner of the bound
|
||||||
image) to start drawing from.]]
|
image) to start drawing from.]]
|
||||||
|
|
|
@ -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_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() */
|
} 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;
|
typedef Efl_Gfx_Fill_Spread Evas_Fill_Spread;
|
||||||
#define EVAS_TEXTURE_REFLECT EFL_GFX_FILL_REFLECT
|
#define EVAS_TEXTURE_REFLECT EFL_GFX_FILL_REFLECT
|
||||||
#define EVAS_TEXTURE_REPEAT EFL_GFX_FILL_REPEAT
|
#define EVAS_TEXTURE_REPEAT EFL_GFX_FILL_REPEAT
|
||||||
|
|
|
@ -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.load_size.get;
|
||||||
Efl.Image.smooth_scale.set;
|
Efl.Image.smooth_scale.set;
|
||||||
Efl.Image.smooth_scale.get;
|
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.set;
|
||||||
Efl.Gfx.Fill.fill.get;
|
Efl.Gfx.Fill.fill.get;
|
||||||
Efl.Gfx.View.size.set;
|
Efl.Gfx.View.size.set;
|
||||||
|
|
|
@ -93,7 +93,6 @@ struct _Evas_Object_Image_State
|
||||||
} u;
|
} u;
|
||||||
const char *key;
|
const char *key;
|
||||||
int frame;
|
int frame;
|
||||||
int spread;
|
|
||||||
|
|
||||||
Evas_Colorspace cspace;
|
Evas_Colorspace cspace;
|
||||||
Evas_Image_Orient orient;
|
Evas_Image_Orient orient;
|
||||||
|
@ -244,7 +243,6 @@ static const Evas_Object_Image_State default_state = {
|
||||||
{ NULL }, //u
|
{ NULL }, //u
|
||||||
NULL, //key
|
NULL, //key
|
||||||
0, //frame
|
0, //frame
|
||||||
EVAS_TEXTURE_REPEAT,
|
|
||||||
EVAS_COLORSPACE_ARGB8888,
|
EVAS_COLORSPACE_ARGB8888,
|
||||||
EVAS_IMAGE_ORIENT_NONE,
|
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
|
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);
|
/* not implemented! */
|
||||||
}
|
if (spread != EFL_GFX_FILL_REPEAT)
|
||||||
|
WRN("Fill spread support is not implemented!");
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Evas_Fill_Spread
|
EAPI Evas_Fill_Spread
|
||||||
evas_object_image_fill_spread_get(const Evas_Image *obj)
|
evas_object_image_fill_spread_get(const Evas_Image *obj EINA_UNUSED)
|
||||||
{
|
{
|
||||||
return efl_gfx_fill_spread_get((Evas_Image *)obj);
|
return EFL_GFX_FILL_REPEAT;
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static Efl_Gfx_Fill_Spread
|
|
||||||
_evas_image_efl_gfx_fill_fill_spread_get(Eo *eo_obj EINA_UNUSED,
|
|
||||||
Evas_Image_Data *o)
|
|
||||||
{
|
|
||||||
return (Evas_Fill_Spread)o->cur->spread;;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -4938,12 +4914,14 @@ evas_object_image_mmap_get(const Evas_Image *obj, const Eina_File **f, const cha
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_image_save(const Eo *obj, const char *file, const char *key, const char *flags)
|
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);
|
return efl_file_save((Eo *) obj, file, key, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_image_animated_get(const Eo *obj)
|
evas_object_image_animated_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
|
Eina_Bool ret;
|
||||||
return efl_image_animated_get((Eo *) obj);
|
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
|
EAPI Eina_Bool
|
||||||
evas_object_image_smooth_scale_get(const Eo *obj)
|
evas_object_image_smooth_scale_get(const Eo *obj)
|
||||||
{
|
{
|
||||||
|
Eina_Bool ret;
|
||||||
return efl_image_smooth_scale_get((Eo *) obj);
|
return efl_image_smooth_scale_get((Eo *) obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue