diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-18 21:01:19 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-19 10:51:48 +0900 |
commit | 8bf06f95fe015c382d694deada7daf82df8b972a (patch) | |
tree | 48228819bb9e19939a285572dfa0437697296263 | |
parent | a3250f975a4aa04b487ab22edf716c6bc188e6bb (diff) |
evas: Use Eina.Rect for load_region
-rw-r--r-- | src/lib/efl/interfaces/efl_image_load.eo | 8 | ||||
-rw-r--r-- | src/lib/evas/canvas/efl_canvas_image.c | 12 |
2 files changed, 8 insertions, 12 deletions
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 () | |||
117 | get { | 117 | get { |
118 | [[Retrieve the coordinates of a given image object's selective | 118 | [[Retrieve the coordinates of a given image object's selective |
119 | (source image) load region. | 119 | (source image) load region. |
120 | |||
121 | Note: Use $null pointers on the coordinates you're not | ||
122 | interested in: they'll be ignored by the function. | ||
123 | ]] | 120 | ]] |
124 | } | 121 | } |
125 | values { | 122 | values { |
126 | x: int; [[X-offset of the region to be loaded.]] | 123 | region: Eina.Rect; [[A region of the image.]] |
127 | y: int; [[Y-offset of the region to be loaded.]] | ||
128 | w: int; [[Width of the region to be loaded.]] | ||
129 | h: int; [[Height of the region to be loaded.]] | ||
130 | } | 124 | } |
131 | } | 125 | } |
132 | @property load_orientation { | 126 | @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) | |||
389 | } | 389 | } |
390 | 390 | ||
391 | EOLIAN static void | 391 | EOLIAN static void |
392 | _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) | 392 | _efl_canvas_image_efl_image_load_load_region_set(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED, Eina_Rect region) |
393 | { | 393 | { |
394 | _evas_image_load_region_set(eo_obj, x, y, w, h); | 394 | _evas_image_load_region_set(eo_obj, region.x, region.y, region.w, region.h); |
395 | } | 395 | } |
396 | 396 | ||
397 | void | 397 | void |
@@ -405,10 +405,12 @@ _evas_image_load_region_get(const Eo *eo_obj, int *x, int *y, int *w, int *h) | |||
405 | if (h) *h = o->load_opts->region.h; | 405 | if (h) *h = o->load_opts->region.h; |
406 | } | 406 | } |
407 | 407 | ||
408 | EOLIAN static void | 408 | EOLIAN static Eina_Rect |
409 | _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) | 409 | _efl_canvas_image_efl_image_load_load_region_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED) |
410 | { | 410 | { |
411 | _evas_image_load_region_get(eo_obj, x, y, w, h); | 411 | Eina_Rect r; |
412 | _evas_image_load_region_get(eo_obj, &r.x, &r.y, &r.w, &r.h); | ||
413 | return r; | ||
412 | } | 414 | } |
413 | 415 | ||
414 | void | 416 | void |