Skip to main content
PS Motion
Inspiring
January 20, 2020
Answered

Scaling box from left to right maintining stroke width

  • January 20, 2020
  • 1 reply
  • 2020 views

Hello!

I made a box with an white outline that contains words. The words change, so I need to scale the box lenght to make it the size of the new word. However, if I use scale, it distorts the line width. If I use "size", it scales from the center, and I need it to scale alligned to the left. How can I do this? 

obs: - The box height is fixed;

- I do not need the box to autoscale with the words. I'll be doing that manually

 

Thank you!

 

This topic has been closed for replies.
Correct answer Mike_Abbott

Given your description it looks like you've made your box with a shape layer (star icon on the layer?).

If so:

Twirl open the layer until you find: "Transform : Rectangle 1"
Alt click on the stopwatch for the next line down -- Anchor Point.
Replace the expression text on the right with:

 

xSize = content(1).content(1).size[0];
[-xSize/2,value[1]]

 

 Change the X size by unlinking the X / Y values and using the Size property under the Rectangle Path 1 property group.

1 reply

Mike_Abbott
Mike_AbbottCorrect answer
Braniac
January 20, 2020

Given your description it looks like you've made your box with a shape layer (star icon on the layer?).

If so:

Twirl open the layer until you find: "Transform : Rectangle 1"
Alt click on the stopwatch for the next line down -- Anchor Point.
Replace the expression text on the right with:

 

xSize = content(1).content(1).size[0];
[-xSize/2,value[1]]

 

 Change the X size by unlinking the X / Y values and using the Size property under the Rectangle Path 1 property group.

PS Motion
PS MotionAuthor
Inspiring
January 20, 2020

Thank you so much! That's exactly what I needed!