Difference between revisions of "Sprite:setAnchorPosition"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2015.03.22<br/>
 
'''Available since:''' Gideros 2015.03.22<br/>
 
=== Description ===
 
=== Description ===
Sets x, y, z anchor position of `Sprite` in it's relative coordinates.
+
<translate>Sets x, y, z anchor position of [[[Sprite]]] in it's relative coordinates.
  
Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center
+
Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center</translate>
 
<source lang="lua">
 
<source lang="lua">
 
  Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)
 
  Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''anchorX''': (number) Anchor position in Sprite's internal coordinates <br/>
+
'''anchorX''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> <br/>
'''anchorY''': (number) Anchor position in Sprite's internal coordinates <br/>
+
'''anchorY''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> <br/>
'''anchorZ''': (number) Anchor position in Sprite's internal coordinates '''optional'''<br/>
+
'''anchorZ''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> '''optional'''<br/>

Revision as of 14:38, 23 August 2018

Available since: Gideros 2015.03.22

Description

Sets x, y, z anchor position of [[[Sprite]]] in it's relative coordinates.

Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center

 Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)

Parameters

anchorX: (number) Anchor position in Sprite's internal coordinates
anchorY: (number) Anchor position in Sprite's internal coordinates
anchorZ: (number) Anchor position in Sprite's internal coordinates optional