Py5Shape.get_kind()#

Get the Py5Shape object’s “kind” number.

Examples#

example picture for get_kind()
# this is just a subset of the possible values
PY5SHAPE_KIND_VALS = {py5.Py5Shape.GROUP: 'GROUP',
                      py5.Py5Shape.ELLIPSE: 'ELLIPSE'}


def setup():
    s = py5.load_shape("bot.svg")
    for child in s.get_children():
        py5.println(PY5SHAPE_KIND_VALS[child.get_kind()])

    py5.background(192)
    py5.scale(0.25)
    py5.shape(s, py5.width//2, py5.height//2)

Description#

Get the Py5Shape object’s “kind” number.

Underlying Processing method: PShape.getKind

Signatures#

get_kind() -> int

Updated on September 01, 2022 16:36:02pm UTC