Difference between revisions of "FontBase:getBounds"

From GiderosMobile
m (Text replacement - "<source" to "<syntaxhighlight")
Line 5: Line 5:
 
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''.
  
<source lang="lua">
+
<syntaxhighlight lang="lua">
 
(number), (number), (number), (number) = FontBase:getBounds(text)
 
(number), (number), (number), (number) = FontBase:getBounds(text)
 
</source>
 
</source>

Revision as of 15:28, 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.

<syntaxhighlight lang="lua"> (number), (number), (number), (number) = FontBase:getBounds(text) </source>

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