Created
November 24, 2021 15:54
-
-
Save marco-van-zomeren/8cca8893d6d7e93891e247659b2261b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tx=thisComp.layer("Text"); // change to your text-layer's name | |
margin_H = 50; | |
margin_V = 33; | |
// margins relative to fontSize | |
margin_H = margin_H * tx.text.sourceText.style.fontSize/100; | |
margin_V = margin_V * tx.text.sourceText.style.fontSize/100; | |
sr=tx.sourceRectAtTime(); | |
points = [ | |
fromCompToSurface(tx.toComp([sr.left-margin_H, sr.top-margin_V])), | |
fromCompToSurface(tx.toComp([sr.left+sr.width+margin_H, sr.top-margin_V])), | |
fromCompToSurface(tx.toComp([sr.left+sr.width+margin_H, sr.top+sr.height+margin_V])), | |
fromCompToSurface(tx.toComp([sr.left-margin_H, sr.top+sr.height+margin_V])) | |
] | |
createPath(points,[],[],true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment