Skip to main content
Participant
April 15, 2013
Question

stroke width with expression

  • April 15, 2013
  • 3 replies
  • 2947 views

Hi, iam trying to set stroke width based on shape scale, (to maintain fixed stroke size) so ive used "(1/transform.scale[0])*500;" for stroke width expression, but this only works for either stroke width, or stroke height. What am i doing wrong? Or how can i apply ths to both stroke width and stroke height at the same time?

This topic has been closed for replies.

3 replies

Martin_Ritter
Legend
July 9, 2019

I played around and saw your issue. When you have basic shapes, you can create a workaround with a second - stroke only - layer.

If not, try the stroke effect.

*Martin

Participant
July 9, 2019

I have exactly the same problem, the stroke width of my shape stays the same but as I have a circle shape that becomes an ellipse when I squash it, the stroke is not even all around. As expected it's thicker at the sides of the ellipse and thinner top/bottom. I can't find a way to make it the same thickness everywhere.

Todd_Kopriva
Inspiring
April 15, 2013

If all that you're trying to do is keep a stroke the same size when scaling a shape layer, you don't need expressions. Just apply the stroke paint operation within the shape layer to a group that contains the scaling operation. This kind of thing is the reason that there is the ability to group shapes within shape layers and apply transformations and other operations at any level.