Difference between revisions of "Sprite:localToGlobal"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates.<b...")
 
Line 6: Line 6:
 
<br />
 
<br />
 
<source lang="lua">
 
<source lang="lua">
(number) (number), = Sprite:localToGlobal(xy,)
+
(number), (number) = Sprite:localToGlobal(x,y)
 
</source>
 
</source>
'''x:''' (number) x coordinate of the local coordinate. ''''''<br/>
+
'''x''': (number) x coordinate of the local coordinate. ''''''<br/>
'''y:''' (number) y coordinate of the local coordinate. ''''''<br/>
+
'''y''': (number) y coordinate of the local coordinate. ''''''<br/>
 
'''Returns''' (number) 1. x coordinate relative to the display area.<br/>
 
'''Returns''' (number) 1. x coordinate relative to the display area.<br/>
 
'''Returns''' (number) 2. y coordinate relative to the display area.<br/>
 
'''Returns''' (number) 2. y coordinate relative to the display area.<br/>

Revision as of 11:17, 23 August 2018

Available since: Gideros 2011.6

Description


Converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates.

(number), (number) = Sprite:localToGlobal(x,y)

'x: (number) x coordinate of the local coordinate. '
'y: (number) y coordinate of the local coordinate. '
Returns (number) 1. x coordinate relative to the display area.
Returns (number) 2. y coordinate relative to the display area.