Py5Shape.disable_style()#

Disables the shape’s style data and uses py5’s current styles.

Examples#

example picture for disable_style()
 1def setup():
 2    global s
 3    # the file "bot.svg" must be in the data folder
 4    # of the current sketch to load successfully
 5    s = py5.load_shape("bot.svg")
 6
 7
 8def draw():
 9    s.disable_style()
10    py5.shape(s, -30, 10, 80, 80)
11    s.enable_style()
12    py5.shape(s, 50, 10, 80, 80)

Description#

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

Underlying Processing method: PShape.disableStyle

Syntax#

disable_style() -> None

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