Copy link to clipboard
Copied
In the picture I include, I want to autoscale trim path border depend on text scale like this pic
What is the expression should we do for this? P
Copy link to clipboard
Copied
Could be as easy as adding up the four sides of the rectangle and then subtracting the gap and then filtering it through a linear() expression to get the percentages for the Trim Paths operator. Something like this perhaps:
mGap=thisComp.layer("Image").width; //image width
mPad=20; //extra padding for image
mRect=content("Rectangle").content("Rectangle Path").size;
mRectLength=(mRect[0]+mRect[1])*2;
mGapLength=mRectLength-mGap-mPad*2;
linear(mGapLength,0,mRectLength,0,100);
Where the actual gap appears can easily be controlled with the trim path's offset setting, which in your case would be 50% or something like that...
Mylenium
Copy link to clipboard
Copied
Thank you! I will try your method