{{newin (日本語)|[[11.0 (日本語)|11.0]]|110|type=メソッド}}
Gets the width in pixels of the Texture.

[[Texture:getWidth]] gets the width of the texture in units scaled by the texture's [[Texture:getDPIScale|DPI scale factor]], rather than pixels. Use getWidth for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelWidth only when dealing specifically with pixels, for example when using [[Canvas:newImageData]].
== 関数 ==
=== 概要 ===
<source lang="lua">
pixelwidth = Texture:getPixelWidth( )
</source>
=== 引数 ===
なし。
=== 返値 ===
{{param (日本語)|number|pixelwidth|The width of the Texture, in pixels.}}
== 関連 ==
* [[parent::Texture (日本語)]]
* [[Texture:getDPIScale (日本語)]]
* [[Texture:getPixelHeight (日本語)]]
* [[Texture:getPixelDimensions (日本語)]]
[[Category:Functions (日本語)]]
{{#set:Description=Gets the width in pixels of the Texture.}}
== そのほかの言語 ==
{{i18n (日本語)|Texture:getPixelWidth}}