Jakubs | November 4, 2022

How to draw lines through shapes in Illustrator

Are you interested in learning how lines can be drawn through shapes in Illustrator? Today, we'll examine the Pen, one of the most crucial—and frustrating—tools for “newbies.” The Pen tool is unquestionably the most dreaded and shunned tool in both Photoshop and Illustrator, and I've been teaching both programs for a while. But if you put some effort into learning how to utilize the Pen tool, you'll find that it truly does open up a whole new universe for you, and it will rapidly become second nature to you. So let's begin by drawing straight lines with the tool.

You set anchor points on the artboard when you draw with the pen tool. A path connecting the anchor points creates a line segment that can be either a straight or curved line.

Make straight lines

You may create closed or open routes using straight lines.

1. Either choose the Pen tool from the toolbar or press P to quickly do so. A little x will show next to the cursor when you first choose the pen tool, suggesting that you are about to embark on a new path.

2. To start the straight line section, click once on the artboard. Do not linger. If you mistakenly dragged the Pen tool and direction lines (additional lines coming out of an anchor point) appear, press Ctrl + Z (Windows) or Cmd + Z (Mac) to undo, then click again.

3. Place another click where you wish to add the next anchor point.

To limit the segment's angle to a multiple of 45°, shift-click.

4. Keep clicking to establish anchor points for more straight sections.

Your most recent point will always show up as a solid square, indicating that it has been chosen. Your additional anchor points will appear hollow.

Choose one of the following to finish the path:

Place the Pen tool over the first anchor point you add to the artboard if you want a closed path. The path will close correctly when a little circle appears next to the Pen tool pointer. To close the path, click.

Simply Ctrl + click (Windows) or Cmd + click (Mac) anywhere that is not in the path of any objects if you wish to leave it open. The next time you click with the Pen tool, a new route will be initiated. You'll see that the small x is displayed by the Pen pointer once more.

You can also close a path by selecting any other tool from the toolbox.

Anchor Points Can Be Added and Removed

Naturally, there may be instances when you want to expand the number of anchor points in your lines or remove unnecessary anchor points. To achieve clean lines, keep in mind that it's best to use as few anchor points as you can.

The Pen tool, Add Anchor Point, and Delete Anchor Point tools are the three tools for adding or removing points that are available in the Tools panel. Say I wish to eliminate a point from the earlier-drawn path.

From the toolbox, choose the Delete Anchor Point option, or use the keyboard's minus (-) key. Select the point you wish to eliminate by clicking it.

The line's current shape can be seen to have changed.

Using the Add Anchor Point tool, click anywhere along a line segment if you want to add an additional anchor point.

So that's how to make straight line segments; it's really simple, so don't be intimidated!

Changing Paths

The Selection tools, which let you edit the paths you've drawn, must also be mentioned.

Use the Direct Selection tool to select an anchor point and then click it to move it. Press A for a shortcut. To pick multiple points, press Shift and click.

After choosing one (or more) points, you can drag that specific point.

Click anywhere on the path using the Selection tool to choose all anchor points and the line segments that connect them (V).

Now, the complete path will move when you drag.

Okay, so we've looked at drawing straight lines with the Pen as well as utilising the Direct Selection and Selection tools to pick out specific points or the complete path. Practice sketching shapes and open and closed paths with the Pen until you feel completely at ease with it, is my recommendation.