Py5 Functions#

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

Examples#

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

frame = 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 01, 2022 16:36:02pm UTC