Py5Graphics.end_contour()#
Use the Py5Graphics.begin_contour() and end_contour()
methods to create negative shapes within shapes such as the center of the letter ‘O’.
Description#
Use the Py5Graphics.begin_contour() and end_contour()
methods to create negative shapes within shapes such as the center of the letter ‘O’. The Py5Graphics.begin_contour() method begins recording vertices for the shape and end_contour()
stops recording. The vertices that define a negative shape must “wind” in the opposite direction from the exterior shape. First draw vertices for the exterior shape in clockwise order, then for internal shapes, draw vertices counterclockwise.
These methods can only be used within a Py5Graphics.begin_shape() & Py5Graphics.end_shape() pair and transformations such as Py5Graphics.translate(), Py5Graphics.rotate(), and Py5Graphics.scale() do not work within a Py5Graphics.begin_contour() & end_contour()
pair. It is also not possible to use other shapes, such as Py5Graphics.ellipse() or Py5Graphics.rect() within.
This method is the same as end_contour() but linked to a Py5Graphics
object. To see example code for how it can be used, see end_contour().
Underlying Processing method: PGraphics.endContour
Signatures#
end_contour() -> None
Updated on March 06, 2023 02:49:26am UTC