Photoshop
Selections
The Pen Tool
The Pen tool creates a path around the portion of the image that you want to select. Once you create a path, you can convert it a selection as you'll see in the next lecture. The path that is created is vector-based, giving a higher level of flexibility. You can also use paths to create vector shapes that you can store in Photoshop and use over and over. There are five variations of the Pen tool: the Pen tool itself, Freeform Pen tool, Add Anchor Point tool, Delete Anchor Point tool, and Convert Point tool.
Path Basics
Before trying out the Pen tool, we'll introduce some basic concepts about paths. As you learned in the first module, vector graphics are based on mathematical calculations and can be infinitely manipulated and scaled with no loss in definition. Vector shapes are created using paths. A path is an outline that you can convert into a selection or use it as a vector shape to which you can apply a fill and/or a stroke (border). Paths are also used in more advanced features such as masks and clipping paths.
A working path is a temporary path that is visible in the Paths panel.
Anchor Points and Line Segments
The most basic path of all is the straight line path, shown here. It consists of two anchor points and a line segment that runs in a straight line between the anchor points. (The anchor points are only visible while you're creating or editing a path.) When using the Pen tool, an anchor point is added each time you click in an image. Line segments are formed automatically between each pair of adjacent anchor points.
Anchor points are normally placed where line segments will change direction or change from a straight line to a curve or vice versa. This example shows both straight line segments and curved line segments. There are two types of anchor points: corner points and smooth points. Corner points occur at the ends of straight-line segments. Smooth points appear on curved line segments.
Direction Lines and Direction Points
Curved lines are controlled by a direction line that extends from an anchor point. Each end of a direction line has a diamond-shaped "handle" called a direction point. Either point can be dragged to change the distance and angle of the curve.
In this example, you'll notice that the left anchor point is a solid square and the right anchor point is hollow. Selected/active anchor points appear solid.
A direction line can be lengthened or shortened and can be rotated by dragging one of its direction points. This is the same path as the previous example but the direction line has been shortened and is now on an angle. The resulting curve is shallower and has a smaller radius.
Corner and Smooth Anchor Points
Both corner and smooth anchor points can have direction lines and points, although they're usually used for curves. A smooth point's direction line is a straight line from one direction point to the other. Moving one point will cause the other point to move as well.
A corner point can have two direction lines that move independently of one another. It may also have no direction lines associated with it.
Practice Exercise: Pen Tool
Straight Line Selections
- Open the file called shapes.psd in your NewImages folder. It contains three geometric shapes we'll use to practice drawing paths with the Pen tool.
-
Click on the Pen tool in the Toolbox or use the keyboard shortcut P. Before you begin to draw, check the Tool Options bar and make sure the buttons circled at the right are the ones selected.
Also, ensure that Auto Add/Delete is enabled.
- We'll start practicing on the purple lightning bolt. Click on one of the corners of the object to add the first anchor point. Move to an adjacent corner and click again. This forms the first straight line segment.
- Continue moving in the same direction and click on each inner and outer corner of the lightning bolt until you've placed an anchor point on each one. If you place an anchor point and then realize your aim was off, you can use the Undo command and try again.
-
The last step is to close the path. In the example shown here, the Pen Tool is hovering over the first anchor point that was placed. There is a hollow circle indicator to the right of the pen icon
. This means that you are back at the starting point and clicking here will close the path. Click on the starting point.
-
The path is completed and the anchor points are hidden. Open the Paths panel. You'll see a black and white thumbnail of path in your image labelled Work Path.
-
Click the keyboard shortcut A to switch to the Path Selection tool. Click on any part of the path then drag it away from the original lightning bolt and release the mouse button. Now you can better see your completed path.
Notice that after using the Path Selection tool, all of the anchor points in the path are solid, meaning that they are all selected. The main purpose of this tool is to select or move entire paths or groups of paths.
Curved Line Selections
The procedure for drawing curves with the Pen tool is nearly the same as for drawing straight lines. However, instead of clicking and releasing to set the anchor point, you click and drag in the direction of the curve before releasing. Dragging will cause direction lines to appear on opposite sides of the anchor point. In this example, we wanted to create a downward curve so we clicked and dragged the pen downward when placing the anchor point. Once you begin dragging a direction point, the cursor will change to a black arrowhead
.
- This time we'll switch to the blue oval shape to draw curved lines. Tip: circles and ovals are ideally drawn using just four anchor points - on the top, right, bottom, and left. The fewer anchor points you use when drawing any path, the better your results will be. Unnecessary points can lead to irregular shapes.
-
Click on any of the four points of the oval and drag to pull out a direction line. Another tip: if you hold down the Shift key while dragging, this will constrain the angle of the direction line to 45o increments. In this case, if you start at the top and drag with the Shift key held down, a horizontal line will result and this is exactly what is required.
-
As you are clicking and dragging to form the next smooth anchor point, keep an eye on the line segment. Adjust the length of the direction line before you release the mouse button so the line segment conforms to the curve of the oval. Do the same for the next two points.
-
Close the path as you did for the lightning bolt by simply clicking. It's not necessary to drag this time because the initial anchor point is already a curve point.
-
At this stage you should be left with just the path and the anchor points will be hidden. In our example, we've selected every anchor point to reveal them and their direction lines. Viewed this way, it's clear that there's definitely room for improvement. This is where the Direct Selection tool comes into play.
Direct Selection Tool
After a path has been completed using the Pen tool, you can temporarily access the Direct Selection Tool by holding down the Ctrl (Cmd) key. If you have several adjustments to make, you may find it easier to just select the tool from the Toolbox so you don't have to keep pressing the shortcut key. The Direct Selection tool is a variation of the Path Selection tool which has a keyboard shortcut of A. With this tool you can select a path by clicking on a line segment or selecting individual anchor points. You can click and drag to reposition the anchor points and also drag the direction points to adjust the curves.
-
With the Direct Selection tool, click on any line segment of your path. As shown here, the anchor points become visible again. Only the direction lines affecting the selected curve will be shown. Click on a different path segment to see how the display changes.
-
Now click on an anchor point. It should become a solid square to indicate it's selected. In this case, all the direction lines affecting the two curves adjacent to the selected point become visible.
- Use the Direct Selection tool to refine your path. You can click and drag anchor points to reposition them. You can also nudge a selected anchor point one pixel at a time by using the keyboard arrow keys. Shorten or lengthen direction lines to adjust the slope of the curves by clicking and dragging the direction points. Zooming in can help you see the details better.
- Once you're satisfied with your adjustments, click away from the path to deselect it.
- Before we proceed further, open the History panel and take a snapshot of this state. We'll use it again in the next lecture.
Add Point Tool, Delete Point Tool, and Convert Point Tool
We'll continue on with the oval path to try out three more path tools.
-
One of the tools stored with the Pen tool is the Add Anchor Point tool. Press the Pen tool button in the Toolbox until the fly-out menu appears and choose this tool. As you move it over the canvas, it will appear as the Direct Selection tool but when the pen tip hovers directly over the oval path, the cursor will display the Add Anchor Point icon
.
-
Click on a line segment in the lower half of the oval to add a new anchor point. Since the line segment is a curve, the newly-added anchor point will also be a curve by default.
-
Hold down the Alt (Option) key to temporarily access the Delete Anchor Point tool. This tool is also found in the Toolbox with the Pen tool.
-
Hover over the new anchor point and the cursor will change to this icon:
. Click on the anchor to delete it. Once removed, the path segment will return to its previous state.
-
Access the Pen tool fly-out menu again and select the Convert Point tool. It will operate as the Direct Selection tool away from the path but once it's held over an anchor point, it changes to the Convert Point icon
. This tool is used to convert smooth points to corner points and vice versa.
-
Hover over the smooth anchor point at the bottom of the oval with the Convert Point tool and then click.
-
Now the anchor point has been converted to a corner point. To convert it back to a smooth point, click and drag away from the anchor point to extend the direction line.
-
There's one more thing the Convert Point tool can do. Hold down the Ctrl (Cmd) key to temporarily access the Direct Selection tool and click on the oval's top anchor point to select it. Release the mouse button to return to the Convert Point tool. Now your path should look like this:
-
Click on the direction point at the end of the right direction line and drag it downwards. A few things will happen here:
- Once you begin to drag, the cursor will change to the black arrowhead.
- The right half of the direction line will move independently of its other half.
- This means that the smooth point has been converted to a corner point that has two direction lines that can be manipulated separately.
- If you were to click once again on the anchor point using the Convert Point tool, the direction lines would be removed and it would become a normal corner point like the anchor point at the bottom of the oval.
- Leave your image open to use in the next lecture.
Open and Closed Paths
One final note: The examples above were closed paths but open paths can also be drawn with the Pen tool. To complete an open path either click on the Pen tool in the Toolbox or click away from the path while pressing the Ctrl (Cmd) key.
And there you have it! You've learned to use six new tools to create and manipulate paths. We won't go through a step-by-step practice with the heart shape, which is a little more challenging, but you are encouraged to try it out on your own to test your knowledge. You've now learned everything you need to know to draw path around it.
Pen Tool Options

- Drawing Modes
-
- Shape Layers Mode
-
Shapes will be covered in the Layers module. For now, all you need to know is that using the Pen tool in this mode will create a special shapes layer.
- Paths Mode
-
In Paths mode you aren't drawing directly on a layer; you're creating a path outline called the work path that's displayed in the Paths panel. This is the mode you were using in the practice exercise.
- Fill Pixels Mode
-
In this mode you are drawing directly on the current layer's pixels.
- Tool Variations & Geometric Shapes
- This option lets you toggle between the Pen Tool, the FreeForm Pen Tool, and geometric shapes.
- Pen Tool Options Menu
-
This menu contains one option: Rubber Band.
- Rubber Band
-
When this option is enabled, the line segment you are working on will be displayed before you click to create its second anchor point. This preview won't reflect what might happen if you drag to create a smooth point. It shows what would happen if a corner point is added.
- Auto Add/Delete
-
Instead of having to switch between the Pen, Add Anchor Point, and Delete Anchor Point tools to edit a path, with this enabled the Pen tool cursor detects when it's over a line segment or an anchor point and switches automatically to the appropriate tool.
- When hovering over a line segment, the Pen tool will change to the Add Anchor Point tool.
- When hovering over an anchor point, the Pen tool will change to the Delete Anchor Point tool.
- Path Options
-
When you add new path components to the working path, these options determine how the new component will interact with the existing one(s). In the examples shown below, the triangle was the first path drawn. The path option was then set and the circle was drawn. The images on the left show the paths still selected and the images on the right show the de-selected final result. (These were actually filled shapes so you can see the effect but the concepts are the same.)
- Add to Path Area
-
Whether the components are overlapping or separated, the working path will include all parts of each component. When you move one path, the other will move in unison.
- Remove From Path Area
-
When the second path component overlaps the first one, this option will subtract the overlapping area.
- Intersect Path Areas
-
When the second path component overlaps the first one, the resulting path will consist only of the overlap.
- Exclude Overlapping Path Areas
-
When the second path component overlaps the first one, the overlapping area will be excluded.
Freeform Pen Tool
The Freeform Pen tool allows you to create paths by drawing freehand. It automatically attaches anchor points as you're drawing.
If you want an enclosed path, finish by dragging the Freeform Pen over the starting point. When you see a hollow circle icon next to the tool's cursor
, release the mouse button to complete the path. If you want to create an open path, simply release the mouse button at the end of the path.
Freeform Pen Tool Options
Most of these options are identical to the Pen Tool options. Instead of an Auto Add/Delete option, the Freeform Pen tool has a Magnetic option. The drop-down options menu has different settings, as well.
- Curve Fit
-
This setting determines the number of points that will be placed along the path and how closely the path will conform to the shape drawn. A higher setting will yield fewer points and smoother curves but will not be as accurate. A lower setting will yield many points and more detailed curves.
- Magnetic
-
When this option is enabled, the Freeform Pen operates similar to the Magnetic Lasso tool, except it creates a vector path. Like the Magnetic Lasso, you can either click and drag around a shape or you can place a starting point, move the pen along the edge of the shape, and complete the path by clicking on the starting point. As shown here, there are settings for this option that can be accessed in the Freeform Pen Options menu.
- Width: The Magnetic Pen will only look at pixels within the specified distance from the pointer.
- Contrast: Values between 1% and 100% can be entered here. For images with low contrast, higher values will provide greater accuracy.
- Frequency: This determines the number of anchor points that will be placed along the path. Lower values generate more points. Valid values range from 5 to 40.
- Pen Pressure: If you are working with a stylus tablet, this option will decrease the Width value with increased pressure on the stylus.
This is the result of using the Magnetic option with a Frequency setting of 30. The automation of the Magnetic option is nice but once the path is rendered, it's usually a bit off, regardless of tweaking the settings.
The Pen Tool Summary
- A vector path consists of line segments bounded by anchor points.
- Anchor points can have direction lines extending from them that are used to alter the slope of the adjacent line segment(s).
- Each direction line has a point on the end called a direction point. Dragging it will rotate, lengthen, or shorten a direction line.
- Paths are temporarily stored in the Paths panel.
- The Pen tool and its variation, the Freeform Pen tool, are used to create vector-based paths around a portion of an image.
- The other tool variations - Add Anchor Point tool, Delete Anchor Point tool, and Convert Point tool - are used to edit the anchor points along a path.
- The Pen tool can draw paths with straight or curved line segments or a mixture of both types. You click to place each point of the path when using the Pen tool. Clicking without dragging creates a corner point while clicking and then dragging creates a smooth point.
- The Freeform Pen tool draws a path as you drag the pointer around the image. When its Magnetic option is enabled, it detects an edge in the underlying image and snaps the path to the edge. Instead of dragging, you can click (or click and drag) to place the first anchor point then release the mouse button and move the cursor over the edges of the object to form the path. Then click on the starting point to complete the path.
- The Add Anchor Point tool adds corner or curve points to an existing path.
- The Delete Anchor Point tool removes corner or curve points from an existing path.
- The Convert Point tool has performs three operations:
- It converts a curve point to a corner point without direction lines.
- It converts a curve point to a corner point with direction lines.
- It converts a corner point to a curve point.
- The Path Selection tool is used to select or move paths or groups of paths.
- The Direct Selection tool selects line segments or anchor points and is used to manipulate direction lines.
The Pen Tool Keyboard Shortcuts:
- Pen tool: P
- Path Selection tool: A
- Temporarily access the Direct Selection tool when the Pen tool and its variations are selected: Ctrl (Cmd)
- Temporarily access the Delete Anchor Point tool when the Add Anchor Point tool is selected: Alt (Option)
Coming Soon:
- Feb 13
- ISSD 24 - XML
- Feb 21
- ISSD 23 - Web 2.0 Technology
- Feb 23
-
Facebook for Business
Hours: 2
Cost: Free!
- Feb 25
-
Search Engine Optimization (SEO)
Hours: 2
Cost: Free!
- Feb 25
-
Search Engine Marketing (SEM)
Hours: 2
Cost: Free!
- Mar 05
- ISSD 23 - Ajax
Photoshop - TOC - Introduction - Books -
Selections - Links - Questions -
1 - 2 - 3 - [ 4 ] - 5 - 6 - 7 -
