Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This page documents how KLay Layered implements label placement and node sizing.

Work in Progress

Everything on this page is still subject to change – this is the bleeding edge of science! We're still working on this stuff, trying out different concepts, and moving things around, all for the benefit of mankind. You're welcome.

Contents

Relationship Between Label Placement and Node Size

At first glance, label placement and node sizing are two separate problems. However, out of the three types of labels we currently support – node labels, port labels, and edge labels – two have considerable influence on the size of nodes (node labels and port labels, but you already figured this out yourself). Well, in fact, that's not completely true. It's not the labels that influence the size of nodes, it's the placement of labels. And if we didn't care for readability, the placement wouldn't influence node size at all. But we do. Take this simple example:

ToDo

Insert an image here. Two nodes, each with one port on the western side and one port on the eastern side. Port labels are placed inside the nodes and are the same for both nodes. The left node is too narrow to avoid overlaps between the port labels, the right node is wide enough.

The two nodes have to labeled ports each. Let's assume port positions to be fixed, and labels to be placed inside the nodes. Clearly, the left node is too narrow for the port labels to be placed without overlaps. If the labels are to be placed without overlaps, we need to increase the width of the node. Label placement influences node sizing.

Just how much and in what ways the two influence each other is one source of complexity. One important task in implementing label placement and node sizing is to determine the cases where we simply give up. If the user gives us fixed node sizes and fixed port positions, he cannot expect us to find an overlap-free placement if port labels are to be placed inside the node.

  • No labels