Difference between revisions of "Sprite:setAnchorPosition"

From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2015.03.22<br/>
'''<translate>Available since</translate>:''' Gideros 2015.03.22<br/>
+
'''Class:''' [[Sprite]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/Sprite|Sprite]]<br/>
 
=== <translate>Description</translate> ===
 
<translate>Sets x, y, z anchor position of [[Special:MyLanguage/Sprite|Sprite]] in it's relative coordinates.
 
  
Meaning Sprite with dimensions 100x100 and anchor position of 50x50 would rotate around its center</translate>
+
=== Description ===
<source lang="lua">
+
Sets x, y, z anchor position of '''Sprite''' in its relative coordinates.
Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)
+
<syntaxhighlight lang="lua">
</source>
+
Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)
=== <translate>Parameters</translate> ===
+
</syntaxhighlight>
'''anchorX''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> <br/>
+
 
'''anchorY''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> <br/>
+
Meaning '''Sprite''' with dimensions 100x100 and anchor position of 50x50 would rotate around its center.
'''anchorZ''': (number) <translate>Anchor position in Sprite's internal coordinates</translate> '''optional'''<br/>
+
 
 +
=== Parameters ===
 +
'''anchorX''': (number) anchor position in Sprite internal coordinates<br/>
 +
'''anchorY''': (number) anchor position in Sprite internal coordinates<br/>
 +
'''anchorZ''': (number) anchor position in Sprite internal coordinates '''optional'''<br/>
 +
 
 +
=== Note ===
 +
'''setAnchorPoint''' is available in the Bitmap class: [[Bitmap:setAnchorPoint]]
 +
 
 +
{{Sprite}}

Latest revision as of 14:33, 13 July 2023

Available since: Gideros 2015.03.22
Class: Sprite

Description

Sets x, y, z anchor position of Sprite in its relative coordinates.

Sprite:setAnchorPosition(anchorX,anchorY,anchorZ)

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

Parameters

anchorX: (number) anchor position in Sprite internal coordinates
anchorY: (number) anchor position in Sprite internal coordinates
anchorZ: (number) anchor position in Sprite internal coordinates optional

Note

setAnchorPoint is available in the Bitmap class: Bitmap:setAnchorPoint