Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.05 KB

py5surface_set_resizable.md

File metadata and controls

46 lines (28 loc) · 1.05 KB

Py5Surface.set_resizable()

Set the Sketch window as resizable by the user.

Examples

def setup():
    surface = py5.get_surface()
    surface.set_resizable(True)


def draw():
    py5.square(py5.random(py5.width), py5.random(py5.height), 10)

Description

Set the Sketch window as resizable by the user. The user will be able to resize the window in the same way as they do for many other windows on their computer. By default, the Sketch window is not resizable.

Changing the window size will clear the drawing canvas. If you do this, the and variables will change.

This method provides the same functionality as .

Underlying Processing method: PSurface.setResizable

Signatures

set_resizable(
    resizable: bool,  # should the Sketch window be resizable
    /,
) -> None

Updated on March 06, 2023 02:49:26am UTC