Difference between revisions of "Sprite:localToGlobal"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(3 intermediate revisions by 3 users not shown)
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 />
+
<syntaxhighlight lang="lua">
<br /></translate>
 
<source lang="lua">
 
 
(number), (number) = Sprite:localToGlobal(x,y)
 
(number), (number) = Sprite:localToGlobal(x,y)
</source>
+
</syntaxhighlight>
=== <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>1. x coordinate relative to the display area.</translate><br/>
+
 
'''<translate>Returns</translate>''' (number) <translate>2. 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}}

Latest revision as of 15:33, 13 July 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