Py5Shape.stroke_join()

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

Examples

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

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

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

    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 Java method: PShape.strokeJoin

Syntax

stroke_join(join: int, /) -> None

Parameters

  • join: int - either MITER, BEVEL, ROUND

Updated on September 11, 2021 16:51:34pm UTC