# Scale stroke length on path

Community Beginner ,
May 03, 2021 May 03, 2021

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.

Thank you

Andreas

TOPICS
Draw and design, Tools

Views

927

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
14 Replies 14
May 03, 2021 May 03, 2021

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 11, 2021 May 11, 2021

Copied

Thank you, Jacob, I will give it a try.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 11, 2021 May 11, 2021

Copied

This works for me. It is of all workarounds the most convenient.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 11, 2021 May 11, 2021

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:

• To easily move the boundary between two adjacent rectangles you can just deselect (click an empty spot) and then ClickDrag across the boundary to select the end Anchor Points there, and then you can move them together live: you can use the left/right arrow to move the boundary 1pt = 1% at a time, or you can use Object>Transform>Move; this will change both rectangles and leave everything else unchanged;
• To change the percentage of one or more rectangles just can just select it/each with the Selection Tool and make the change in the W value or scale it with Object>Transform>Scale (horizontally), and then you can use Distribute Spacing (set to 0) in the Align palette to have all rectangles contiguous, and you can change other rectangles or scale all to get back to 100pt = 100%.

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 12, 2021 May 12, 2021

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 12, 2021 May 12, 2021

Copied

For my part you are welcome, Andreas.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 03, 2021 May 03, 2021

Copied

What is the purpose of your request?

Also, which version of Illustrator are you using?

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 11, 2021 May 11, 2021

Copied

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 11, 2021 May 11, 2021

Copied

They are all workarounds. Gradients along a stroke or pattern brush.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 11, 2021 May 11, 2021

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…

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 11, 2021 May 11, 2021

Copied

Jacob's solution gives numeric control.

You could make a feature request with your suggestions here:

https://illustrator.uservoice.com

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 12, 2021 May 12, 2021

Copied

Thank you, I will give it a try. Though I have little or no hope Adobe will ever listen to its customers.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
May 12, 2021 May 12, 2021

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.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
May 12, 2021 May 12, 2021

Copied

LATEST

"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 🙂

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Resources
Learning Resources for Illustrator
What's new and fixed in Illustrator
Fonts and Typography in Illustrator