{{newin|[[11.0]]|110|type=function}}
Gets the width in pixels of the window.

The graphics coordinate system and [[love.graphics.getWidth]] use units scaled by the screen's [[love.graphics.getDPIScale|DPI scale factor]], rather than raw pixels. Use getWidth for calculations related to drawing to the screen and using the coordinate system (calculating the center of the screen, for example), and getPixelWidth only when dealing specifically with underlying pixels (pixel-related calculations in a pixel [[Shader]], for example).
== Function ==
=== Synopsis ===
<source lang="lua">
pixelwidth = love.graphics.getPixelWidth( )
</source>
=== Arguments ===
None.
=== Returns ===
{{param|number|pixelwidth|The width of the window in pixels.}}
== See Also ==
* [[parent::love.graphics]]
* [[love.graphics.getPixelHeight]]
* [[love.graphics.getPixelDimensions]]
[[Category:Functions]]
{{#set:Description=Gets the width in pixels of the window.}}
{{#set:Sub-Category=Window}}
== Other Languages ==
{{i18n|love.graphics.getPixelWidth}}