Py5Shape.end_shape()#
This method is used to complete a custom shape created with the create_shape() function.
Examples#
def setup():
global s # the Py5Shape object
s = py5.create_shape()
s.begin_shape()
s.fill(0, 0, 255)
s.no_stroke()
s.vertex(0, 0)
s.vertex(0, 50)
s.vertex(50, 0)
s.end_shape()
def draw():
py5.shape(s, 25, 25)
Description#
This method is used to complete a custom shape created with the create_shape() function. It’s always and only used with create_shape().
Underlying Processing method: PShape.endShape
Signatures#
end_shape() -> None
end_shape(
mode: int, # Either OPEN or CLOSE
/,
) -> None
Updated on March 06, 2023 02:49:26am UTC