Copy link to clipboard
Copied
Hi everyone,
is there a way to adjust the length of a stroke along a path? Probably not.
The transform effect can't do this, while it is possible with gradients (see ascreenshot), but this is a workaround.
Any advice?
Thank you
Andreas
Copy link to clipboard
Copied
erdteil,
As I (mis)understand it, how about Dashed Line with the desired length as the first Dash and a Gap of (at least) the remaining length, to avoid a new Dash?
You can set the unit as desired in the Dash and Gap boxes added after the length to avoid the default pt (add in for inches or similar).
Keeping the Butt Cap, of course.
Copy link to clipboard
Copied
Thank you, Jacob, I will give it a try.
Copy link to clipboard
Copied
This works for me. It is of all workarounds the most convenient.
Copy link to clipboard
Copied
Andreas,
That is an ingenious use of the Dashed Line way; I was unaware of your wish to fill the path with different colours.
Since you mention percentages:
If you wish to fill a path with different colours making up certain percentages of the total length, and to be able to easily adjust these percentages, you can also use an Art Brush as follows (working in points here):
1) Create a rectangle corresponding to the first colour, with W = assumed percentage (10pt for 10% and similar) and with H = 1pt, and give it the desired colour, for convenience you can move it to start at X = Y = 0;
For the rest of the colours:
2) Move a copy of the previous rectangle to the right by its width, then change width and colour;
Now you have a set of rectangles spanning 100pt corresponding to 100% of the length;
3) Make the set of rectangles a new Art Brush with the default settings (Brushes palette);
After this, you can create a path with the desired width and apply the new Art Brush to it.
If you wish to adjust the colours/percentage lengths, I believe the most convenient way is to go back to the original set of rectangles and work on a copy of that (you can just change the Y value).
The adjustment of lengths can be done in different ways, here are a few:
You can then make a new Art Brush, in addition to or replacing the previous one(s), and apply it to the path (or another path). You can compare different versions to decide the best one.
Edit: Hi Ton. I can see that I had left for much longer before finishing than I realized.
Here, after a non winter that was like autumn, followed by a non spring that was like switches beween autumn and winter, we now have the beginning of a non summer that is like spring.
Copy link to clipboard
Copied
Thank you, Jacob, great method.
I also discovered the Art Brush works with Dashed Line, which is great. However, the Scatter Brush does not, which is frustrating. Why are there so many incompatibilities between the individual features? No one knows.
Copy link to clipboard
Copied
For my part you are welcome, Andreas.
Copy link to clipboard
Copied
What is the purpose of your request?
Also, which version of Illustrator are you using?
Copy link to clipboard
Copied
To create multicolored paths. Latest version.
Copy link to clipboard
Copied
They are all workarounds. Gradients along a stroke or pattern brush.
Copy link to clipboard
Copied
Thank you, Ton, the gradient method I showed above, and the pattern brush, yes, I am also familiar with. However, as you mentioned, these are workarounds—with few options (or they are just cumbersome) to adjust the length of each stroke. It could be so simple, just type in a value in percentage for a given stroke and you are done – like After Effects.
This is just one more example of all the features we miss for decades…
Copy link to clipboard
Copied
Jacob's solution gives numeric control.
You could make a feature request with your suggestions here:
Copy link to clipboard
Copied
Thank you, I will give it a try. Though I have little or no hope Adobe will ever listen to its customers.
Copy link to clipboard
Copied
I found one more solution using the Width-Tool–it has some shortcomings (I call it a bug), though. When reducing the stroke width to zero, in fact, it isn’t zero, Illustrator still renders a hairline, which makes the result useless—and yes, it exports, too.
To add some rant: using Affinity Designer’s pressure feature gives a clean result.
Copy link to clipboard
Copied
"When reducing the stroke width to zero, in fact, it isn't zero, Illustrator still renders a hairline"
That is interesting, but I don't think it is a bug.
In the first versions of Illustrator you could make a line with a line width of zero, which was a way to create a line that renders the thinnest width a device can reproduce (a device pixel).
Current versions do not allow 0 width strokes and switch them to none.
But you found a way around that 🙂