chalk-diagrams / chalk

A declarative drawing API in Python
MIT License
282 stars 13 forks source link

Move Path functionality to Located Trails #101

Closed srush closed 2 years ago

srush commented 2 years ago

In Diagrams a Path is a list of Located Trails with a compose monoid. To do this, I think the current Path functionality can be moved to Trail, with a .at() function to create a path.

image

While doing this, Trail should have a second argument that says whether it is a Closed, and a way to locate the trail separately. (In Haskell they do this in the type system, which seems like just showing off.)

(this is lo-pri, just noting so that we don't get out of sync with the main library).

srush commented 2 years ago

The Path with hole thing is neat. I wanted to create a ring the other day, but couldn't figure out how to make the inner part transparent.