Difference between revisions of "Sprite:localToGlobal"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
=== Description ===
 
=== Description ===
 
Converts the x,y coordinates from the sprite (local) coordinates to the global coordinates.
 
Converts the x,y coordinates from the sprite (local) coordinates to the global coordinates.
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number), (number) = Sprite:localToGlobal(x,y)
 
(number), (number) = Sprite:localToGlobal(x,y)
</source>
+
</syntaxhighlight>
  
 
=== Parameters ===
 
=== Parameters ===

Latest revision as of 14: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