0

Is there a way to mask a path stroke enter image description here

with a random (filled) shape?

enter image description here

So in this example, I want to mask the end of the path (stroke) with a random shape, the problem is that I can't figure out how to invert so only the tip of this yellow stroke is hidden by that vector filled shape. Not like below:

enter image description here

Note: I don't want to convert the stroke path into a shape as I want to change the path stroke size and style from time to time.

  • Do you want the opposite outcome of the lower shape? – WELZ Sep 3 '18 at 15:53
  • That's right, I want to invert the process/outcome of the bottom image. – m30l Sep 3 '18 at 15:54
  • Not certain which is easier - inverting the clipping mask or expanding the stroke and using pathfinder to remove an end cap. Either method really depends upon plans for further editing. And nether is "better" than the other. – Scott Sep 3 '18 at 17:21
  • You could use a transparency mask – Billy Kerr Sep 4 '18 at 9:44
  • But is the mask vector? – m30l Sep 4 '18 at 13:09
0

Instead of placing the shape (to subtract) on areas to remove, you would place the shape on areas to keep, simply make the shape go around the rest of the line and not the tip you want to remove)

You can quickly and easily do this by just making choppy lines with the pen tool, but that may end up messing with alignments etc.

enter image description here

If you're not worried about those kinds of things, and all you want is the speed/efficiency, this is the way to go.


If you prefer a more proper method (will take a bit more time) and pretty wasteful for this simple shape. It can be useful for complex artwork (Since clipping masks are non destructive), but in this scenario it's a waste - once you're already cutting the path and going through the whole effort...

clone the line path (Ctrl+C / Ctrl+F) and expand it (Object → Expand)

Now carefully make the pen strokes where you want them (make sure to align them with the edges of the expanded path) and then use the Shape Builder Tool (Shift+M) to separate them and delete the part you want cut off, now go ahead and make the clipping mask.

  • That should work, thank you. I'll make the red shape around the stroke. Seems strange that Illustrator doesn't have an option to invert the clipping mask. – m30l Sep 3 '18 at 16:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.