clear()#
Clear the drawing surface by setting every pixel to black.
Examples#
def setup():
py5.fill(255)
py5.rect(5, 5, 40, 40)
py5.clear()
py5.rect(55, 55, 40, 40)
Description#
Clear the drawing surface by setting every pixel to black. Calling this method is the same as passing 0
to the background() method, as in background(0)
.
This method behaves differently than Py5Graphics.clear() because Py5Graphics
objects allow transparent pixels.
Underlying Processing method: clear
Signatures#
clear() -> None
Updated on March 06, 2023 02:49:26am UTC