I am always running into problems with the Edge Attachments - encoding what I want into a series of 0s and 1s is proving difficult
So I have defined the combinations of anchor points as variables, such as:
Code:
;----------------------------------
set top_left [0 0 0 0 0 0 0 0]
set TB_left [0 0 0 0 0 0 0 1]
set top_LR [0 0 0 0 0 0 1 0]
set expand [0 0 0 0 0 0 1 1]
set bottom_left [0 0 0 0 0 1 0 1]
set top_right [0 0 0 0 1 0 1 0]
set TB_right [0 0 0 0 1 0 1 1]
set bottom_right [0 0 0 0 1 1 1 1]
; TB_ stands for "Top and Bottom"
;----------------------------------
Now I can have statements such as:
Code:
set master.tcp.fx w>120 + top_right [138 49 27 19]
...
set tcp.fx h>120 w>110 + bottom_right [228 15 27 19] [0]
set tcp.fxbyp h>130 w>110 + bottom_right [228 33 28 19] [0]
They make the code much easier to read.