efl/image: rename "border" -> "border_insets"

Summary:
this is a clearer name which makes the intent of the API more obvious at
a glance

ref T7875

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7875

Differential Revision: https://phab.enlightenment.org/D9996
This commit is contained in:
Mike Blumenkrantz 2019-09-18 10:08:56 +02:00 committed by Xavi Artigas
parent 1f767c81e5
commit 28f589d795
6 changed files with 19 additions and 19 deletions

View File

@ -220,7 +220,7 @@ main(void)
}
else
{
efl_gfx_image_border_set(d.clipper_border, 3, 3, 3, 3);
efl_gfx_image_border_insets_set(d.clipper_border, 3, 3, 3, 3);
efl_gfx_image_center_fill_mode_set(d.clipper_border, EFL_GFX_CENTER_FILL_MODE_NONE);
efl_gfx_entity_position_set(d.clipper_border, EINA_POSITION2D((WIDTH / 4) -3, (HEIGHT / 4) - 3));
efl_gfx_entity_size_set(d.clipper_border, EINA_SIZE2D((WIDTH / 2) + 6, (HEIGHT / 2) + 6));

View File

@ -133,11 +133,11 @@ interface @beta Efl.Gfx.Image
get { }
values {
region: Eina.Rect; [[A rectangle inside the object boundary where content is expected.
The default value is the image object's geometry with the @Efl.Gfx.Image.border
The default value is the image object's geometry with the @.border_insets
values subtracted.]]
}
}
@property border {
@property border_insets {
[[Dimensions of this image's border, a region that does not scale
with the center area.
@ -151,7 +151,7 @@ interface @beta Efl.Gfx.Image
The units used for $l, $r, $t and $b are canvas units (pixels).
Note: The border region itself may be scaled by the
@.border_scale.set function.
@.border_insets_scale.set function.
Note: By default, image objects have no borders set, i.e.
$l, $r, $t and $b start as 0.
@ -167,10 +167,10 @@ interface @beta Efl.Gfx.Image
b: int; [[The border's bottom height. The default value is $0.]]
}
}
@property border_scale {
@property border_insets_scale {
[[Scaling factor applied to the image borders.
This value multiplies the size of the @.border when scaling an
This value multiplies the size of the @.border_insets when scaling an
object.
]]
set {}
@ -186,7 +186,7 @@ interface @beta Efl.Gfx.Image
This function sets how the center part of the image object's
source image is to be drawn, which must be one of the values
in @Efl.Gfx.Center_Fill_Mode. By center we mean the complementary
part of that defined by @.border.set. This is very useful for
part of that defined by @.border_insets.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.fill_auto) to use as a frame.
]]
@ -205,7 +205,7 @@ interface @beta Efl.Gfx.Image
once and then destroy them. When the regions are retrieved by the user,
it is his responsibility to destroy the iterators.. It will remember the
information for the lifetime of the object. It will ignore all value
of @.border, @.border_scale and @.center_fill_mode . To reset the object
of @.border_insets, @.border_insets_scale and @.center_fill_mode . To reset the object
you can just pass $null to both horizontal and vertical at the same
time.
]]

View File

@ -15,8 +15,8 @@ abstract @beta Efl.Canvas.Image_Internal extends Efl.Canvas.Object implements Ef
Efl.Gfx.Image.smooth_scale { get; set; }
Efl.Gfx.Image.ratio { get; }
Efl.Gfx.Image.content_region { get; }
Efl.Gfx.Image.border { get; set; }
Efl.Gfx.Image.border_scale { get; set; }
Efl.Gfx.Image.border_insets { get; set; }
Efl.Gfx.Image.border_insets_scale { get; set; }
Efl.Gfx.Image.center_fill_mode { get; set; }
Efl.Gfx.Image.stretch_region { get; set; }
Efl.Gfx.Image.scale_hint { get; set; }

View File

@ -117,28 +117,28 @@ EAPI void
evas_object_image_border_set(Evas_Object *obj, int l, int r, int t, int b)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_border_set(obj, l, r, t, b);
efl_gfx_image_border_insets_set(obj, l, r, t, b);
}
EAPI void
evas_object_image_border_get(const Evas_Object *obj, int *l, int *r, int *t, int *b)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_border_get(obj, l, r, t, b);
efl_gfx_image_border_insets_get(obj, l, r, t, b);
}
EAPI void
evas_object_image_border_scale_set(Evas_Object *obj, double scale)
{
EVAS_IMAGE_API(obj);
efl_gfx_image_border_scale_set(obj, scale);
efl_gfx_image_border_insets_scale_set(obj, scale);
}
EAPI double
evas_object_image_border_scale_get(const Evas_Object *obj)
{
EVAS_IMAGE_API(obj, 0.0);
return efl_gfx_image_border_scale_get(obj);
return efl_gfx_image_border_insets_scale_get(obj);
}
EAPI void

View File

@ -590,7 +590,7 @@ _efl_canvas_image_internal_efl_gfx_image_content_region_get(const Eo *eo_obj, Ev
}
EOLIAN static void
_efl_canvas_image_internal_efl_gfx_image_border_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b)
_efl_canvas_image_internal_efl_gfx_image_border_insets_set(Eo *eo_obj, Evas_Image_Data *o, int l, int r, int t, int b)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
@ -617,7 +617,7 @@ _efl_canvas_image_internal_efl_gfx_image_border_set(Eo *eo_obj, Evas_Image_Data
}
EOLIAN static void
_efl_canvas_image_internal_efl_gfx_image_border_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b)
_efl_canvas_image_internal_efl_gfx_image_border_insets_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o, int *l, int *r, int *t, int *b)
{
if (l) *l = o->cur->border.l;
if (r) *r = o->cur->border.r;
@ -956,7 +956,7 @@ _efl_canvas_image_internal_efl_gfx_fill_fill_auto_get(const Eo *eo_obj EINA_UNUS
}
EOLIAN static void
_efl_canvas_image_internal_efl_gfx_image_border_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
_efl_canvas_image_internal_efl_gfx_image_border_insets_scale_set(Eo *eo_obj, Evas_Image_Data *o, double scale)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
@ -971,7 +971,7 @@ _efl_canvas_image_internal_efl_gfx_image_border_scale_set(Eo *eo_obj, Evas_Image
}
EOLIAN static double
_efl_canvas_image_internal_efl_gfx_image_border_scale_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
_efl_canvas_image_internal_efl_gfx_image_border_insets_scale_get(const Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o)
{
return o->cur->border.scale;
}

View File

@ -737,7 +737,7 @@ EFL_START_TEST(evas_object_image_cached_data_comparision)
ck_assert_int_eq(region.y, 0);
ck_assert_int_eq(region.w, 250);
ck_assert_int_eq(region.h, 250);
efl_gfx_image_border_set(img, 7, 14, 5, 10);
efl_gfx_image_border_insets_set(img, 7, 14, 5, 10);
region = efl_gfx_image_content_region_get(img);
ck_assert_int_eq(region.x, 7);
ck_assert_int_eq(region.y, 5);