Want to taper the stroke at ends of path

Post questions on how to use or achieve an effect in Inkscape.
OneArmJim
Posts: 2
Joined: Thu Sep 20, 2018 3:07 am

Want to taper the stroke at ends of path

Postby OneArmJim » Thu Sep 20, 2018 4:07 am

I started drawing a body using the Curve/Line tool in Inkscape (Shift-F6) and decided to taper the square ends of the strokes like the ankle and knee in the left image below. I tried Taper Stroke in Path Effects and it tapered the ends perfectly (ankle, right image), but I lost the fill and can't get it back. Each method I've tried to fill the foot again now only affects the stroke.

Image Image

The foot is a separate layer from each toe and the lower leg, and I removed the segment between the two points on the foot by the ankle.

Does anyone have a method for me to get the tapered ends and keep the fill?

Thanks in advance for any help

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Want to taper the stroke at ends of path

Postby druban » Thu Sep 20, 2018 3:09 pm

The color layer needs to be a separate object, no stroke, fill only, and the tapered strokes are actually stroke shaped filled objects built from the stroke that you first drew, therefore they obviously can't be filled again. so short answer: two objects, one for the outline, one for the fill. Incidentally in the good old days this was how things always had to be done. Also there was no transparency. Gas however was only 80 cents a gallon.Cigarettes were actually free. Okay that last was only true during promotions
Your mind is what you think it is.

User avatar
Xav
Posts: 1209
Joined: Fri May 08, 2009 1:18 am
Location: UK
Contact:

Re: Want to taper the stroke at ends of path

Postby Xav » Thu Sep 20, 2018 5:37 pm

Unfortunately there's no way to actually vary the stroke width. This was a limitation of SVG1 - I think that variable width strokes made it through for SVG2, but may have been punted to 2.1, and certainly isn't supported by Inkscape yet.

The only workaround is therefore not to draw the outline as a stroke, but to draw it as a complex path in its own right, where the black of the outline is actually the fill on an unstroked path. This is what LPEs such as Taper Stroke and Power Stroke do. As Druban said, you need the fill to be a separate object - although it is possible to use the "Clone Original Path" LPE to achieve the same effect. See part 47 of my tutorials, here: viewtopic.php?f=6&t=11981 but also look at parts 66 & 67 as this functionality was changed (some might say "broken") in recent releases.

One other workaround is to apply a gradient to the path such that the ends appear to fade out. This can be a bit tricky to get right, depending on how the ends of your paths are positioned, as you can only use a single gradient that has to accommodate both ends without affecting the middle. It doesn't actually thin the stroke, but can give a similar visual effect, particularly for thin strokes.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

OneArmJim
Posts: 2
Joined: Thu Sep 20, 2018 3:07 am

Re: Want to taper the stroke at ends of path

Postby OneArmJim » Fri Sep 21, 2018 12:41 am

Thank you both for guiding a novice in the right direction. It's been a long time since I messed with graphics, and they were very basic by today's standards.

Cheers!


Return to “Help with using Inkscape”