Comment 1 for bug 171366

Revision history for this message
Sean Gilligan (sean-msgilligan) wrote :

I have written some JavaScript which will examine a <path> element, determine if it is a valid polygon and convert it to a <polygon> element if possible. I wrote it so I can use InkScape to create and edit polygonal shapes, but I want my run-time code to operate on <polygon> elements.

It runs as a command line tool, using the Rhino JavaScript interpreter. It uses env.js to provide a browser-like DOM model and then operates on the SVG Dom.

I plan on making it available as part of an Open Source toolkit for processing SVG at build time. It could possibly be converted to an InkScape Scripting Extension. Let me know if there is any interest.