q5play
    Preparing search index...

    Function displayDensity

    • 💻 Returns the current display density.

      On most modern displays, this value will be 2 or 3.

      Returns number

      display density

      await Canvas(200, 100);
      background(0.8);
      textSize(64);
      text(displayDensity(), -90, 6);