Clear the drawing surface by setting every pixel to black.
def setup(): py5.fill(255) py5.rect(5, 5, 40, 40) py5.clear() py5.rect(55, 55, 40, 40)
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
This method behaves differently than Py5Graphics.clear() because
Py5Graphics objects allow transparent pixels.
Underlying Processing method: clear
clear() -> None
Updated on March 06, 2023 02:49:26am UTC