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?

  • Have you tired configuring the grid, enable the grid, then enable snap to grid? It works with the pen tool.
    – Billy Kerr
    Commented Feb 15, 2020 at 10:57

2 Answers 2


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)

You can use Ctrl after you press Shift to use Angle Lock (which works at 15 degree increments). It works very nicely for vertical and horizontal lines.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.