Difference between revisions of "TextureRegion:getRegion"

From GiderosMobile
m
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
<languages />
+
'''Available since:''' Gideros 2012.08.2<br/>
'''<translate>Available since</translate>:''' Gideros 2012.08.2<br/>
+
'''Class:''' [[TextureRegion]]<br/>
'''<translate>Class</translate>:''' [[Special:MyLanguage/TextureRegion|TextureRegion]]<br/>
+
 
=== <translate>Description</translate> ===
+
=== Description ===
<translate><br />
+
Returns the coordinates of the region.
Returns the coordinates of the region.<br />
 
If transparent areas were trimmed during texture pack export, also reports the amount trimmed.
 
<br /></translate>
 
 
<source lang="lua">
 
<source lang="lua">
(number), (number), (number), (number), (number), (number), (number), (number) = TextureRegion:getRegion(baseCoordiniates)
+
(number), (number), (number), (number), (number), (number), (number), (number) = TextureRegion:getRegion(baseCoordinates)
 
</source>
 
</source>
=== <translate>Parameters</translate> ===
+
 
'''baseCoordiniates''': (boolean) <translate>Returns values in base (@1) size</translate> '''optional'''<br/>
+
If transparent areas were trimmed during texture pack export, also reports the amount trimmed.
=== <translate>Return values</translate> ===
+
 
'''<translate>Returns</translate>''' (number) <translate>x coordinate from texture</translate><br/>
+
=== Parameters ===
'''<translate>Returns</translate>''' (number) <translate>y coordinate from texture</translate><br/>
+
'''baseCoordinates''': (boolean) returns values in base (@1) size '''optional'''<br/>
'''<translate>Returns</translate>''' (number) <translate>width of region</translate><br/>
+
 
'''<translate>Returns</translate>''' (number) <translate>height of region</translate><br/>
+
=== Return values ===
'''<translate>Returns</translate>''' (number) <translate>left trim</translate><br/>
+
'''Returns''' (number) x coordinate from texture<br/>
'''<translate>Returns</translate>''' (number) <translate>top trim</translate><br/>
+
'''Returns''' (number) y coordinate from texture<br/>
'''<translate>Returns</translate>''' (number) <translate>right trim</translate><br/>
+
'''Returns''' (number) width of region<br/>
'''<translate>Returns</translate>''' (number) <translate>bottom trim</translate><br/>
+
'''Returns''' (number) height of region<br/>
 +
'''Returns''' (number) left trim<br/>
 +
'''Returns''' (number) top trim<br/>
 +
'''Returns''' (number) right trim<br/>
 +
'''Returns''' (number) bottom trim<br/>
  
 
{{TextureRegion}}
 
{{TextureRegion}}

Revision as of 21:14, 10 June 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