[solved] wide stroke on the clipping path?

Post questions on how to use or achieve an effect in Inkscape.
User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

[solved] wide stroke on the clipping path?

Postby brynn » Mon Oct 27, 2008 11:47 am

Hi Friends,
I have a star in which I've used the rounded stroke join style with a wide stroke, to make the points nicely rounded. I want to put a semi-transparent gradient on top of it, clipped to the outer edge of the stroke. Here's a sample image:

Image

On the left is the base star image. Center is the base image (which can't be seen at this point), plus a gradient (that I just threw together for this illustration), with the dark blue star, which is the actual clipping path, on top. On the right is the result of the clip. But I've lost my nicely rounded tips :(

I also tried Difference, but got the same result as clipping.

I know what's happening. It's using the path of the star, to do the clip and difference, rather than the stroke. My question, how to clip away the gradient and end up with the star PLUS the wider stroke, like the blue stars are shaped?

I also tried applying the same gradient to both fill and stroke. But again, the wider stroke trips me up. Here's an illustration:

Image

Because the gradient is partially transparent, the area of the stroke that falls inside the path sort of doubles the gradient over the fill area, creating sort of a framed effect.

I've tried to get the shape of star I want, using the Star tool, but I can't seem to get it right.

What I want is for the finished product, the gradient, to be shaped like the 2 light blue stars on the left, and like the dark blue star that I tried to use as the clipping path in the 1st example -- fill + stroke. How can I achieve that?

I'm thinking I could use Stroke to Path, to make the clipping path, but that alone won't do it. Then I'll have to fool around with nodes and stuff to get a solid fill. Is this the only way to do it? Otherwise, how can I achieve a clipping path that's shaped like the star WITH the wider, rounded stroke?

I know you wise and wonderful Inkscape folks will know some clever way to do exactly what I want :mrgreen: Thanks for your help :D

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: wide stroke on the clipping path?

Postby microUgly » Mon Oct 27, 2008 1:42 pm

brynn wrote:I'm thinking I could use Stroke to Path, to make the clipping path, but that alone won't do it. Then I'll have to fool around with nodes and stuff to get a solid fill. Is this the only way to do it? Otherwise, how can I achieve a clipping path that's shaped like the star WITH the wider, rounded stroke?

As you said, clips use the object path, there's no way around this. So converting stroke to path is the only option. Although, I don't understand why this is a problem if your stoke and fill is the same colour.

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: wide stroke on the clipping path?

Postby EarlyBlake » Mon Oct 27, 2008 4:25 pm

How about getting the star to the shape you want, then before you do the clip double the width of the stroke on the star? See if that gives you the size you are looking for.

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

Re: wide stroke on the clipping path?

Postby brynn » Mon Oct 27, 2008 7:08 pm

How about getting the star to the shape you want, then before you do the clip double the width of the stroke on the star? See if that gives you the size you are looking for.

It doesn't seem to matter how wide the stroke is; it's clipped to the path, which no matter how wide the stroke is, the path remains the same.
Although, I don't understand why this is a problem if your stoke and fill is the same colour.

Because if I do Stroke to Path and nothing else, I get this:
Image
I still have to node edit to make it solid.

But fortunately, I know how to node edit :D I'm just curious if there is another, easier way.

Thanks for your input, guys :D

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: wide stroke on the clipping path?

Postby microUgly » Mon Oct 27, 2008 7:15 pm

brynn wrote:But fortunately, I know how to node edit :D I'm just curious if there is another, easier way.

Not that I can think of. But the quickest way to make that shape solid again is to use "Break Apart" and then delete the smaller star it produces.

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

Re: wide stroke on the clipping path?

Postby brynn » Mon Oct 27, 2008 7:25 pm

Geez, that was a fast reply, micro!

Oh, Break apart -- I had not thought of that. I knew there must be something easier, lol!

Thanks again, micro :D

User avatar
kelan
Posts: 178
Joined: Thu Sep 06, 2007 12:55 am
Location: Unicorn of Open Source
Contact:

Re: wide stroke on the clipping path?

Postby kelan » Tue Oct 28, 2008 4:10 am

Good news! Clips ignore the stroke, but masks don't. It's part of the SVG spec. So just make a mask with a fully white object (both fill and stroke), and it'll work like you want.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: wide stroke on the clipping path?

Postby Simarilius » Tue Oct 28, 2008 7:15 am

microUgly wrote:
brynn wrote:But fortunately, I know how to node edit :D I'm just curious if there is another, easier way.

Not that I can think of. But the quickest way to make that shape solid again is to use "Break Apart" and then delete the smaller star it produces.


Quicker still is to do a boolean add on it (so Ctrl+shift+k, then Ctrl+ +)


Return to “Help with using Inkscape”