private Element createLineElmForBackbone(HyperEdge edge,
                                             Color color,
                                             Map<Point, Element> pointToElm) {
        String graphId = "e_" + edge.getID();
        List<Point> points = edge.getBackbonePoints();
        ensureTwoPointsNotSame(points);
        Element lineElm = createSegmentedLine(graphId, 
                                          color,
                                          points,
                                          pointToElm,
                                          false);
        // anchor for input
        if (edge.getInputPoints() != null) {
            // Get the first line
            String id = "e_" + edge.getID() + "_a_i";
            addAnchorToLineElm(lineElm, 
                               0.0d, 
                               id);
        }
        // anchor for position
        if (points.size() > 2) { // There should be an anchor point
            Point pos = edge.getPosition();
            // Need to find the anchor for the position
            int index = points.indexOf(pos);
            // Get the total length of line segments
            double total = 0.0d;
            double total1 = 0.0d;
            for (int i = 0; i < points.size() - 1; i++) {
                Point p1 = points.get(i);
                Point p2 = points.get(i + 1);
                double dist = Point2D.distance(p1.x, p1.y, p2.x, p2.y);
                total += dist;
                if (i <= index - 1) {
                    total1 += dist;
                }
            }
            // Just another anchor
            String id = "e_" + edge.getID() + "_a_p";
            addAnchorToLineElm(lineElm, 
                               total1 / total,
                               id);
        }
        // anchor for output
        if (edge.getOutputPoints() != null) {
            // Get the last line
            String id = "e_" + edge.getID() + "_a_o";
            addAnchorToLineElm(lineElm, 
                               1.0d, 
                               id);
        }
        return lineElm;
    }