In CS 6 you can use one stroke with a gradient applied to it with hard stops. You can control where you want the a little experimentation.
However do notice that the color this way follows he path as well. so that might not desired? Or maybe it is?
In which case Jacob's way would be better. Or do something simialr with n opaciy mask copy the circle in front of the rectangle and original circle.
select all and make the mask clipped and inverted
This is what it lloks like befre the mask
This is he gradient way
The gradient way is cool since you can make the stops transparent
Thank you Jaconb but as demonstrated in the second image above the new (partial) Circle’s Stroke will not perfectly cover the one below, so I would need to then add an inverted Clipping Mask for the one below to prevent Jagged edges. Should I later change one Clipping Mask’s shape I then have to replace the other Clipping Mask with the changed shape too, no easy changes possible.
Is there a way to only affect part of the original Stroke without dublicating the object?
Thank you W.Z. for introducing this new feature to me, I wasn’t aware of it. That is a great workaround for this concrete example but the actual thing I’m workin on is more complicated than the circle and the rectangle I used when asking the question. The problem is that with the Gradient, the transition from one color to the next is set as a straight line going to the center, is it possible to do this in some way:
BTW if you do not nee the stroke to be live that is if you can outline it then there is even better way of doing this you can change the drawing mode for the outline circle and make it a draw inside mode and then copy and paste you shaped path into it.
But it is only vauable if you do not need to keep the stroke live.
We posted at the same time, sorry. I do actually want it to be Live.
Thank you. Watching this video demonstrating the use of Opacity Masks it seems that I would still need two separate objects, one is the mask (for the red shape) and one is the black shape below. Changing one would then require manually changing the other one too, right?
So it’s essentially the same thing as a Clipping Mask for this purpose, the difference is that I can add an Opacity Gradient etc. But I would not be able to simply change the black circle’s Stroke Size and have the red cloud appear accordingly inside that thicker Stroke, correct?
Here’s how I would do it in Photoshop for example:
1) Create the circle,
2) Create the flower/whatever on top of 1),
3) Copy the circle 1) in front of 2),
4) Select 2) and 3) and Transparency>Make Opacity Mask,
If you need to change the circle(s), you can just:
4) Transparency>Release opacity Mask,
5) Change the circles (you may drag over them to select both),
6) Transparency>Make Opacity Mask.
but the actual thing I’m workin on is more complicated than the circle and the rectangle I used when asking the question.
what is it then? and which of its attributes exactly do you want to stay editable?
When you want stuff to stay "live" it is very important what kind of object it is.
You can not get away with just 2 objects and preserving the stroke live using clipping or opacity masks or Pathfinder effects. For edditing you will always need two copies to select and manipulate together. The only way you can get away is if the top (red) object is always with a lighter color and then you can just set its blending mode in the Transparency panel to Lighten. This however will require a white background object and preferably RGB document because the blending modes were made for RGB and some colors in CMYK mode will not be the same color as the swatch.
RE You can not get away with just 2 objects and preserving the stroke live using clipping or opacity masks or Pathfinder effects.
Yes, I guess I have to create two masks, one being the inverted version of the other one and clip on two separate layers to prevent the jagged edges. There is no such thing as Smart Objects in Ps that I could apply here to keep the Stroke live, correct?
the stroke stays alive, and you need only one clipping mask in front, all can be on one layer. In your example from post #4:
1) copy the circle (Ctrl+C)
2) change the color of the circle's stroke to the color of the front object (red)
3) select the two objects and apply Clipping mask (Ctrl+7).
4) Paste Behind (Ctrl+B) and that's it
When editing select the two circles in the Layers panel (one in the clipping mask group and the other outside of it) by holding Shift and clicking in the selection column (the space on a layer to the right of the appearance dot).
Then you can change their common attributes like stroke weight and transformations at the same time. And you can also independently manipulate and transform the path of the clipping mask by selecting it in the Layers panel.