jupyter-widgets-contrib / ipycanvas

Interactive Canvas in Jupyter
https://ipycanvas.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
685 stars 62 forks source link

Using Path2D for stroke #334

Open martinRenou opened 1 year ago

martinRenou commented 1 year ago

Discussed in https://github.com/martinRenou/ipycanvas/discussions/333

Originally posted by **BarbaraWebb** May 24, 2023 It seems like you can use Path2D as a shortcut to create paths only if you want to then draw it as a filled path, but not as a stroke? canvas.fill will take a path as an argument but canvas.stroke will not. If I want to draw a complex shape that shows only as a line drawing (and repeat that shape several times in different places) what is the best way to do it?