Hi everyone,
I'd like to use the calligraphy tool to draw outlines for a shape, and want to fill the initially transparent interior of that outline with a different color. The only solution I've found so far is to apply the "break apart" command, then select the inner shape and change its color manually. That's a lot of steps, which stops the flow of drawing.
I've already found this extension which tries to solve the problem:
http://wiki.inkscape.org/wiki/index.php/CalligraphedOutlineFill
To lessen the number of manual steps, I'd like to automatically apply some similar logic after each calligraphy stroke, so that a calligraphy outline's inner shape can be filled immediately if it's drawn in one stroke. I think the following steps might suffice:
* After a calligraphy brush stroke, apply "break apart" to the resulting object. * If the result is only one shape, then the calligraphy path isn't closed. * If there are several shapes, the one with the largest bounding box is the outline, all others are enclosed inner shapes and are filled in a different color.
You could even maintain a history of successive calligraphy strokes, or search the object stack, until the "break apart" command produces more than one shape.
My questions:
* Is it somehow possible to automatically execute an extension like that after each calligraphy stroke? * Or is there a way to code this into Inkscape itself? * If yes, what would be the API calls for "break apart", and where would I have to insert that code to get it executed after a completed clligraphy stroke? * Is there maybe a similar extension or drawing tool feature that I could use as a model?
(I posted this to the user list when I realized that it is probably more of a development question. Sorry for the double post.)
Best regards, Gerrit