Py5Shape.enable_style()#

Enables the shape’s style data and ignores py5’s current styles.

Examples#

example picture for enable_style()
def setup():
    global s
    # the file "bot.svg" must be in the data folder
    # of the current sketch to load successfully
    s = py5.load_shape("bot.svg")


def draw():
    s.disable_style()
    py5.shape(s, -30, 10, 80, 80)
    s.enable_style()
    py5.shape(s, 50, 10, 80, 80)

Description#

Enables the shape’s style data and ignores py5’s current styles. Styles include attributes such as colors, stroke weight, and stroke joints.

Underlying Processing method: PShape.enableStyle

Signatures#

enable_style() -> None

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