GetTextHeight: Difference between revisions
From Spring
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
=GetTextHeight() | [[Engine_Development|Development]] < [[Lua_Scripting|Lua Scripting]] < {{FULLPAGENAME}} | ||
=GetTextHeight() Illustrations= | |||
<span class="note">note: the returned heights are normalized, so you need to multiply them with your wanted fontSize</span> | <span class="note">note: the returned heights are normalized, so you need to multiply them with your wanted fontSize</span> | ||
'''GetTextHeight''' | '''GetTextHeight''' | ||
( string singlelined_text )-> number textHeight, number textDescender, number num_lines=1 | ( string singlelined_text ) -> number textHeight, number textDescender, number num_lines=1 | ||
[[Image:Gettextheight_singleline.png]] | [[Image:Gettextheight_singleline.png]] | ||
| Line 10: | Line 12: | ||
( string multilined_text ) -> number textHeight, number textDescender, number num_lines | ( string multilined_text ) -> number textHeight, number textDescender, number num_lines | ||
[[Image:Gettextheight_multiline.png]] | [[Image:Gettextheight_multiline.png]] | ||
[[Category: Lua]] | |||
Latest revision as of 19:27, 30 June 2010
Development < Lua Scripting < GetTextHeight
GetTextHeight() Illustrations
note: the returned heights are normalized, so you need to multiply them with your wanted fontSize
GetTextHeight
( string singlelined_text ) -> number textHeight, number textDescender, number num_lines=1
GetTextHeight
( string multilined_text ) -> number textHeight, number textDescender, number num_lines

