Py5Graphics.end_draw()#

Finalizes the rendering of a Py5Graphics object so that it can be shown on screen.

Examples#

 1def setup():
 2    global pg
 3    py5.size(200, 200, py5.P2D)
 4    pg = py5.create_graphics(80, 80, py5.P2D)
 5    pg.begin_draw()
 6    pg.background(102)
 7    pg.stroke(255)
 8    pg.line(20, 20, 80, 80)
 9    pg.end_draw()
10
11
12def draw():
13    py5.image(pg, 10, 10)

Description#

Finalizes the rendering of a Py5Graphics object so that it can be shown on screen.

Underlying Processing method: PGraphics.endDraw

Syntax#

end_draw() -> None

Updated on March 22, 2022 21:53:01pm UTC