Package: gdk

Function gdk:surface-translate-coordinates

Lambda List

gdk:surface-translate-coordinates (from to x y)

Arguments

from -- a gdk:surface object with the origin surface
to -- a gdk:surface object with the target surface
x -- a number coerced to a double float with the x coordinate to translate
x -- a number coerced to a double float with the y coordinate to translate

Return Value

xnew -- a double float with the result for the x coordinate
ynew -- a double float with the result for the y coordinate

Details

Translates the given coordinates from being relative to the from surface to being relative to the to surface. Note that this only works if to and from are popups or transient-for to the same toplevel (directly or indirectly).

The function returns nil, if the coordinates were not successfully translated.
 

See also

#2024-7-12