# display_density()
This function returns the number "2" if the screen is a high-density screen (called a Retina display on macOS or high-dpi on Windows and Linux) and a "1" if not.
## Examples
## Description
This function returns the number "2" if the screen is a high-density screen (called a Retina display on macOS or high-dpi on Windows and Linux) and a "1" if not. This information is useful for a program to adapt to run at double the pixel density on a screen that supports it.
Underlying Processing method: [displayDensity](https://processing.org/reference/displayDensity_.html)
## Signatures
```python
display_density() -> int
display_density(
display: int, # the display number to check (1-indexed to match the Preferences dialog box)
/,
) -> int
```
Updated on December 27, 2023 13:47:02pm UTC