def bounding_box_line(svg, node, font_size):
    """Bounding box for line node."""
    x1, y1 = svg.point(node.get('x1'), node.get('y1'), font_size)
    x2, y2 = svg.point(node.get('x2'), node.get('y2'), font_size)
    x, y = min(x1, x2), min(y1, y2)
    width, height = max(x1, x2) - x, max(y1, y2) - y
    return x, y, width, height
Bounding box for line node.
weasyprint/svg/bounding_box.py