line in stroke gradient

Post questions on how to use or achieve an effect in Inkscape.
ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

line in stroke gradient

Postby ait » Sat Oct 25, 2014 6:19 am

hello
I created a stroke outline and made it a gradient, however you'll see in the picture (black outline around part I'm talking about) there is a line or rather a division in the middle of the stroke.

it's almost like I have two strokes?

what am I doing wrong?

[I ultimately want one smooth transition of color in the stroke around the picture]
thanks
a
Attachments
line.png
line.png (180.69 KiB) Viewed 3852 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: line in stroke gradient

Postby Lazur » Sat Oct 25, 2014 6:50 am

You have an object with a semi-transparent stroke.
Below the fill -pattern (?)- shows up, and, the blue background.

That is intentional.
If you want to avoid that, make the gradient fully opaque.

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Sat Oct 25, 2014 6:54 am

you think I have a stroke on the circle with the people?

How would I know?

Also, how do I make the gradient opaque?
thanks
a

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Sat Oct 25, 2014 6:58 am

I tried with just a plain circle and a stroke...then tried to set a gradient...I'm still getting that line...
I guess I'm still confused
Attachments
greenci.png
greenci.png (18.14 KiB) Viewed 3843 times

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: line in stroke gradient

Postby Lazur » Sat Oct 25, 2014 7:12 am


tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: line in stroke gradient

Postby tylerdurden » Sat Oct 25, 2014 12:35 pm

Keep in mind, a stroke has the path in the center...
StrokeAlpha.jpg
StrokeAlpha.jpg (44.7 KiB) Viewed 3808 times


Please download svg and open in Inkscape.
StrokeOpacity.svg
(9.36 KiB) Downloaded 283 times
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

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

Re: line in stroke gradient

Postby Xav » Sat Oct 25, 2014 7:06 pm

Yes, as Tylerdurden pointed out, the width of a stroke is split evenly on each side of the path it strokes. So a 2px stroke will have 1px of its width "inside" the object, and 1px "outside" it. So for a thick stroke like the one you've used, you end up with a large "inside" part.

SVG2 will include a method of altering the paint order, so that the stroke is drawn behind the content rather than in front of it, which would hep you out in this situation. We're a long way off SVG2 being ratified and such features making their way into Inkscape, though.

Until then the only practical option is to draw your stroke as a separate object and put it behind the image. You'll need to reduce the size of the image and/or increase the thickness of the stroke to compensate for the fact that the image is now obscuring half of it. Once you've done that, group the objects so you can still move them as one.
Co-creator of The Greys and Monsters, Inked - Inkscape drawn webcomics
Web SiteFacebookTwitter

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Mon Oct 27, 2014 10:54 pm

Hello Xav and Tylerdurden...
thank you for your replies...I'm STILL not sure I understand...I know, I know...you both have explained this well but I'm still not sure how to get the gradient smooth..


aslo, I don't understand how/why the stroke would overlap onto the object...?

Also, I've not heard of SVG2, (as compared to SVG).. I'll have to look that up...
thanks
a

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Mon Oct 27, 2014 11:01 pm

update---
So...it seems if I set the gradient on the stroke first and have No Fill to the shape and then AFTER then fill the inside with my pattern (from a picture) I can have a smooth gradient on the stroke.

I'm not sure I understand why this works but it seems to...although the question will be if I can reproduce the effect or not..
a
Attachments
goodst.png
goodst.png (146.79 KiB) Viewed 3745 times

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Mon Oct 27, 2014 11:05 pm

FYI-nope...after trying this a second time...I'm not successful, which tells me I really don't understand what's going on. My success before was just a fluke..damn.
Last edited by ait on Mon Oct 27, 2014 11:43 pm, edited 1 time in total.

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Mon Oct 27, 2014 11:32 pm

so after some more playing I've come to realize my problem has something to do (maybe) with the gradient. sometimes my gradient is set to blend to a solid color and other times set to blend to transparent (see picture). you'll see near the top the gradients go to translucent (red square) and then some go to a solid color (green square).

So my question is now, how do I make sure I'm setting the gradient to blend to a solid color? (and not transparent)
thanks
a
Attachments
gradeint1.png
gradeint1.png (5.88 KiB) Viewed 3737 times

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: line in stroke gradient

Postby tylerdurden » Mon Oct 27, 2014 11:44 pm

When you set the stroke color, the status bar (lower left corner) will indicate the gradient.

http://tavmjong.free.fr/INKSCAPE/MANUAL ... eIndicator

Image


If the gradient has a transparency (alpha), you can edit the gradient.

http://tavmjong.free.fr/INKSCAPE/MANUAL ... ine-Editor

Image
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

ait
Posts: 138
Joined: Wed Apr 30, 2014 2:13 am

Re: line in stroke gradient

Postby ait » Tue Oct 28, 2014 12:49 am

this helps
thank you..
I have another question on gradients but at this point I'll post a new question as I'm getting away from my original question..
thanks
a


Return to “Help with using Inkscape”