Bounding Box Constraint
将 Shape 约束到其他 Shape 的边界框上。
Input Shape - 连接 Shape 以采样其边界框。
Width - 值为 0 时将 Shape 固定到 Input Shape 边界框的左边缘,值为 100 时固定到右边缘。
Height - 值为 0 时将 Shape 固定到 Input Shape 边界框的底部,值为 100 时固定到顶部。
Offset - 为输出添加/减去 [x, y] 值。
Out Position [只读] - 显示图层正在输出的 [x, y] 值。Id 连接同时包含了 x 和 y 位置,而此属性允许你将单独的 [x, y] 属性连接到其他图层。
- 创建 2 个 Shapes。
- 创建一个 Bounding Box Constraint。
- 连接 shape1.id→boundingBoxConstraint.inputShape。
- 连接 boundingBoxConstraint.id→shape2.position。
- 将 Bounding Box Constraint 的 Width 设为 0。
Shape 2 将被约束到 Shape 1 边界框的左边缘。