Difference between revisions of "FontBase:getBounds"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
<br />
+
<translate><br />
Returns the tight bounding rectangle of the characters in the string specified by `text`.<br />
+
Returns the tight bounding rectangle of the characters in the string specified by [[[text]]].<br />
<br />
+
<br /></translate>
 
<source lang="lua">
 
<source lang="lua">
 
(number), (number), (number), (number) = FontBase:getBounds(text)
 
(number), (number), (number), (number) = FontBase:getBounds(text)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''text''': (string) <br/>
+
'''text''': (string) <translate></translate> <br/>
 
=== Return values ===
 
=== Return values ===
'''Returns''' (number) x coordinate of the bound<br/>
+
'''Returns''' (number) <translate>x coordinate of the bound</translate><br/>
'''Returns''' (number) y coordinate of the bound<br/>
+
'''Returns''' (number) <translate>y coordinate of the bound</translate><br/>
'''Returns''' (number) width of the bound<br/>
+
'''Returns''' (number) <translate>width of the bound</translate><br/>
'''Returns''' (number) height of the bound<br/>
+
'''Returns''' (number) <translate>height of the bound</translate><br/>

Revision as of 14:32, 23 August 2018

Available since: Gideros 2011.6

Description


Returns the tight bounding rectangle of the characters in the string specified by [[[text]]].

(number), (number), (number), (number) = FontBase:getBounds(text)

Parameters

text: (string)

Return values

Returns (number) x coordinate of the bound
Returns (number) y coordinate of the bound
Returns (number) width of the bound
Returns (number) height of the bound