height#

System variable that stores the height of the display window.

Examples#

example picture for height
def setup():
    py5.no_stroke()
    py5.background(0)
    py5.rect(40, 0, 20, py5.height)
    py5.rect(60, 0, 20, py5.height//2)

Description#

System variable that stores the height of the display window. This value is set by the second parameter of the size() function. For example, the function call size(320, 240) sets the height variable to the value 240. The value of height defaults to 100 if size() is not used in a program.

Underlying Processing field: height

Updated on September 01, 2022 16:36:02pm UTC