{{newin (日本語)|[[0.10.0 (日本語)|0.10.0]]|100|type=関数}}
Gets the width of the text in pixels.

== 関数 ==
=== 概要 ===
<source lang="lua">
width = Text:getWidth( )
</source>
=== 引数 ===
なし。
=== 返値 ===
{{param (日本語)|number|width|The width of the text. If multiple sub-strings have been added with [[Text:add]], the width of the last sub-string is returned.}}

== 関数 ==
Gets the width of a specific sub-string that was previously added to the Text object.
=== 概要 ===
<source lang="lua">
width = Text:getWidth( index )
</source>
=== 引数 ===
{{param (日本語)|number|index|An index number returned by [[Text:add]] or [[Text:addf]].}}
=== 返値 ===
{{param (日本語)|number|width|The width of the sub-string (before scaling and other transformations).}}

== 関連 ==
* [[parent::Text (日本語)]]
* [[Text:getHeight (日本語)]]
* [[Text:set (日本語)]]
* [[Text:setf (日本語)]]
* [[Text:add (日本語)]]
* [[Text:addf (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Gets the width of the text.}}
== そのほかの言語 ==
{{i18n (日本語)|Text:getWidth}}