summaryrefslogtreecommitdiff
path: root/efl
diff options
context:
space:
mode:
Diffstat (limited to 'efl')
-rw-r--r--efl/evas/efl.evas_map.pxi24
1 files changed, 24 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 #