Whether you want to create a straight line or a dotted line, you can do it easily with just a snap in photoshop. When you create a line in your document, go to the above menu bar, and find the ‘stroke option.’ Click on that, and a dropdown menu appears with other stroke options, including dot, dash, and straight line. Select the dotted line to alter any straight line into a dotted one.