Gets or sets the pixel density for high pixel density displays.
By default, the density will be set to 1.
Call this method with no arguments to get the default density, or pass in a number to set the density. If a non-positive number is provided, it defaults to 1.
Syntax
pixelDensity([density])
Parameters
density
Number:
A scaling factor for the number of pixels per side
Returns
Number: The current density if called without arguments, or the instance for chaining if setting density.
This page is generated from the comments in src/image/p5.Image.js . Please feel free to edit it and submit a pull request!