code: TextOutline positionHydrogenLabel(HydrogenPosition position, TextOutline element, TextOutline hydrogen) {
          final Rectangle2D elementBounds = element.getBounds();
          final Rectangle2D hydrogenBounds = hydrogen.getBounds();
          switch (position) {
              case Above:
                  return hydrogen.translate(0, (elementBounds.getMinY() - padding) - hydrogenBounds.getMaxY());
              case Right:
                  return hydrogen.translate((elementBounds.getMaxX() + padding) - hydrogenBounds.getMinX(), 0);
              case Below:
                  return hydrogen.translate(0, (elementBounds.getMaxY() + padding) - hydrogenBounds.getMinY());
              case Left:
                  return hydrogen.translate((elementBounds.getMinX() - padding) - hydrogenBounds.getMaxX(), 0);
          }
          return hydrogen; // never reached
      }
docs: Position the hydrogen label relative to the element label.
  
  @param position relative position where the hydrogen is placed
  @param element  the outline of the element label
  @param hydrogen the outline of the hydrogen
  @return positioned hydrogen label