def line_angle(position, angle, distance): p = Path() x1, y1 = coordinates(position.x, position.y, distance, angle) p.line(position.x, position.y, x1, y1) p.strokeColor = Color.BLACK p.strokeWidth = 1 return p
def parse_line(e): x1 = float(get_attribute(e, "x1")) y1 = float(get_attribute(e, "y1")) x2 = float(get_attribute(e, "x2")) y2 = float(get_attribute(e, "y2")) p = Path() p.line(x1, y1, x2, y2) return p
def line(point1, point2): p = Path() p.line(point1.x, point1.y, point2.x, point2.y) p.strokeColor = Color.BLACK p.strokeWidth = 1 return p