Skip to content

Add Arc and Star computations to inkex helper functions

Closes #240 (closed)

This adds the path generation code for Inkscape arcs/chords/slices and stars/polygons from https://gitlab.com/inkscape/inkscape/-/blob/master/src/object/sp-ellipse.cpp#L418 and https://gitlab.com/inkscape/inkscape/-/blob/master/src/object/sp-star.cpp#L352. The implementation is basically a slimmed down port of the C++ code and should be equivalent up to rounding errors.

This means that the output for these objects generated by Inkex is correctly displayed in browsers and other viewers.

The unit tests cover the relevant cases of arc / star creation; the reference output is copied from Inkscape's XML editor.

2 Extensions that created arcs wrote the sodipodi:* attributes themselves; they now use the inkex function. Currently there is no extension that generates stars.

Edited by Jonathan Neuhauser

Merge request reports