Efl.Gfx.Fill: Rename filled to fill_auto

fill_filled is a strange name for the property.
fill_auto seems to make more sense. If you disagree, scream at
me or revert this commit.
This commit is contained in:
Jean-Philippe Andre 2016-03-18 11:50:48 +09:00
parent 9d4ca6f352
commit b8f682b842
9 changed files with 19 additions and 30 deletions

View File

@ -197,7 +197,6 @@ main(void)
* So it's possible to decrement refcount, and 'image' object
* will be deleted automatically by parent.*/
efl_gfx_fill_filled_set(d.img, EINA_TRUE);
efl_file_set(d.img, img_path, NULL);
err = efl_image_load_error_get(d.img);
@ -218,7 +217,6 @@ main(void)
/* border on the image's clipper, here just to emphasize its position */
d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas);
efl_gfx_fill_filled_set(d.clipper_border, EINA_TRUE);
efl_file_set(d.clipper_border, border_img_path, NULL);
err = efl_image_load_error_get(d.clipper_border);

View File

@ -1,17 +1,19 @@
interface Efl.Gfx.Fill {
legacy_prefix: null;
methods {
@property filled {
@property fill_auto {
[[Binds the object's @.fill property to its actual geometry.
If $true, then every time the object is resized, it will
automatically trigger a call to @Efl.Gfx.Fill.fill.set
with the new size (and 0, 0 as source image's origin),
so the bound image will fill the whole object's area.
so the image will cover the whole object's area.
This property takes precedence over @.fill.
This property takes precedence over @.fill. If set to $false, then
@.fill should be set.
This flag is $true by default (used to be $false with the old APIs).
This flag is $true by default (used to be $false with the old APIs,
and was known as "filled").
]]
set {}
get {}
@ -29,18 +31,8 @@ interface Efl.Gfx.Fill {
$w and $h need to be the exact width and height of the image object
itself, respectively.
Note that this property has no effect if @.filled is $true.
Setting this property will reset the @.fill_auto to $false.
]]
/* FIXME-doc
* See the following image to better understand the effects of this
* call. On this diagram, both image object and original image source
* have $a x $a dimensions and the image itself is a circle, with
* empty space around it:
* @image html image-fill.png
* @image rtf image-fill.png
* @image latex image-fill.eps
*/
set {}
get {}
values {

View File

@ -116,7 +116,7 @@ interface Efl.Image ()
in @Efl.Gfx.Border_Fill_Mode. By center we mean the complementary
part of that defined by @.border.set. This is very useful for
making frames and decorations. You would most probably also be
using a filled image (as in @Efl.Gfx.Fill.filled) to use as a frame.
using a filled image (as in @Efl.Gfx.Fill.fill_auto) to use as a frame.
The default value is @Efl.Gfx.Border_Fill_Mode.default, ie. render
and scale the center area, respecting its transparency.

View File

@ -3325,7 +3325,7 @@ EAPI double evas_object_image_border_scale_get(const Evas_Object *obj);
* By center we mean the complementary part of that defined by
* @ref evas_object_image_border_set. This one is very useful for making frames
* and decorations. You would most probably also be using a filled image (as in
* @ref Efl.Gfx.Fill.filled) to use as a frame.
* @ref Efl.Gfx.Fill.fill_auto) to use as a frame.
*
* The default value is
*
@ -3343,7 +3343,7 @@ EAPI void evas_object_image_border_center_fill_set(Evas_Object *obj, Evas_Border
* By center we mean the complementary part of that defined by
* @ref evas_object_image_border_set. This one is very useful for making frames
* and decorations. You would most probably also be using a filled image (as in
* @ref Efl.Gfx.Fill.filled) to use as a frame.
* @ref Efl.Gfx.Fill.fill_auto) to use as a frame.
*
* The default value is
*

View File

@ -11,7 +11,6 @@ _efl_canvas_snapshot_eo_base_constructor(Eo *eo_obj, void *pd EINA_UNUSED)
eo_obj = eo_constructor(eo_super(eo_obj, MY_CLASS));
if (!eo_obj) return NULL;
efl_gfx_fill_filled_set(eo_obj, EINA_TRUE);
evas_obj_pass_events_set(eo_obj, EINA_TRUE);
obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);

View File

@ -74,8 +74,8 @@ class Evas.Image (Evas.Object, Evas.Filter,
Efl.Gfx.Buffer.buffer_copy_set;
Efl.Gfx.Fill.fill.set;
Efl.Gfx.Fill.fill.get;
Efl.Gfx.Fill.filled.get;
Efl.Gfx.Fill.filled.set;
Efl.Gfx.Fill.fill_auto.get;
Efl.Gfx.Fill.fill_auto.set;
Efl.Gfx.Filter.filter_program.set;
Efl.Gfx.View.view_size.get;
Evas.Filter.filter_input_alpha;

View File

@ -16,7 +16,7 @@ evas_object_image_add(Evas *eo_e)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(eo_isa(eo_e, EVAS_CANVAS_CLASS), NULL);
return eo_add(EVAS_IMAGE_CLASS, eo_e,
efl_gfx_fill_filled_set(eo_self, EINA_FALSE),
efl_gfx_fill_auto_set(eo_self, EINA_FALSE),
evas_obj_legacy_ctor(eo_self));
}
@ -64,14 +64,14 @@ EAPI Eina_Bool
evas_object_image_filled_get(const Evas_Object *eo_obj)
{
EVAS_IMAGE_API(eo_obj, EINA_FALSE);
return efl_gfx_fill_filled_get(eo_obj);
return efl_gfx_fill_auto_get(eo_obj);
}
EAPI void
evas_object_image_filled_set(Evas_Object *eo_obj, Eina_Bool value)
{
EVAS_IMAGE_API(eo_obj);
efl_gfx_fill_filled_set(eo_obj, value);
efl_gfx_fill_auto_set(eo_obj, value);
}
EAPI void

View File

@ -214,7 +214,7 @@ EOLIAN static Eo *
_evas_image_eo_base_finalize(Eo *eo_obj, Evas_Image_Data *o)
{
if (!o->filled_set)
efl_gfx_fill_filled_set(eo_obj, EINA_TRUE);
efl_gfx_fill_auto_set(eo_obj, EINA_TRUE);
return eo_finalize(eo_super(eo_obj, MY_CLASS));
}
@ -490,7 +490,7 @@ _evas_image_efl_image_border_center_fill_get(Eo *eo_obj EINA_UNUSED, Evas_Image_
}
EOLIAN static void
_evas_image_efl_gfx_fill_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
_evas_image_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool setting)
{
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, EVAS_OBJECT_CLASS);
setting = !!setting;
@ -516,7 +516,7 @@ _evas_image_efl_gfx_fill_filled_set(Eo *eo_obj, Evas_Image_Data* o, Eina_Bool se
}
EOLIAN static Eina_Bool
_evas_image_efl_gfx_fill_filled_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
_evas_image_efl_gfx_fill_fill_auto_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
{
return o->filled;
}

View File

@ -647,7 +647,7 @@ START_TEST(evas_object_image_defaults)
/* test eo defaults */
o = eo_add(EVAS_IMAGE_CLASS, e);
fail_if(!efl_gfx_fill_filled_get(o));
fail_if(!efl_gfx_fill_auto_get(o));
eo_del(o);
evas_free(e);