Py5Shape.get_kind()#

Get the Py5Shape object’s “kind” number.

Examples#

example picture for get_kind()
 1# this is just a subset of the possible values
 2PY5SHAPE_KIND_VALS = {py5.Py5Shape.GROUP: 'GROUP',
 3                      py5.Py5Shape.ELLIPSE: 'ELLIPSE'}
 4
 5
 6def setup():
 7    s = py5.load_shape("bot.svg")
 8    for child in s.get_children():
 9        py5.println(PY5SHAPE_KIND_VALS[child.get_kind()])
10
11    py5.background(192)
12    py5.scale(0.25)
13    py5.shape(s, py5.width//2, py5.height//2)

Description#

Get the Py5Shape object’s “kind” number.

Underlying Processing method: PShape.getKind

Syntax#

get_kind() -> int

Updated on November 12, 2021 11:30:58am UTC