Difference between revisions of "Sprite:localToGlobal"

From GiderosMobile
Line 14: Line 14:
 
'''y''': (number) <translate>y coordinate of the local coordinate.</translate> <br/>
 
'''y''': (number) <translate>y coordinate of the local coordinate.</translate> <br/>
 
=== <translate>Return values</translate> ===
 
=== <translate>Return values</translate> ===
'''<translate>Returns</translate>''' (number) <translate>1. x coordinate relative to the display area.</translate><br/>
+
'''<translate>Returns</translate>''' (number) <translate>x coordinate relative to the display area.</translate><br/>
'''<translate>Returns</translate>''' (number) <translate>2. y coordinate relative to the display area.</translate><br/>
+
'''<translate>Returns</translate>''' (number) <translate>y coordinate relative to the display area.</translate><br/>
  
 
{{Sprite}}
 
{{Sprite}}

Revision as of 20:33, 31 December 2020


Available since: Gideros 2011.6
Class: Sprite

Description


Converts the x,y coordinates from the sprite's (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.