Difference between revisions of "TexturePack:getLocation"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
=== Description === | === Description === | ||
Returns the coordinates of the region. | Returns the coordinates of the region. | ||
− | < | + | <syntaxhighlight lang="lua"> |
(number), (number), (number), (number), (number), (number), (number), (number) = TexturePack:getLocation(texturename) | (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. | ||
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