Difference between revisions of "FontBase:getAdvanceX"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
+ | <languages /> | ||
'''<translate>Available since</translate>:''' Gideros 2011.6<br/> | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> | ||
'''<translate>Class</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/> | '''<translate>Class</translate>:''' [[Special:MyLanguage/FontBase|FontBase]]<br/> |
Revision as of 09:57, 3 September 2018
Available since: Gideros 2011.6
Class: FontBase
Description
Returns the width of the first size characters of text.
Note that this value is not equal to the 3rd return value (width) of getBounds().
getBounds() returns a rectangle describing the bounds this string will cover
whereas getAdvanceX() returns the distance to where the next string should be drawn.
(number) = FontBase:getAdvanceX(text,letterSpacing,size)
Parameters
text: (string)
letterSpacing: (number, default = 0)
size: (number, optional)
Return values
Returns (number) The width of the first size characters of text.