🧪 Version 0.2.2 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for start_shape

Create a new shape. This is part of the reference section.

Purpose

Create a new shape which consists of multiple line or curve segments and which can be either open (stroke only) or closed (can be filled).

Snippet

Draw a shape which consists of a single line from x of 50 and y of 100 to x of 150 and y of 200.
shape = sketch.start_shape(50, 100)
shape.add_line_to(150, 200)
shape.end()
sketch.draw_shape(shape)

Parameters

  • x: The starting x position of the shape.
  • y: The starting y position of the shape.

Examples

Availability

Available for all platforms.

See also