Drawing Shapes
Photoshop provides six shape tools that allow you to draw geometric and predefined shapes. By default, the shapes are separated into independent shape layers, which are a mix of objects and pixels. The vector-based outlines of the shapes print at the maximum resolution of your printer, while the interiors may consist of solid colors, gradients, or pixel-based patterns and images.
The pros and cons of shapes
What good are object-oriented shapes in Photoshop? Well, I'll tell you:
Shapes are editable. Unlike pixels, you can change a shape by moving points and control handles. Likewise, you can scale, rotate, skew, or distort shapes, or even transform specific points and segments inside shapes. Nothing is ever set in stone.
Shapes help to disguise low-resolution images. Sharply defined edges can add clarity to a printed image. The first example in Figure 14-1 shows a standard image printed at 75 pixels per inch. The second example shows that same 75-ppi image, but this time using an object-oriented shape outline. The low resolution works fine for the blurry fill, but where clarity is needed, the mathematical outline is there to serve.

Figure 14-1: The difference between a 75-ppi graphic saved as a flat image (top) and as an object-oriented path outline (bottom). Although the blurry interiors appear identical, the shape outline becomes several times sharper when expressed as a path.
You can color a shape with a layer style. As we see later in this same chapter, layer effects such as drop shadows and beveled edges are equally applicable to shape layers as they are to standard image layers. And it's amazing what wild effects you can achieve with a shape, a style, and no talent whatsoever. To create Figure 14-1, for example, I drew a fleur-de-lis shape and applied the Striped Cone style from the Styles palette.
Shapes result in smaller file sizes. As a rule, an object takes up less space on disk than an image. Expressed in PostScript code, a typical path outline consumes 8 bytes per anchor point, as compared with 3 bytes for a single RGB pixel. But whereas a shape may contain as few as 4 points in the case of a rectangle or ellipse, an image routinely contains hundreds of thousands of pixels. For example, the illustration pictured in Figure 14-1 consumes 172K on disk when saved as a native PSD file. If I rasterized the image at an equivalent resolution — say, 600 ppi — using exclusively pixels, the file would balloon to 3.5MB, or more than 20 times the size.
You can preview clipping paths directly in Photoshop. Before object-oriented shapes, you were never quite sure if you traced an image properly with a clipping path until you imported it into InDesign, QuarkXPress, or some other application. Now you can preview exactly what your clipping path will look like directly in Photoshop.
Shapes expand with an image. In Chapter 3, I advise against using Image Image Size to resample an image upward on the grounds that it adds pixels without adding meaningful detail (see the section "Resampling an image"). But you can enlarge shapes as much as you want. Because the shape is mathematically defined, it remains crystal clear no matter how big or small you make it. Layer styles likewise resize without a problem.
If vectors are so great, why not forsake pixels and start drawing entirely with shape layers instead? Well, a shape can clip a continuous-tone photograph, but it can't replace one. Although there have been all kinds of experiments using objects and fractals, pixels are still the most viable medium for representing digital photographs. Because Photoshop's primary job is photo editing, pixels are (for the foreseeable future) the program's primary commodity.
Caution | One downside to shape layers is compatibility. Photoshop has stretched the TIFF and PDF formats to accommodate any kind of layer — shape layers included — but that doesn't mean other programs have any idea what Photoshop is doing. Of all the formats, PDF is the most likely to work with other programs. Just be sure to proof the document on a laser printer before taking it to a commercial printer. After all, when you create objects in Photoshop, you're working on the bleeding edge, so be prepared for the consequences. |
The shape tools
Now that I've painted my rosy picture, let's dig in and look at the tools. Or, if you're not feeling brave enough, take a break and come back later. Either way. Up to you. As you've probably discovered by now, I like to give my readers lots of autonomy. That way, you're responsible for your own actions and you can't sue me if you go and pour this piping hot book all over your lap.Now as I was saying, click the rectangle tool to display a flyout menu of six shape tools, pictured in Figure 14-2. Or press U to select the rectangle tool. Then press U again (or Shift+U) to switch from one shape tool to the next. Either way — remember, it's totally up to you, I make no recommendations (as my lawyer told me to tell you) — the six shape tools work as follows:

Figure 14-2: Click the rectangle tool to display the shape tools flyout menu. Or press U or Shift+U to switch between tools.
Rectangle tool: It used to be a running gag that the hardest thing to do in Photoshop was to draw a simple rectangle. You had to draw a rectangular marquee and then fill it. Not hard, I guess, but what person outside the walls of a sanitarium would think to approach it that way? But the gag is dead — these days drawing a rectangle is easy. Drag to draw a rectangle from one corner to the other, Shift-drag to draw a square, Alt-drag (Win) or Option-drag (Mac) to draw the shape outward from the center.
Tip | While drawing a rectangle or any other shape, press the spacebar to reposition the shape. Then release the spacebar and continue dragging to resize the shape as you normally do. |
Rounded rectangle tool: When you select the rounded rectangle tool, a Radius value becomes available in the Options bar. If you think of each rounded corner as a quarter of a circle, the Radius value is the radius (half the diameter) of that circle. Bigger values result in more roundness.
Ellipse tool: The ellipse tool draws ovals. Shift-drag for circles, Alt-drag (Win) or Option-drag (Mac) to draw the oval outward from the center.
Polygon tool: This tool draws regular polygons, which are straight-sided shapes with radial symmetry. Examples include isosceles triangles (3 sides), squares (4 sides), pentagons (5 sides), hexagons (6 sides), heptagons (7 sides), octagons (8 sides), decagons (10 sides), dodecagons (12 sides), and a bunch of other shapes with so many sides that they're virtually indistinguishable from circles. Enter a Sides value in the Options bar to set the number of sides in the next polygon you draw. Or better yet, press the bracket keys, [ and ], to decrease or increase the Sides value from the keyboard. You can also draw stars and rounded shapes, as I explain in the next section.
Line tool: Some of you are probably thinking to yourselves, "Deke, you blithering nincompoop, how can you call these 'shape tools' when one of them draws lines?" Well, despite your name-calling, I'll tell you. The truth is, even the line tool draws shapes. Enter a Weight value into the Options bar to define the thickness of the so-called "line," and then drag in the image window. The result is an extremely long and skinny rectangle. As you see shortly, this makes editing a line exceedingly difficult. Honestly, it really breaks my heart that the Squirt Gun that Shoots Jelly has to live on the Island of Misfit Toys while the Line Tool that Draws Shapes gets to roam around free as a bird (one that doesn't swim).
Custom shape tool: It saddens me to say this, but so far, the shape tools are a bunch of drips. You can't edit the roundness of an existing rectangle or add sides to a polygon while drawing it. And the line tool offends even the otherwise open-minded Cowboy on an Ostrich. Fortunately, the custom shape tool makes up for them all. Select a preset shape from the Shape option in the Options bar, and then draw it in the image window. It's a symbol library of instant clip art.
The shape drawing process
The act of drawing a shape can be as simple as dragging with a tool. How that shape manifests itself, however, depends primarily on which of the first three buttons pictured in Figure 14-3 is depressed. The first option creates a new shape layer when you draw with the shape tool. The second option creates a work path, available for inspection in the Paths palette. And the final option creates a pixel-based shape. Photoshop doesn't add a new layer; it merely recolors the pixels on the active layer. Although simple in theory, the program offers you a wealth of additional controls. Just for the record, here's the long way to approach the process of drawing a shape layer.

Figure 14-3: Use the options in the Options bar to specify the appearance of a shape before you draw it.
STEPS: Creating a New Shape Layer
Select the shape tool you want to use. Remember, U is the keyboard shortcut for the shape tools.
Specify the color. Select a color for the shape from the Color palette. Alternatively, you can click either the foreground color icon in the toolbox or the Color swatch in the Options bar, and then select a color from the Color Picker. If you want to fill the shape with a gradient, a pattern, or an image, you can do that after you finish drawing the shape, as I explain in the upcoming section "Editing the stuff inside the shape."
Specify how you want to draw the shape. Pictured in Figure 14-3, the first three buttons in the Options bar determine what the shape tool draws. Because we're creating a shape layer, you'll want to make sure that the first button is selected.
Modify the geometry options. Click the down-pointing arrowhead to the right of the tool buttons in the Options bar (labeled "Geometry options" in Figure 14-3) to see a pop-up palette of options geared to the selected shape tool. These permit you to constrain rectangles, ellipses, and custom shapes; indent the sides of a polygon to create a star; round off the corners of a polygon or star; and add arrowheads to a line.The one unusual option is Snap to Pixels, which is associated with the two rectangle tools. Object-oriented shapes don't have any resolution, so their sides and corners can land in the middle of pixels. To prevent potential antialiasing in rectangles, select the Snap to Pixels check box to precisely align them with the pixels in the image.
Modify other tool-specific settings. Depending on the tool, you may see options to the right of the geometry options arrowhead. The polygon tool offers a Sides option; the line tool offers a Weight option. When drawing a custom shape, click the Shape button to display a pop-up palette of presets, as shown in Figure 14-3. You can load more shapes by choosing the Load Shapes command or by choosing a predefined presets (.csh) file from the presets palette menu.
Apply a layer style. When drawing a shape layer, you can assign a layer style to your shape before drawing it. The Layer Style pop-up palette offers all presets available in the Styles palette, as discussed in the "Saving effects as styles" section at the end of this chapter.
Draw the shape. Because you set the tool to draw a shape layer in Step 3, Photoshop automatically creates a new layer. As shown in Figure 14-4, the Layers palette shows a colored fill (labeled "Layer contents" in the figure) with a clipping path — or vector mask, in Photoshop parlance — to the right of it, masking the fill. If you assigned a layer style, a list of one or more effects appears under the layer name.

Figure 14-4: A shape layer is actually a vector mask that masks a color or other contents directly in Photoshop.
Switch tools and draw more shapes. By default, Photoshop creates a new shape layer for each new shape that you draw. If you prefer to keep adding to the same shape layer so that all shapes will share the same fill, click the Add to Shape Area button in the Options bar (it's labeled in the upcoming Figure 14-5). Then draw a new shape.

Figure 14-5: The five compound path buttons; the last four are available when editing or adding to an existing shape layer.
Note | If you press the Enter, Return, or Escape key, the current shape layer is deactivated, signifying that you no longer want to add shapes to that layer. This change is visible in the Layers palette; notice that the vector mask thumbnail no longer has a selection border around it. To reactivate the layer, simply click the thumbnail. |
That's it. You now have one or more shape layers that you can use as you please. From this point, it's a matter of editing the shape, as explained in the following sections.
Combining and editing shapes
A few years back, there was an image editor called Live Picture. Its creators heralded it as the first image editor to provide "infinite incremental undos." In fact, the program had a run-of-the-mill single-level Undo/Redo command. The infinite incremental undos were actually a result of an object metaphor that pervaded the program. After drawing an element, you had the option of changing it. It wasn't an automated undo, but rather a manual adjustment.By this twisted marketing logic, Photoshop's shape layers permit infinite incremental undos. Although I'm being deliberately ironic, there is much to be said for a mask that is perpetually editable. Don't like a segment? Change it. Don't like a point? Move it. Hate the entire shape? Delete it. Here's how:
Using compound path options: As explained in Step 8 in the preceding section, you can draw multiple shapes on a single layer. Because they all share a single fill, Photoshop thinks of the shapes as being bits and pieces of a single, complex path. In drawing parlance, such a path is called a compound path. This leads Photoshop to wonder, what do I do when the bits and pieces overlap? Because they share a fill, they could just merge together. Or perhaps you'd rather use one shape to cut a hole in the other. Or maybe you'd like the intersection to be transparent.You specify your preference by selecting one of the last four compound path buttons, shown in Figure 14-5. (As mentioned previously, the first button, which is on by default, makes Photoshop create every shape on its own shape layer.) Click the second button or press the plus key (+) to add the new shape to the others. Click the third button or press the minus key (–) to subtract the new shape from the others. The fourth button retains the intersection, the fifth makes the intersection transparent. Feel free to experiment with these Boolean operations (if you'll pardon a little techno-speak).
Selecting shapes: You have access to all but the first compound path button when selecting shapes with the arrow tool. Press A to get the black arrow tool — if you get the white arrow instead, press A again (or Shift+A if the Use Shift Key for Tool Switch preference setting is turned on) — and then click a shape to select it. Or Ctrl-click (z -click on the Mac) a shape when using a shape tool.
Moving and transforming: Drag a selected shape to move it. Select the Show Bounding Box check box in the Options bar to access the transformation controls. Or press Ctrl+T (z -T on the Mac) to enter the free transform mode. Then drag a handle to scale, drag outside the bounding box to rotate, and Ctrl-drag (Win) or zApplying Transformations" in Chapter 12.
Arranging and combining shapes: After selecting a shape with the arrow tool, you can apply any of the four available compound path buttons. As you do, bear in mind that the topmost shape takes precedence. So if Shape A is set to Add, Shape B is set to Intersect, and Shape you can fix B is in front, Photoshop fills only the intersection. Meanwhile, the stacking order is entirely dependent on the order in which you draw the shapes, with more recent shapes in front. (The Layer Arrange commands affect whole layers; they can't be used to reorder shapes.) After you get the effect you're looking for, the relationship by selecting two or more paths and clicking the Combine button in the Options bar. Photoshop fuses the selected paths into one.
Caution | Technically, you can combine multiple shapes that don't overlap. But I advise against it. At first, the shapes behave as if they're grouped together. But try to combine other paths with them, and you may uncover some pretty strange relationships. Something about these paths reminds me of Jeff Goldblum in the last hour of The Fly. Some things on this planet just shouldn't be combined. |
Selecting points and segments: Press A (or Shift+A) to get the white arrow tool, which selects individual points and segments. Move individually selected points by dragging them; transform such points by pressing Ctrl+T (Win) or z -T (Mac). To select an entire shape, Alt-click (Win) or Option-click (Mac) it.
Adding and deleting points: The best tool for reshaping a shape is the pen tool. First select part of the shape with one of the arrow tools. Then click a segment to insert a point; drag on a segment to add a smooth point; click a point to remove it. You can likewise use the convert point tool, as well as any other technique that's applicable to paths.
Disabling a vector mask: Shift-click the vector mask thumbnail in the Layers palette to turn it off and make visible the entire contents of the layer. Shift-click the thumbnail again to turn the vector mask on.
Duplicating a vector mask: As far as Photoshop is concerned, shapes are just another kind of path. So it's not surprising that you can access the paths in an active shape layer from the Paths palette. Drag the Vector Mask item onto the tiny page icon at the bottom of the Paths palette to duplicate the shapes so you can use them elsewhere as standard paths (as discussed in Chapter 8).
Deleting a vector mask: Click the vector mask thumbnail and then click the trash can icon at the bottom of the Layers palette to delete the shapes from the layer. You can also just drag the thumbnail to the trash can icon. To add a new shape to the layer, first choose Layer Add Vector Mask Hide All. Then draw shapes in the layer to expose portions of the layer's contents.
Defining your own custom shape: If you create a shape that you think you might want to repeat in the future, select the shape with either arrow tool and choose Edit Chapter 2.
The moral of the story is, shapes work a lot like paths. If you find yourself strangely drawn to the Dark Art of Shape Editing and you're afraid I've forgotten to mention some amazing technique once known to the Oblique Brotherhood of Vector Druids — as I undoubtedly have — consult the "Reshaping paths" and "Transforming paths" scrolls, which I've sequestered in the caliginous catacombs of Chapter 8.
Editing the stuff inside the shape
Here are a few ways to modify the color and general appearance of shape layers:
Changing the color: To change the color of a shape layer, double-click the layer contents thumbnail in the Layers palette. Then select a new color from the Color Picker dialog box. Or better yet, change the foreground color and then press Alt+Backspace (Option-Delete on the Mac).
Changing the blending options: You can change the blend mode and Opacity value for a shape layer using the standard controls in the Layers palette. Or double-click anywhere on the layer except the name or the layer contents thumbnail to display the Blending Options section of the Layer Style dialog box. As discussed in Chapter 13, these options work the same for shape layers as they do for normal layers. You can also apply or modify layer effects, as I explain later in this chapter.
Changing the layer style: Another way to apply or switch out layer effects is to apply a predefined style from the Styles palette. Just click a preset in the Styles palette and Photoshop automatically applies it to the active layer. After that, you can edit an effect by double-clicking its name in the Layers palette.The linked button labeled back in Figure 14-3 comes into play when you make a change to the layer style or color of a shape layer. If the button is selected, changes you make to the style or color are applied, or "linked," to the currently active shape layer. If the button isn't selected, the style or color change applies to the next shape layers you create.
Renaming the shape layer: Double-click the name of a shape layer to rename it.
Filling with a gradient or repeating pattern: Don't want to fill your shape with a solid color? Don't have to. To fill the active shape layer with a gradient, choose Layer Change Layer Content Gradient. Or choose Layer Change Layer Content Pattern to apply a repeating pattern. Chapter 6. The only new options are in the Pattern Fill dialog box. Scale lets you resize the pattern inside the shape; Link with Layer makes sure the shape and pattern move together; and Snap to Origin snaps the pattern into alignment with the origin.

Figure 14-6: Gradients and patterns inside a shape layer are considered dynamic fills, which means you can edit them simply by double-clicking the layer contents thumbnail and editing the options shown here.
Tip | You can reposition a gradient or pattern inside a shape just by dragging inside the image window while the dialog box is on screen. |
After applying a gradient or pattern, you can edit it just by double-clicking the layer contents thumbnail in the Layers palette. Photoshop calls these kinds of editable contents dynamic fills.
Making a color adjustment shape: Where layer content is concerned, shape layers have unlimited potential. You can even fill a shape with a color adjustment. Just choose Levels, Curves, Hue/Saturation, or any of the other color-correction classics from the Layer Change Layer Content submenu. Read the "Adjustment Layers" section of Chapter 17 for complete information.
Painting inside a shape layer: Wish you could paint or edit the contents of a shape layer? Well, thanks to subtle genetic alterations to Photoshop's core subroutines, you can. Assuming the shape is filled with a solid color, gradient, or pattern (this technique is not applicable to adjustment layers), choose Layer Rasterize Fill Content. From this point on, the fill is no longer dynamic. This means you can't double-click its thumbnail to edit it. However, you can edit it like any other layer full of pixels. Paint inside it, clone from another layer with the stamp tool, apply a filter, go nuts.
Filling a vector mask with an image: Applying a vector mask to an image is a more delicate operation. Fortunately, there are several ways to do it, so you can select your favorite. Method number one: Draw a shape not as a new shape layer but rather as a working path (see "The shape drawing process" earlier in this chapter). Then select the layer that you want to mask (it must be a floating layer, not the background) and choose Layer Add Vector Mask Current Path.
Tip | Want to avoid that command? After establishing a work path, Ctrl-click (Win) or z -click (Mac) the add layer mask icon at the bottom of the Layers palette to make the path clip the active image layer. |
Going from clipping mask to vector mask: Okay, so that's one way. But what if you've already gone and made a shape layer, and you want to fill that shape with an image? Again, there are a few approaches, but the easiest is to paste the image onto a layer in front of the shape layer. Then press Ctrl+G (Win) or z -G (Mac) to group it with the shape layer.
Fusing image and shape layer: That's enough to create the same visual effect as a shape masking an image, but it involves two layers instead of one. If you want for any reason to fuse the two layers together, you have to take a special approach. First select the shape layer and choose Layer Rasterize Fill Content to convert the dynamic fill to pixels. Then select the image layer and press Ctrl+E (Win) or z -E (Mac) to merge it with the shape layer below.
Tip | If all this isn't enough, there is one more way to push the boundaries of shape layers and wring the last vestiges of cogent reasoning out of your by-now fragile mind. How? By adding a layer mask to a shape layer. That's right, Photoshop lets you combine pixel masking and vector masking on one layer, as shown in Figure 14-7. Why do it? Well, of course, there's always the chance it appeals to a latent strain of masochism on your part. But also, the combination permits you to have soft and razor-sharp edges all in the same layer. For example, in the figure, I Ctrl-clicked (z -clicked on the Mac) the vector mask and then loaded that as a layer mask by clicking the add layer mask icon at the bottom of the Layers palette. In other words, the layer mask is identical to the vector mask. Why in the world would I want to do that? Because in Figure 14-8, I applied Gaussian Blur to the layer mask and then applied the Crystallize filter. The result is soft filtered edges along the inside of the vector shape but then a hard edge after that. The layer mask masks the layer, and then the vector mask masks that. Pretty spiffy, huh? ![]() Figure 14-7: Add a layer mask to a shape layer to add pixel-based softening to the razor-sharp vector mask. ![]() Figure 14-8: Applying the Gaussian Blur (top) and Crystallize filters to the layer mask mixes a soft pixelated effect with the hard edges provided by the vector mask (bottom). |