summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--efl/evas/efl.evas_map.pxi24
-rw-r--r--include/efl.evas.pxd1
2 files changed, 25 insertions, 0 deletions
diff --git a/efl/evas/efl.evas_map.pxi b/efl/evas/efl.evas_map.pxi
index 2e5ade4..bea2407 100644
--- a/efl/evas/efl.evas_map.pxi
+++ b/efl/evas/efl.evas_map.pxi
@@ -394,6 +394,30 @@ cdef class Map(object):
394 evas_map_point_coord_get(self.map, idx, &x, &y, &z) 394 evas_map_point_coord_get(self.map, idx, &x, &y, &z)
395 return (x, y, z) 395 return (x, y, z)
396 396
397 def coords_get(self, double x, double y, int grab):
398 """Apply a map transformation on given coordinate.
399
400 :param x: point x source coordinate
401 :type x: double
402 :param y: point y source coordinate
403 :type y: double
404 :param grab: unknown
405 :type grab: int
406
407 :return: coordinates after transformation by map
408 :rtype: tuple of 2 doubles (mx, my)
409
410 :raise RuntimeError: when interpolation fail
411
412 .. versionadded:: 1.20
413
414 """
415 cdef double mx, my
416 if evas_map_coords_get(self.map, x, y, &mx, &my, grab) == 0:
417 raise(RuntimeError("Map interpolation failed"))
418 else:
419 return (mx, my)
420
397 # 421 #
398 # XXX: Can't use property here since getter has an argument. 422 # XXX: Can't use property here since getter has an argument.
399 # 423 #
diff --git a/include/efl.evas.pxd b/include/efl.evas.pxd
index 63cf8f5..ad33ff1 100644
--- a/include/efl.evas.pxd
+++ b/include/efl.evas.pxd
@@ -822,6 +822,7 @@ cdef extern from "Evas.h":
822 void evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v) 822 void evas_map_point_image_uv_get(const Evas_Map *m, int idx, double *u, double *v)
823 void evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a) 823 void evas_map_point_color_set(Evas_Map *m, int idx, int r, int g, int b, int a)
824 void evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a) 824 void evas_map_point_color_get(const Evas_Map *m, int idx, int *r, int *g, int *b, int *a)
825 Eina_Bool evas_map_coords_get(const Evas_Map *m, double x, double y, double *mx, double *my, int grab)
825 826
826 827
827 #################################################################### 828 ####################################################################