Fill calligraphy outlined shapes automatically
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
G33K wrote:
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.
You are reiterating a reasonably common request. I don't know that an extension is the best way to do this. John Bintz implemented the bucket fill tool to solve this problem for his particular usecase, but that involved filling spaces between more than one stroke. At about the same time (I think it was) John Cliff, aka simarilius implemented a patch for the caligraphy tool that created a dummy fill shape for each stroke. I don't believe this patch was ever accepted but you can probably find information about it from the patch tracker or in the list archives. I would like to see the calligraphy tool reframed in terms of the live path effects architecture. This could potentially allow for repositioning calligraphic strokes after the fact and dynamically creating a fill path. I don't have a solution for you, but hopefully this gives you more background and gets the conversation going.
(I posted this to the user list when I realized that it is probably more of a development question. Sorry for the double post.)
No problem!
Aaron Spike
participants (2)
-
Aaron Spike
-
G33K