def line_extended(line, distance):
 angle = (((line.angle() / 360) * 2) * math.pi)
 (dx, dy) = unit_point(angle, r=distance)
 return QLineF(line.p1(), (line.p2() + QPointF(dx, dy)))

def line_extended ( line , distance ) : angle = ( ( ( line . angle ( ) / 360 ) * 2 ) * math . pi ) ( dx , dy ) = unit_point ( angle , r = distance ) return QLineF ( line . p1 ( ) , ( line . p2 ( ) + QPointF ( dx , dy ) ) )
return an qlinef extended by distance units in the positive direction .