Sprite:localToGlobal: Difference between revisions

From GiderosMobile
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
<languages />
'''Available since:''' Gideros 2011.6<br/>
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
=== Description ===
<translate><br />
Converts the x,y coordinates from the sprite (local) coordinates to the global coordinates.
Converts the x,y coordinates from the sprite's (local) coordinates to the global coordinates.<br />
<br /></translate>
<source lang="lua">
<source lang="lua">
(number), (number) = Sprite:localToGlobal(x,y)
(number), (number) = Sprite:localToGlobal(x,y)
</source>
</source>
=== <translate>Parameters</translate> ===
 
'''x''': (number) <translate>x coordinate of the local coordinate.</translate> <br/>
=== Parameters ===
'''y''': (number) <translate>y coordinate of the local coordinate.</translate> <br/>
'''x''': (number) x coordinate of the local coordinate<br/>
=== <translate>Return values</translate> ===
'''y''': (number) y coordinate of the local coordinate<br/>
'''<translate>Returns</translate>''' (number) <translate>x coordinate relative to the display area.</translate><br/>
 
'''<translate>Returns</translate>''' (number) <translate>y coordinate relative to the display area.</translate><br/>
=== Return values ===
'''Returns''' (number) x coordinate relative to the display area<br/>
'''Returns''' (number) y coordinate relative to the display area<br/>


{{Sprite}}
{{Sprite}}

Revision as of 18:02, 7 February 2023

Available since: Gideros 2011.6
Class: Sprite

Description

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

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

Parameters

x: (number) x coordinate of the local coordinate
y: (number) y coordinate of the local coordinate

Return values

Returns (number) x coordinate relative to the display area
Returns (number) y coordinate relative to the display area