Py5 Functions#

The py5 Functions are extra utility functions that make py5 easier to use.

Examples#

1py5.create_font_file('Comic Sans', 20)
1sketch = py5.get_current_sketch()
2assert sketch.is_ready
3py5.run_sketch(block=False)
4assert sketch.is_running
5py5.exit_sketch()
6assert sketch.is_dead
1@py5.render(400, 200)
2def draw_message(s: py5.Sketch):
3    s.background(255)
4    s.fill(255, 0, 0)
5    s.text_size(20)
6    s.text_align(s.CENTER, s.CENTER)
7    s.text('hello world', s.width/2, s.height/2)
8
9frame = draw_message()

Description#

The py5 Functions are extra utility functions that make py5 easier to use. For example, you can use these to Processing’s vlw font files without having to use Processing’s IDE.

The following functions are provided:

Updated on September 16, 2021 14:31:43pm UTC