Duplicating gradients

Post questions on how to use or achieve an effect in Inkscape.
Bayne7096
Posts: 18
Joined: Sat Nov 24, 2012 12:01 am

Duplicating gradients

Postby Bayne7096 » Wed Dec 05, 2012 5:45 pm

Okay I want to keep this real simple because I know, intrinsically it probably is.

I have a shape. I have applied a linear gradient to it. I need for it to have a stroke that doesn't show, so I want the stroke to be the exact same gradient I have applied to the shape fill.

I am so confused by the gradient tool box and all the presets and everything. I have watched a few tutorials but I honestly feel like mine is acting strange and not selecting or applying things to where I want them to go. I'm not an inkscape whiz but I'm not stupid either. I know this is probably quite simple, but if it could just be broken down into lamens terms that would be great.

Thanks in advance.

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: Duplicating gradients

Postby ragstian » Wed Dec 05, 2012 6:05 pm

Hi.


You can "hide" the stroke by selecting "No paint" in the Fill And Stroke menu or by rightclicking on the "X" in the lower left corner of the Inkscape window and clicking "Set stroke".

(You can also set the stroke paint to be 100% transparent but this is always confusing me later.)

Good Luck.
RGDS Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Bayne7096
Posts: 18
Joined: Sat Nov 24, 2012 12:01 am

Re: Duplicating gradients

Postby Bayne7096 » Wed Dec 05, 2012 6:52 pm

I understand that, but I am in a situation where I would like to thicken up the shapes in the position they are in without looking like they have an outline. That's essentially my predicament.

User avatar
tomh
Posts: 218
Joined: Sat Feb 14, 2009 10:14 pm

Re: Duplicating gradients

Postby tomh » Thu Dec 06, 2012 12:15 am

If your gradients are solid i.e. they do not contain transparencies, then you can assign the stroke the same gradient.

1) Select object.
2) Open fill and stroke dialogue
3) Under Stroke Paint, select gradient option, select the same gradient as the fill paint uses.
4) Done.

The reason this does not work with gradients with transparencies is because the stroke pain is centred on the paths outline, see: http://tavmjong.free.fr/INKSCAPE/MANUAL ... troke.html fig 2 for example, and this causes a more opaque region where they overlap.

v1nce
Posts: 696
Joined: Wed Jan 13, 2010 4:36 am

Re: Duplicating gradients

Postby v1nce » Thu Dec 06, 2012 1:06 am

Off topic:
tomh wrote:The reason this does not work with gradients with transparencies is because the stroke pain is centred on the paths outline, see: http://tavmjong.free.fr/INKSCAPE/MANUAL ... troke.html fig 2 for example, and this causes a more opaque region where they overlap.


which is quite stupid.

and expected to change (9 years after proposal !)
https://svgwg.org/svg2-draft/painting.html#SpecifyingStrokePaint annotation 3

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

Re: Duplicating gradients

Postby druban » Thu Dec 06, 2012 3:32 pm

Bayne7096 wrote:I understand that, but I am in a situation where I would like to thicken up the shapes in the position they are in without looking like they have an outline. That's essentially my predicament.

There is a great deal to be said about stroke implementation in SVG but in cases like yours, the bottom line is, until SVG is updated to make stroke position changeable, the safest thing to do is to duplicate the path, do a stroke to path, union old and new paths, and then give it the gradient as a fill and remove the stroke. No alignment or transparency problems.
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Duplicating gradients

Postby brynn » Thu Dec 06, 2012 11:42 pm

My first comment is that there are other ways to make an object a little larger. Adding or adjusting the width of the stroke is one way. But there are others, which we could certainly address, if you like.

The current Gradient Editor is said to be deprecated by some developers (if not all) and is slated to be dropped. I've been told that by developers, a couple of years ago. Since the Gradient Editor is still with us, I'm starting to wonder whether they've changed their minds. But what I wanted to say is that you can make a gradient without using the Gradient Editor at all. (Although adding a new gradient stop without the editor can be troublesome.)

If you add the gradient the way tomh suggests, the gradient will automatically be placed with the handle lying horizontally -- begin stop at left edge of object, end stop on right, and centered from top to bottom. Unless you're using a radial gradient. Then the start stop is in the center, and the 2 end stops are at the top and right edges of the object. If you're using a radial gradient, and you haven't moved it, tomh's instructions will work perfectly. But I find that very seldom do I need a gradient with the default placement. So if you've moved the fill's radial gradient handle, or you're using a linear gradients that aren't left to right, you'll need to do another couple of steps.

Set the gradient for the fill, with handles where you want. Switch to Fill and Stroke > Stroke paint and apply the same gradient to the stroke. Now, when you switch to the Gradient tool, you'll see both handles. You'll see the one for the fill as you set it, but the one for the stroke is straight left to right (assuming linear). Grab one end of the stroke gradient handle and drag it over to the same end of the fill gradient. When it gets close enough to the other handle, the handle that you're dragging will jump right off your mouse, and snap to the fill handle (whether you have snapping enabled or not!). Just in case, you can hold Shift to drag them apart, if you need to. Otherwise, they will move together until you separate them. Then do the same for the other end of the stroke gradient handle. And if it's a radial gradient, you''ll have a 3rd handle to move :D

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

Re: Duplicating gradients

Postby druban » Fri Dec 07, 2012 5:58 am

If you look at the Google+ site you will see that there's no need to say that the developers are not working on the gradient dialog and that they have been doing so all along; if you ever do look at the development/alpha releases you would note that not only do they have a much more usable and interactive gradient tool, they also have the option to use the 'legacy' gradient editor just in case you are attached to it.
If you are on the Google+ site you can also ask A. Prokoudine questions about the current state of many features and he responds quickly and clearly. (I'm not sure if moderators in this forum have banned him fom posting here, (if that was someone else, no offense intended to you, Mr. Prokoudine!) so perhaps Google+ is the only way to see the progress of the next version.
Your mind is what you think it is.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Duplicating gradients

Postby brynn » Fri Dec 07, 2012 8:21 am

Yeah, I may have not used the right words to explain it. I apologize. The gradient editor in the current version is deprecated and doomed. So taking the time to learn how to use it, will be wasted time, before too long. I had seen new gradient editors proposed, but I did not know they were officially woking on a new one.

I could....probably....show you the message about deprecated and doomed, if I still have it....I should. It was from bulia-byak (or something like that). And if they really are making a new one, then I have several suggestions which were shot down as unnecessary, for reasons I've just mentioned, 2 or 3 years ago! Maybe I'll try posting a new "bug report" feature request?

Off topic:
I don't know of anyone, and certainly no one of prodoudine's caliber, who was a long time member and recentlly banned! To my knowledge, the only bannings on this site are due to spam. Although there may someday be someone who breaks a forum rule, and badly enough to deserve banning. But for established members, banning occurs extremely rarely (and to my knowledge, at this forum, never).

Unless one subscribes the dev mailing list, I don't know any other way to get dev news, except the google+ site. prodoudine does post info from time to time, usually in News subforum. But there's much more news at google+. (that's why I took your suggestion and put it in my sig) I would visit there more often if it was a little more active. Insead I try to visit once a month. I've been busy on other things lately, so I haven't visited in awhile. But thanks for posting that druban :D

PS - I'll ask micro about putting a link to google+ site....somewhere on the forum, hopefully index page.


All best :D

Edit
Here we go: https://bugs.launchpad.net/bugs/243409
and https://bugs.launchpad.net/bugs/243396

Maybe I could just reactivate those....will investigate :D


Return to “Help with using Inkscape”