love.window.toPixels
Converts a number from density-independent units to pixels.

The pixel density inside the window might be greater (or smaller) than the 'size' of the window. For example on a retina screen in Mac OS X with the highdpi window flag enabled, the window may take up the same physical size as an 800x600 window, but the area inside the window uses 1600x1200 pixels. love.window.toPixels(800) would return 1600 in that case.

This is used to convert coordinates from the size users are expecting them to display at onscreen to pixels. love.window.fromPixels does the opposite. The highdpi window flag must be enabled to use the full pixel density of a Retina screen on Mac OS X and iOS. The flag currently does nothing on Windows and Linux, and on Android it is effectively always enabled.

Most LÖVE functions return values and expect arguments in terms of pixels rather than density-independent units.
pixelvalue = love.window.toPixels( value )
value number A number in density-independent units to convert to pixels.
pixelvalue number The converted number, in pixels.
px, py = love.window.toPixels( x, y )
x number The x-axis value of a coordinate in density-independent units to convert to pixels.
y number The y-axis value of a coordinate in density-independent units to convert to pixels.
px number The converted x-axis value of the coordinate, in pixels.
py number The converted y-axis value of the coordinate, in pixels.