localLoc | |||||||
Type | function | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Returns the equivalent, in localcoordinates, of a point given in globalcoordinates. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Parameters |
| ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: item, point, relative Function: selectedLoc Glossary: relative coordinates, current stack, absolute coordinates, return, return value, integer, point Control Structure: function | ||||||
Description | Use the localLoc function to translate between screen and relative coordinates|window coordinates. In window coordinates, the point 0,0 is at the top left of the stack window. In screen coordinates, the point 0,0 is at the top left of the screen. The point returned by the localLoc function is relative to the top left of the current stack. The first item of the returned value is the horizontal distance in pixels from the left edge of the current stack to the location given by globalPoint. The second item of the returned value is the vertical distance from the top edge of the current stack to the location given by globalPoint. | ||||||
Tags | ui |