Inkscape.org
Creating New Extensions New Calligraphic Pen extension
  1. #1
    billhails billhails @billhails

    Produces the effect of stroking a path with an oval nib

    https://github.com/billhails/Inkscape-Extensions

    Look in the calligraphic-pen folder.

    I won't repeat what it says in the documentation, but I completely failed to find out how to write tests, the Inkex documentation is pretty vague on that point and I couldn't find any examples in the Inkscape repo. Obviously I was looking in the wrong place so any pointers would be very welcome.

  2. #2
    Windell Oskay Windell Oskay @oskay

    The Inkscape Extensions repository ( https://gitlab.com/inkscape/extensions ) has tests for every extension that is part of the current set. You might look there as a starting point.

  3. #3
    billhails billhails @billhails

    Thanks!

  4. #4
    billhails billhails @billhails

    Still having trouble writing tests. The extension operates on selected paths. I have an input data/svg/calligraphic_pen_input.svg that I saved out of Inkscape with a path selected, but when I re-open it in Inkscape the path is no longer selected.

    Anyone got any ideas about how to preserve the selection in a saved file? Or do I need a different approach?

    A quick Google search didn't turn up anything.

  5. #5
    billhails billhails @billhails

    never mind, solved it by passing in an extra --test_path_id argument