• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scaling box from left to right maintining stroke width

Explorer ,
Jan 20, 2020 Jan 20, 2020

Copy link to clipboard

Copied

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!

 

TOPICS
Expressions , How to

Views

1.7K

Translate

Translate

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 guidelines

correct answers 1 Correct answer

Advisor , Jan 20, 2020 Jan 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.

Votes

Translate

Translate
Advisor ,
Jan 20, 2020 Jan 20, 2020

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

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 guidelines
Explorer ,
Jan 20, 2020 Jan 20, 2020

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

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 guidelines