adjacent lines; using gradient relatively to the shape

Post questions on how to use or achieve an effect in Inkscape.
telandor
Posts: 3
Joined: Tue Sep 28, 2010 6:26 am

adjacent lines; using gradient relatively to the shape

Postby telandor » Tue Sep 28, 2010 6:40 am

Good evening

I have two problems:
1. I draw a shape "a" with the Bezier curve tool (Shift + F6). After that I want several other shapes around shape a. Each of these shapes follow partly the shape of shape a.
I tried to copy shape a and use Outset to get a bigger shape adjacent to shape a. Unfortunately it is very difficult to get the new shape exactly next to shape a (no white space between).
Is there an easier and better solution for this issue?

2. After drawing a shape I would like to fill it with a gradient turning into transparency, but relatively to the shape.
So the radial gradient does not work, because it is always the shape of a circle and not the shape of my shape.
Any ideas for this problem?

Thank you very much already in advance.
Best regards,
Telandor

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

Re: adjacent lines; using gradient relatively to the shape

Postby tomh » Tue Sep 28, 2010 9:22 am

1.
You can either use the align and distubute dialogue to align the shapes before using outset.

Or

use the duplicate button on the main toolbar (in the middle ish). This will duplicate the object (create a copy) in exactly the same place as the original.

2.
Sorry, but cannot be done I am afraid. The SVG standard does not support this ;-(

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

Re: adjacent lines; using gradient relatively to the shape

Postby tomh » Tue Sep 28, 2010 9:40 am

You may also find the "snap control bar" to be useful, under View->Show/Hide. When using this, I normally have enabled the
"snap to... nodes or handles, paths, path intersections, cusp nodes, and to/from path midpoints" options

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

Re: adjacent lines; using gradient relatively to the shape

Postby brynn » Tue Sep 28, 2010 10:14 am

I don't clearly understand #1, so can't comment. If tomh hasn't solved it, could you post a screen shot to show the? problem.
The 2nd one -- depending on the size of the object, sometimes a blur can do a pretty good job of simulating a gradient. But can't say for sure without seeing the situation.

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

Re: adjacent lines; using gradient relatively to the shape

Postby druban » Tue Sep 28, 2010 6:20 pm

1. unclear (to me) what you want...
2. use 'interpolate' from extensions menu. search this forum for more tips on using interpolate and the related 'interpolate subpaths' patheffect. After you have the multiplepaths you can fill each one or use interpolate attributes extension to fill them with the pseudo gradient...
Your mind is what you think it is.

telandor
Posts: 3
Joined: Tue Sep 28, 2010 6:26 am

Re: adjacent lines; using gradient relatively to the shape

Postby telandor » Wed Sep 29, 2010 12:30 am

Thank you very much for so many quick responses.

I attached a screenshot to clearify problem 1.
At the end I need different shapes, each following the border of another shape partly.
Attachments
ink.png
ink.png (16.86 KiB) Viewed 3211 times

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

Re: adjacent lines; using gradient relatively to the shape

Postby druban » Wed Sep 29, 2010 8:38 am

I think if you play with difference from the paths menu or even intersection or division you will get what you want quickly.
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: adjacent lines; using gradient relatively to the shape

Postby brynn » Wed Sep 29, 2010 10:36 am

You could use snapping to make them fit exactly, with no white space. You will probably have to adjust some node handles, to make them fit exactly. You would need to snap nodes to paths.

Re the gradient, you can make the gradient elliptical, as opposed to circular. It's still not going to follow the shape exactly, but might be closer than circular?

Edit -- oops, tomh already mentioned snapping :oops:

Edit #2 -- OH! What about making a mask for problem #2????

telandor
Posts: 3
Joined: Tue Sep 28, 2010 6:26 am

Re: adjacent lines; using gradient relatively to the shape

Postby telandor » Fri Oct 01, 2010 7:00 pm

When I use the booleans (difference etc.) then I get almost the shape I want.
Unfortunately I still have to adjust the path of one of the shapes because the two strokes cover each other.
As well I can snap a path to another path but I want to snap the border of the stroke to the border of another stroke.
The solutions are both ok, but even easier wouldn't do any harm :)
Isn't there an SVG command which says to create the stroke not on the path but from the path only inwards or outwards?
I couldn't find anything on the internet but I thought I have read about such a command once.

I haven't looked at the masks for #2 yet.

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

Re: adjacent lines; using gradient relatively to the shape

Postby druban » Sat Oct 02, 2010 2:34 pm

telandor wrote:When I use the booleans (difference etc.) then I get almost the shape I want.
Unfortunately I still have to adjust the path of one of the shapes because the two strokes cover each other.

If I understand you correctly, the solution to your problem is to NOT stroke your objects but FILL them with the colour you want for your stroke, then duplicate each one, and use the inset or dynamic offset to shrink the inner shape, then fill with white. admittedly this is a bit of a workaround, but for complex shapes it would be quite easier than node editing the border to match (and evn with node editing the border the rounding of strokes may result in small gaps between regions). if you don't want the shape to be opaque, then you can subtract (boolean difference - you're probably an expert booleanist by this point anyway) the interior shape from the underlying shape to regain your transparency. I think that will work for you...
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: adjacent lines; using gradient relatively to the shape

Postby brynn » Sun Oct 03, 2010 10:41 am

Isn't there an SVG command which says to create the stroke not on the path but from the path only inwards or outwards?

If I understand what you mean, this is a feature that has often been requested. For some reason, I'm thinking it's under development now, but I could be wrong about that. In any case, it is definitely on developers' radar because of many new feature requests, just no ETA yet.

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: adjacent lines; using gradient relatively to the shape

Postby ~suv » Sun Oct 03, 2010 12:27 pm

telandor wrote:At the end I need different shapes, each following the border of another shape partly.
telandor wrote:When I use the booleans (difference etc.) then I get almost the shape I want.
Unfortunately I still have to adjust the path of one of the shapes because the two strokes cover each other.
As well I can snap a path to another path but I want to snap the border of the stroke to the border of another stroke.
The solutions are both ok, but even easier wouldn't do any harm :)

Would you consider using a filter effect? Try 'Filters > Morphology > Inner outline'.

filter-Inner-outline-1-screenshot.png
filter-Inner-outline-1-screenshot.png (83.48 KiB) Viewed 3122 times
filter-Inner-outline-1.svg
(51.65 KiB) Downloaded 209 times

telandor wrote:Isn't there an SVG command which says to create the stroke not on the path but from the path only inwards or outwards?
I couldn't find anything on the internet but I thought I have read about such a command once.

Placing the stroke inward (or outward) is not possible in SVG 1.1 (current specification), but a future version of the specification might include something like the proposed vector effects, which afaiu could be used to align the stroke differently. (See also: Inkscape Wiki - SVG Working Group)

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

Re: adjacent lines; using gradient relatively to the shape

Postby brynn » Sun Oct 03, 2010 5:47 pm

For problem #2:
Interpolation?
Better than "mask" idea!

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


Return to “Help with using Inkscape”