Multicolor bezier line

Post questions on how to use or achieve an effect in Inkscape.
pivic
Posts: 2
Joined: Sun May 19, 2013 12:30 am

Multicolor bezier line

Postby pivic » Sun May 19, 2013 12:40 am

Hello,

I have been looking for a while and I can't find a way to make it automatic.

Multicolor lines.png
Multicolor lines
Multicolor lines.png (8.22 KiB) Viewed 2949 times


I currently do the lines by hand and it takes ages so I would like to have an automatic way to draw those lines.
I have a pre defined list of colours (base colours and stripe colours) that I would like to pick from.

Is that something possible to do?

Thanks,
Alex

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

Re: Multicolor bezier line

Postby brynn » Sun May 19, 2013 12:56 am

Image
Welcome to InkscapeForum!

Do you mean the 2-color dashed lines? I think my 1st approach would be pattern along path. That failing (there could be distortions around acute angled curves), I might look at Fill and Stroke > Stroke Style > Dashes. If you had a solid color line of 1 color, below a dashed line of the other color, you could fairly well achieve what you want. However, to edit the line, you'd have to remember to select both paths at the same time. Grouping them might be 1 way to keep them together, but it really only facilitates moving the whole line. If you just need to move a node, you would either not group them, ungroup them, or group them and enter the group to make the node selection. To move a single node, you would really be moving the same node of each path. With the Node tool, select both paths, then drag a selection box around the pair of overlapping nodes. Thus, they move together, as if they were 1 single path. :D

pivic
Posts: 2
Joined: Sun May 19, 2013 12:30 am

Re: Multicolor bezier line

Postby pivic » Sun May 19, 2013 1:28 am

Thank you for your prompt reply !

Yes it is purely for two colour dashed lines.
I apply your method of dashed lines and it works fine !

- I draw a Bezier line :tool_pen:
- Change the colour by pressing Shift + colour (for the base)
- Ctrl + D to duplicated exactly the line
- Ctrl + Shift + F for the Fill and stroke menu
- Stroke style -> select the appropriate dashed line
- Change the colour by pressing Shift + colour (for the stripes)
- Job done
Don't need to group as I don't need to move them around

I looked at the patterns, to use a list of pre-defined base colours and stripe colours, but it seems over complicated and the result might not be as good.

I created also a palette for the bases and stripes colours in order to be consistent (total of twelve colours according to the Defence Standard 61-12 for Cables).

Thanks again!

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

Re: Multicolor bezier line

Postby Lazur » Sun May 19, 2013 2:14 am

Until a swap palette extension or multiple stroke path style comes out,
a way to fasten the style setting of the strokes are:

Draw paths with the style you want to use,
then select one of them that you want to apply on a stroke.
Press Ctrl+C, then select the line you want to change it's colour, and press Ctrl+Shift+V.

The most useful method for those multicolour lines is to draw them
from one solid one and a dashed line on top.

User avatar
flamingolady
Posts: 687
Joined: Wed Jun 10, 2009 1:40 pm

Re: Multicolor bezier line

Postby flamingolady » Sun May 19, 2013 5:53 am

If the output is ok to be rasterized, the I'd use a repeating gradient.

My biggest wish is for vector gradients, oh, Aladin, my dear genie - my first wish is for vector gradients in Inkscape - rub, rub, rub, and Shazam, wish granted? (LOL)

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

Re: Multicolor bezier line

Postby brynn » Sun May 19, 2013 12:07 pm

pivic wrote:I looked at the patterns, to use a list of pre-defined base colours and stripe colours, but it seems over complicated and the result might not be as good.

Oh no, when I mentioned pattern along path, those aren't the patterns that are used. Those are fill patterns. There's a way to make a custom pattern, and have it repeat in various ways. So you would have a short red path and a short yellow path, end to end, and then use pap to make it repeat.

But if you don't need to edit the lines, it sounds like the Dashes approach will be the best :D


Return to “Help with using Inkscape”