My program is supposed to position a set of text boxes with lines in a proper manner in documents. You can find an example below:
Here's the information my program has available:
- Sizes of the text boxes
- Target area to which their arrow is supposed to point to.
- To which point exactly in that area the arrow is pointing is not critical (center, closest border)
Now I'm looking for a layouting algorithm providing me the following information:
- Where to place the text boxes
- Where to attach the lines on the text boxes
- Optional: Where to attach the lines on the target boxes (i.e. which exact point to point to)
- Optional: Where to bend the lines
In addition to that, the following conditions should be adhered to:
- Text boxes should not overlap each other or target boxes
- Text boxes may overlap any other document content
- Optional: minimum line length
- Optional: lines should not intersect
Is there a suitable layouting algorithm for this kind of problem that I could use as a starting point?
Thanks in advance for your ideas here!