|
| 1 | +<font color="green">**Available in Dependency Control**</font> |
| 2 | + |
| 3 | +[Link to script](https://github.com/PhosCity/Aegisub-Scripts/blob/main/macros/phos.AlignAndDistribute.moon) |
| 4 | + |
| 5 | +# Introduction |
| 6 | + |
| 7 | +This script is inspired from `Align and Distribute` feature from Inkscape. |
| 8 | +It is used to align the lines relative to something. |
| 9 | +The alignment is done along the top, center and bottom edge vertically and along |
| 10 | +the left, center and right edge of line horizontally. |
| 11 | + |
| 12 | +!!! note |
| 13 | + |
| 14 | + Everything this script does is based on the bounding box of the line. So |
| 15 | + things like position or alignment of the line doesn't matter. |
| 16 | + |
| 17 | +Lines can be align relative to: |
| 18 | + |
| 19 | +1. Video |
| 20 | +1. PlayRes |
| 21 | +1. LayoutRes (If the file has one) |
| 22 | +1. Rectangular Clip (If the line has one) |
| 23 | +1. First or last line of the selection |
| 24 | +1. Any custom line of the selection |
| 25 | + |
| 26 | + |
| 27 | +<video width="2560" height="1546" controls> |
| 28 | + <source src="../assets/Align and Distribute/align_1.mp4" type="video/mp4"> |
| 29 | +Your browser does not support the video tag. |
| 30 | +</video> |
| 31 | + |
| 32 | +<video width="2560" height="1546" controls> |
| 33 | + <source src="../assets/Align and Distribute/align_2.mp4" type="video/mp4"> |
| 34 | +Your browser does not support the video tag. |
| 35 | +</video> |
| 36 | + |
| 37 | +<video width="2560" height="1546" controls> |
| 38 | + <source src="../assets/Align and Distribute/align_3.mp4" type="video/mp4"> |
| 39 | +Your browser does not support the video tag. |
| 40 | +</video> |
| 41 | + |
| 42 | +<video width="2560" height="1546" controls> |
| 43 | + <source src="../assets/Align and Distribute/align_4.mp4" type="video/mp4"> |
| 44 | +Your browser does not support the video tag. |
| 45 | +</video> |
| 46 | + |
| 47 | +The lines can also be distributed. This means to make all the selected lines |
| 48 | +equidistant from each other. The first line and the last line of the selection |
| 49 | +is taken as the reference line. |
| 50 | + |
| 51 | +<video width="2560" height="1546" controls> |
| 52 | + <source src="../assets/Align and Distribute/align_5.mp4" type="video/mp4"> |
| 53 | +Your browser does not support the video tag. |
| 54 | +</video> |
0 commit comments