OSSingleton.getScreenDpi

Returns the dots per inch density of the specified screen. If screen is /code-1/code (the default value), the current screen will be used. Note: On macOS, returned value is inaccurate if fractional display scaling mode is used. Note: On Android devices, the actual screen densities are grouped into six generalized densities:

More...
struct OSSingleton
@nogc nothrow const
long
getScreenDpi
(
in long screen = -1
)

Detailed Description

ldpi - 120 dpi mdpi - 160 dpi hdpi - 240 dpi xhdpi - 320 dpi xxhdpi - 480 dpi xxxhdpi - 640 dpi

Note: This method is implemented on Android, Linux, macOS and Windows. Returns 72 on unsupported platforms.

Meta