Py5Shape.stroke_join()#

Sets the style of the joints which connect line segments in a Py5Shape object.

Examples#

example picture for stroke_join()
 1def setup():
 2    s = py5.create_shape()
 3    s.begin_shape()
 4    s.no_fill()
 5    s.stroke_weight(10.0)
 6    s.stroke_join(py5.MITER)
 7    s.vertex(35, 20)
 8    s.vertex(65, 50)
 9    s.vertex(35, 80)
10    s.end_shape()
11
12    py5.shape(s)
example picture for stroke_join()
 1def setup():
 2    s = py5.create_shape()
 3    s.begin_shape()
 4    s.no_fill()
 5    s.stroke_weight(10.0)
 6    s.stroke_join(py5.BEVEL)
 7    s.vertex(35, 20)
 8    s.vertex(65, 50)
 9    s.vertex(35, 80)
10    s.end_shape()
11
12    py5.shape(s)
example picture for stroke_join()
 1def setup():
 2    s = py5.create_shape()
 3    s.begin_shape()
 4    s.no_fill()
 5    s.stroke_weight(10.0)
 6    s.stroke_join(py5.ROUND)
 7    s.vertex(35, 20)
 8    s.vertex(65, 50)
 9    s.vertex(35, 80)
10    s.end_shape()
11
12    py5.shape(s)

Description#

Sets the style of the joints which connect line segments in a Py5Shape object. These joints are either mitered, beveled, or rounded and specified with the corresponding parameters MITER, BEVEL, and ROUND. The default joint is MITER.

This method can only be used within a Py5Shape.begin_shape() and Py5Shape.end_shape() pair.

Underlying Processing method: PShape.strokeJoin

Syntax#

stroke_join(join: int, /) -> None

Parameters#

  • join: int - either MITER, BEVEL, ROUND

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