Difference between revisions of "TextureRegion:getRegion"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
'''Available since:''' Gideros 2012.08.2<br/> | '''Available since:''' Gideros 2012.08.2<br/> | ||
+ | '''Class:''' [[TextureRegion]]<br/> | ||
+ | |||
=== 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) = TextureRegion:getRegion(baseCoordinates) | ||
+ | </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. | ||
− | + | ||
− | + | === Parameters === | |
− | + | '''baseCoordinates''': (boolean) returns values in base (@1) size '''optional'''<br/> | |
− | + | ||
− | ''' | + | === Return values === |
'''Returns''' (number) x coordinate from texture<br/> | '''Returns''' (number) x coordinate from texture<br/> | ||
'''Returns''' (number) y coordinate from texture<br/> | '''Returns''' (number) y coordinate from texture<br/> | ||
Line 18: | Line 23: | ||
'''Returns''' (number) right trim<br/> | '''Returns''' (number) right trim<br/> | ||
'''Returns''' (number) bottom trim<br/> | '''Returns''' (number) bottom trim<br/> | ||
+ | |||
+ | {{TextureRegion}} |
Latest revision as of 14:33, 13 July 2023
Available since: Gideros 2012.08.2
Class: TextureRegion
Description
Returns the coordinates of the region.
(number), (number), (number), (number), (number), (number), (number), (number) = TextureRegion:getRegion(baseCoordinates)
If transparent areas were trimmed during texture pack export, also reports the amount trimmed.
Parameters
baseCoordinates: (boolean) returns values in base (@1) size optional
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