Composite Algorithm
This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
The composite algorithm specifies the size and position for all child layout nodes. You can use it to create graphics with a predetermined layout or in combination with other algorithms to create more complex shapes.
Parameters
Parameter |
Values |
Description |
---|---|---|
ar |
Any numeric value. The default is 0. |
Specifies the aspect ratio (width to height) of the composite node to use when determining child constraints. A value of 0 specifies to leave the width and height constraints unaltered. The algorithm may temporarily shrink one dimension to achieve the specified ratio. For example, if a composite node has a width constraint of 20 and height constraint of 10, and if the value of ar is 1.5, the composite algorithm uses a width value of 15 to calculate the composite node’s child constraints. However, the algorithm does not propagate this value to other nodes. |
horzAlign |
|
Aligns all the child nodes in the space reserved for the parent and adjusts child positions along the x-axis. |
vertAlign |
|
Aligns all the child nodes in the space reserved for the parent and adjusts child positions along the y-axis. |
Constraints
Constraint |
Default value |
Description |
---|---|---|
w |
100 |
Specifies the width of the bounding box for a node. |
h |
100 |
Specifies the height of the bounding box for a node. |
The following constraints specify the size and position of child nodes when combined with w and h constraints. You must specify the constraints 0, 1, and 2 per dimension (x or y) per child node, although the width (w) and height (h) can be specified in the child node.
Constraint |
Default value |
Description |
---|---|---|
l |
0 |
Left |
ctrX |
Not applicable |
Center x |
r |
Not applicable |
Right |
t |
0 |
Top |
ctrY |
Not applicable |
Center y |
b |
Not applicable |
Bottom |
The following constraints support more complex formulas when they are added to the corresponding constraint.
Constraint |
Default value |
Description |
---|---|---|
wOff |
0 |
Width offset |
hOff |
0 |
Height offset |
lOff |
0 |
Left offset |
ctrXOff |
0 |
Center x offset |
rOff |
0 |
Right offset |
tOff |
0 |
Top offset |
ctrYOff |
0 |
Center y offset |
bOff |
0 |
Bottom offset |