evas: Use Eina.Rect for load_region

This commit is contained in:
Jean-Philippe Andre 2017-09-18 21:01:19 +09:00
parent a3250f975a
commit 8bf06f95fe
2 changed files with 8 additions and 12 deletions

View File

@ -117,16 +117,10 @@ interface Efl.Image.Load ()
get { get {
[[Retrieve the coordinates of a given image object's selective [[Retrieve the coordinates of a given image object's selective
(source image) load region. (source image) load region.
Note: Use $null pointers on the coordinates you're not
interested in: they'll be ignored by the function.
]] ]]
} }
values { values {
x: int; [[X-offset of the region to be loaded.]] region: Eina.Rect; [[A region of the image.]]
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.]]
} }
} }
@property load_orientation { @property load_orientation {

View File

@ -389,9 +389,9 @@ _evas_image_load_region_set(Eo *eo_obj, int x, int y, int w, int h)
} }
EOLIAN static void 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 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; if (h) *h = o->load_opts->region.h;
} }
EOLIAN static void EOLIAN static Eina_Rect
_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) _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 void