Name

windowRatio()

Description

Scale the sketch as if it fit this specific width and height. This will also scale the mouseX and mouseY variables (as well as pmouseX and pmouseY). Note that it will not have an effect on MouseEvent objects (i.e. event.getX() and event.getY()) because their exact behavior may interact strangely with other libraries.

Syntax

  • windowRatio(wide, high)

Parameters

  • wide(int)width of the sketch
  • high(int)height of the sketch

Return

  • void