def _draw_line_extra_text(polyline, segment, pos0, pos1):
    """Shows the proportions of this line height compared to the previous segment."""
    prev_text = None
    for text in polyline.texts:
        if prev_text is not None and text.segment == segment:
            h0 = prev_text.segment.handles[0]['item']
            h1 = prev_text.segment.handles[1]['item']
            if polyline.vb.y_positive:
                prev_change = h1.pos().y() / h0.pos().y() - 1
                this_change = pos1.y() / pos0.y() - 1
            else:
                prev_change = h1.pos().y() - h0.pos().y()
                this_change = pos1.y() - pos0.y()
            if not abs(prev_change) > 1e-08:
                break
            change_part = abs(this_change / prev_change)
            return ' = 1:%.2f ' % change_part
        prev_text = text
    return ''
