Class Arranger
- Namespace
- GeometryHelper.Arranging
- Assembly
- GeometryHelper.dll
Places labels so that they overlap neither one another nor what they have to keep clear of.
public static class Arranger
- Inheritance
-
Arranger
- Inherited Members
Remarks
Every label is tried at the same candidate positions around its leader, those GetPlacePoints(ArrangeOptions) lists, and the labels are placed greedily, one after another and never taken up again: by default those with the fewest free places first, and of two with as few the one nearer the middle of them all, each at the most open of its first few free places, and each kept clear of by every label after it.
A run goes over the labels twice. The first pass places every label under every constraint. The labels it leaves overlapping something are tried once more with the block lines lifted, keeping clear of the labels the first pass placed. Whether each label is placed is then judged on the final layout as a whole.
The items are only read, and a result comes back for each, in the order the items were given.
Methods
- Run(IReadOnlyList<ArrangeItem>)
Places the labels with the default options.
- Run(IReadOnlyList<ArrangeItem>, ArrangeOptions)
Places the labels.