mathandy / svgpathtools

A collection of tools for manipulating and analyzing SVG Path objects and Bezier curves.
MIT License
557 stars 142 forks source link

Add tooltips and hyperlinks #157

Closed TrevorGrout-NOAA closed 3 years ago

TrevorGrout-NOAA commented 3 years ago

If I wanted to add a tooltip or a hyperlink, how would I accomplish this?

mathandy commented 3 years ago

Hi @TrevorGrout-NOAA, I unlocked the wiki, you can post it there. Is that what you were looking for?

https://github.com/mathandy/svgpathtools/wiki

TrevorGrout-NOAA commented 3 years ago

Sorry, I may have worded that poorly. Is it currently possible to open an existing svg and insert a tooltip (a popup when you hover) and hyperlinks? Using svgwrite adding a tooltip is accomplished here:

https://svgwrite.readthedocs.io/en/latest/classes/base.html#svgwrite.base.BaseElement.set_desc

Thanks

mathandy commented 3 years ago

The wsvg() function has some basic functionality for inserting text, see the text, text_path, and font_size arguments. You could also use the (not so well documented) Document class for a more robust solution.