Available since LÖVE 11.0 |
This function is not supported in earlier versions. |
Gets the width and height in pixels of the window.
love.graphics.getDimensions gets the dimensions of the window in units scaled by the screen's DPI scale factor, rather than pixels. Use getDimensions for calculations related to drawing to the screen and using the graphics coordinate system (calculating the center of the screen, for example), and getPixelDimensions only when dealing specifically with underlying pixels (pixel-related calculations in a pixel Shader, for example).
pixelwidth, pixelheight = love.graphics.getPixelDimensions( )
None.
number pixelwidth
number pixelheight