✨ Support added for LLM AI asisstants. See details!

Sketchingpy

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

Reference for get_min_x

Determine the minimum x coordinate of a shape. This is part of the reference section.

Purpose

Determine the minimum x coordinate (relative to start position) that this shape may reach to. This includes bezier control points but does not try to include stroke weight in its calculation. Requires the shape to be finished (via end or close); raises an error otherwise.

Snippet

Inspect a closed shape.
shape = sketch.start_shape(50, 100)
shape.add_line_to(150, 200)
shape.add_line_to(150, 250)
shape.close()
print(shape.get_min_x())

Availability

Available for all platforms.

See also