Difference between revisions of "TexturePack:getLocation"

From GiderosMobile
(Created page with "__NOTOC__ '''<translate>Available since</translate>:''' Gideros 2012.08.2<br/> '''<translate>Class</translate>:''' TexturePack<br/> === De...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
+
'''Available since:''' Gideros 2012.08.2<br/>
'''<translate>Available since</translate>:''' Gideros 2012.08.2<br/>
+
'''Class:''' [[TexturePack]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TexturePack|TexturePack]]<br/>
 
  
 
=== Description ===
 
=== Description ===
Returns the coordinates of the region.<br />
+
Returns the coordinates of the region.
 +
<syntaxhighlight lang="lua">
 +
(number), (number), (number), (number), (number), (number), (number), (number) = TexturePack:getLocation(texturename)
 +
</syntaxhighlight>
 
If transparent areas were trimmed during texture pack export, also reports the amount trimmed.
 
If transparent areas were trimmed during texture pack export, also reports the amount trimmed.
<source lang="lua">
 
(number), (number), (number), (number), (number), (number), (number), (number) = TexturePack:getLocation(texturename)
 
</source>
 
  
 
=== Parameters ===
 
=== Parameters ===
'''texturename''': (string) <translate></translate> <br/>
+
'''texturename''': (string) '''Gideros Texture Packer''' texture file path<br/>
  
=== <translate>Return values</translate> ===
+
=== Return values ===
'''<translate>Returns</translate>''' (number) <translate>x coordinate from texture</translate><br/>
+
'''Returns''' (number) x coordinate from texture<br/>
'''<translate>Returns</translate>''' (number) <translate>y coordinate from texture</translate><br/>
+
'''Returns''' (number) y coordinate from texture<br/>
'''<translate>Returns</translate>''' (number) <translate>width of region</translate><br/>
+
'''Returns''' (number) width of region<br/>
'''<translate>Returns</translate>''' (number) <translate>height of region</translate><br/>
+
'''Returns''' (number) height of region<br/>
'''<translate>Returns</translate>''' (number) <translate>left trim</translate><br/>
+
'''Returns''' (number) left trim<br/>
'''<translate>Returns</translate>''' (number) <translate>top trim</translate><br/>
+
'''Returns''' (number) top trim<br/>
'''<translate>Returns</translate>''' (number) <translate>right trim</translate><br/>
+
'''Returns''' (number) right trim<br/>
'''<translate>Returns</translate>''' (number) <translate>bottom trim</translate><br/>
+
'''Returns''' (number) bottom trim<br/>
  
 
{{TexturePack}}
 
{{TexturePack}}

Latest revision as of 14:33, 13 July 2023

Available since: Gideros 2012.08.2
Class: TexturePack

Description

Returns the coordinates of the region.

(number), (number), (number), (number), (number), (number), (number), (number) = TexturePack:getLocation(texturename)

If transparent areas were trimmed during texture pack export, also reports the amount trimmed.

Parameters

texturename: (string) Gideros Texture Packer texture file path

Return values

Returns (number) x coordinate from texture
Returns (number) y coordinate from texture
Returns (number) width of region
Returns (number) height of region
Returns (number) left trim
Returns (number) top trim
Returns (number) right trim
Returns (number) bottom trim