diff --git a/src/lib/efl/interfaces/efl_image_load.eo b/src/lib/efl/interfaces/efl_image_load.eo index 53f549fe1f..65e4853111 100644 --- a/src/lib/efl/interfaces/efl_image_load.eo +++ b/src/lib/efl/interfaces/efl_image_load.eo @@ -117,16 +117,10 @@ interface Efl.Image.Load () get { [[Retrieve the coordinates of a given image object's selective (source image) load region. - - Note: Use $null pointers on the coordinates you're not - interested in: they'll be ignored by the function. ]] } values { - x: int; [[X-offset of the region to be loaded.]] - y: int; [[Y-offset of the region to be loaded.]] - w: int; [[Width of the region to be loaded.]] - h: int; [[Height of the region to be loaded.]] + region: Eina.Rect; [[A region of the image.]] } } @property load_orientation { diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index 13e8e5a8d0..1694d47ae5 100644 --- a/src/lib/evas/canvas/efl_canvas_image.c +++ b/src/lib/evas/canvas/efl_canvas_image.c @@ -389,9 +389,9 @@ _evas_image_load_region_set(Eo *eo_obj, int x, int y, int w, int h) } EOLIAN static void -_efl_canvas_image_efl_image_load_load_region_set(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED, int x, int y, int w, int h) +_efl_canvas_image_efl_image_load_load_region_set(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED, Eina_Rect region) { - _evas_image_load_region_set(eo_obj, x, y, w, h); + _evas_image_load_region_set(eo_obj, region.x, region.y, region.w, region.h); } void @@ -405,10 +405,12 @@ _evas_image_load_region_get(const Eo *eo_obj, int *x, int *y, int *w, int *h) if (h) *h = o->load_opts->region.h; } -EOLIAN static void -_efl_canvas_image_efl_image_load_load_region_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED, int *x, int *y, int *w, int *h) +EOLIAN static Eina_Rect +_efl_canvas_image_efl_image_load_load_region_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED) { - _evas_image_load_region_get(eo_obj, x, y, w, h); + Eina_Rect r; + _evas_image_load_region_get(eo_obj, &r.x, &r.y, &r.w, &r.h); + return r; } void