I need to create a horizontal and vertical dashed line. I used the paths tool and then I edit the line to do it dashed. The problem is that I set the two ends of the line manually and I cannot be sure if the line is perfectly horizontal/vertical. Is there a way to set the coordinate of the two points defining the line?
You can set guides, that will help you put the two extremities on the same horizontal/vertical line.
Another solution is to do a rectangle selection where the edges of the rectangle are the lines you want to create. Then either:
Edit>Stroke selection(with a dashed line)
- Remove the unwanted parts (eraser)
Select>To path(makes a path with 4 points, where everything is perfectly horizontal and vertical)
- Delete the sides and anchor point you don't need (Ctrl-Shift-click on them in the path editor)
Select>None(otherwise only half of the line will be drawn)
Edit>Stroke path(with a dashed line)