There seems to be a tool for just about everything in Photoshop, but it can be surprisingly confusing to create any form of diagonal lines. Whether it be a pattern, selection, or shape, creating diagonal lines takes a couple of extra steps beyond the regular shape and selection tools you might be used to.
So in this tutorial, I’ll walk you through everything you need to know to create diagonal lines in Photoshop. From basic shapes, diagonal selections, diagonal patterns, and more!
Let’s get started.
How To Make A 45-Degree Line In Photoshop
Creating a diagonal line in Photoshop is quick and easy. You must draw a simple straight line and change a single setting to angle it at 45 degrees.
To do this, first, grab the Line Tool (U) from the Toolbar.Â
In the Options bar, change the Line Tool mode to Shape.
Next, you will need to change the line appearance. To do this, go to the Options bar and set the Stroke to black or any other color you want.
Then set the stroke Width to 30 px or whatever width you prefer for your line.
With all the line settings adjusted, drag it out on the canvas to create it.
Now, press Control + T (Win) or Command + T (Mac) to enable the Free Transform Tool. Control handles will appear around your line, indicating the shape is selected. The Free Transform Tool allows you to alter your selected object in many ways, including rotating it.
Now, go to the Options bar and enter the number 45 in the Rotate box. The Rotate option allows you to rotate a shape to any degree instantly.
When you’re finished rotating your line, press Enter on your keyboard to deselect the shape and use it as you please. If you want the line to rotate in the opposite direction, type in -45 in the angle box instead.
How To Draw A Pixelated Diagonal Line
To draw a pixelated diagonal line, you must first create a square document with the same height and width so that the pixels that compose the line fit the canvas perfectly. In my case, I used a 1000 x 1000 pixel document. These types of lines are particularly useful when creating pixel art.
With that done, grab the Rectangle Tool (U) in the Toolbar.
Now, go up to the Options bar to customize your rectangle.
Set the Fill to black.
Set the Stroke to transparent.
Now, click and drag out from the corner of the document while holding Shift to create the first square.
Press V to enable the Move Tool. After that, keep the Alt (Win) or Option (Mac) key pressed while clicking and dragging the first square diagonally to duplicate it.
Repeat the process above until the diagonal pixelated line is complete. If your smart guides are enabled, these will help align everything evenly on your document.
Hold Shift while clicking all layers containing the squares you created within the Layers Panel. This will select all of them at once.
With that done, press Control + E (Win) or Command + E (Mac) to merge the selected layers.
Now you will have a single layer with your pixelated diagonal line instead of a bunch of layers containing the individual pixels that compose the line.
With the line in a single layer, you can turn it into a pattern for your projects. The next section will show you how to turn a line into a pattern.
How To Make A Diagonal Line Pattern In Photoshop
I will show you how to create a diagonal line pattern to use in several projects of your choice. First, create a 200 x 200-pixel document at 72 PPI.
Then, go to the Toolbar and grab the Line Tool (U).
Now, go to the Options bar to customize the line appearance. The following settings are crucial to create patterns.
Set the Fill to black.
Set the Stroke to transparent.
Set the line Weight to 10 px.
Hold The Shift key and then drag the line down in a diagonal direction. Holding Shift keeps the line angle at 45 degrees.
Notice that after you draw the line, it might expand into the workspace outside the canvas. We will need to touch that up before we can create a pattern.
To do that, duplicate the line by pressing Control + J (Win) or Command + J (Mac).
Now, Shift-click the line layers to select them all simultaneously.
Next, right-click with the mouse and choose Rasterize Layers. Once you do this, you can no longer edit the line as a shape, so make sure it looks exactly as you want before advancing to the next step.
Next, enable the Crop Tool by pressing C.
In the Options bar, make sure Delete Cropped Pixels is checked.
Then, click on the image to reveal the cropped area. Everything that is gray and outside the white box will be left out.
Now, press Enter on your keyboard to crop the canvas. This will delete the excess parts of the line and ensure our pattern can be repeated.
Now, select the top layer.
Then, go to Filter > Other > Offset.
From the Offset dialog, set the Horizontal and Vertical offset values to half the canvas size value. For example, as my canvas was a 200 x 200 px document, I set my horizontal and vertical offset amounts to 100 pixels.
Next, ensure Wrap Around is marked and click OK to confirm the changes.
Now, go to Edit > Define Pattern.
Name the pattern if you like in the dialog box that will pop up, and click OK.
That will create your pattern.
To test your pattern, create a new document. Then, go to the Layers panel, click the Adjustment Layer icon and choose Patten.
The Pattern Fill dialog will show your pattern and some customization options.
If you don’t see your diagonal pattern in the preview window, click the arrow next to the preview window to reveal the available options and look for your pattern there.
Here is what the Pattern settings do.
In Angle, you can change the orientation of the pattern. That way, you can create different patterns with different angles whenever you need one.
In Scale, you can adjust the number of lines you can see in the pattern. If you set Scale to a low percentage, you will see more lines in the pattern.
If you scale your pattern up, you will see fewer lines in the pattern, and they will look bigger.
2 Ways To Create A Diagonal Selection In Photoshop
Sometimes, you will be required to make a diagonal selection, whether to cut out parts of an image or graphics or to fill it with a color or pattern. Here is how to do it.
Option 1: Using the Line ToolÂ
First, grab the Line Tool (U) in the Toolbar.
Second, go to the Options bar and set the Line Tool mode to Path.
Choose a Weight for the line. This will determine the size of the selection.
Now, click and drag out on canvas in a diagonal direction while holding Shift.
That will create your diagonal path. With the path created, go back to the Options bar, and choose Make Selection.
Ensure the following settings are selected in the Make Selection dialog: Feather Radius to 0, Anti-aliased checked, and Operation to New Selection.
Click OK to confirm the settings and close the dialog box.
This will turn the path into a selection matching the diagonal angle you created. This can now be applied to a layer mask or cut pieces of your image onto a new layer.
Option 2: The Pen Tool
Creating diagonal lines with the Pen Tool (P) works the same way as creating them with the Line Tool. Diagonal selections made with such a tool are excellent for cutting out parts of photos.
To create a diagonal line with the Pen Tool (P), select the tool in the Toolbar.
Now, click on the top left corner of the canvas.
Next, click on the bottom right corner of the canvas to form a diagonal line.
To close the path, you must connect its endpoint to its initial point. You can do this by tracing the edges of the area you want to select.
Once you finish the selection, right-click it and choose Make Selection.
Keep the Make Selection dialog settings as they are, and click OK.
This will create a diagonal selection that you can turn into a layer mask, fill with content or do anything else you have in mind!
Now you have all the skills to create any diagonal line, selection, or shape in Photoshop. To help further your skills with the shape tool settings available in the program, see my shape tool guide here.