Difference between revisions of "FontBase:getBounds"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === <br /> Returns the tight bounding rectangle of the characters in the string specified by `text`.<br />...")
 
m (Text replacement - "</source>" to "</syntaxhighlight>")
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
 
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 +
'''Class:''' [[FontBase]]<br/>
 +
 
=== Description ===
 
=== Description ===
<br />
+
Returns the tight bounding rectangle of the characters in the string specified by ''text''.
Returns the tight bounding rectangle of the characters in the string specified by `text`.<br />
+
 
<br />
+
<syntaxhighlight lang="lua">
<source lang="lua">
+
(number), (number), (number), (number) = FontBase:getBounds(text)
(number) (number) (number) (number), = FontBase:getBounds(text,)
+
</syntaxhighlight>
</source>
+
 
'''text:''' (string) ''''''<br/>
+
=== Parameters ===
'''Returns''' (number) x coordinate of the bound<br/>
+
'''text''': (string) <br/>
'''Returns''' (number) y coordinate of the bound<br/>
+
 
'''Returns''' (number) width of the bound<br/>
+
=== Return values ===
'''Returns''' (number) height of the bound<br/>
+
'''Returns''' (number) x coordinate of the bound <br/>
 +
'''Returns''' (number) y coordinate of the bound <br/>
 +
'''Returns''' (number) width of the bound <br/>
 +
'''Returns''' (number) height of the bound <br/>
 +
 
 +
{{FontBase}}

Latest revision as of 14:29, 13 July 2023

Available since: Gideros 2011.6
Class: FontBase

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