Drawing Shapes

Drawing Shapes

Photoshop provides six shape tools that enable you to draw geometric and predefined shapes. By default, the shapes are separated off 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, but 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 inside Photoshop?

  • 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. If you take an image printed at 75 pixels per inch and include both blurry and sharp content, the low resolution works fine for the blurry parts , but where clarity is needed, the mathematical outline is there to serve ” making up for the potential loss of clarity inherent in low-resolution images.

  • You can color a shape with a layer style. As discussed later in this chapter, layer effects such as drop shadows and beveled edges are equally applicable to shape layers and standard image layers.

  • 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 although 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.

  • You can preview clipping paths directly inside 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 inside Photoshop.

  • Shapes expand with an image. When working with straight pixels, I advise against using Image Image Size to resample an image upward on the grounds that it adds pixels without adding meaningful detail; but you can enlarge shapes as much as you want. Because a shape is mathematically defined, it remains crystal clear no matter how big or small you make it. Layer styles are likewise capable of resizing to match a new image size .

If vectors are so great, why not forsake pixels and start drawing entirely with shape layers instead? Although a shape can clip a continuous-tone photograph, it can't replace one. There have been all kinds of experiments using objects and fractals, but 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 stretches the TIFF and PDF formats to accommodate any kind of layer ” shape layers included ” but other programs may have no idea what Photoshop is doing. Of all the formats, PDF is the most likely to work with other programs. Be sure to print and proof the document before taking it to a commercial printer. With Photoshop objects, you're working on the bleeding edge, so be prepared for the consequences.

The shape tools

Clicking the rectangle tool displays a flyout menu of six shape tools, pictured in Figure 7-1. You can also press U to select the rectangle tool, and then press Shift+U to switch from one shape tool to the next . The six shape tools work as follows :

image from book
Figure 7-1: Click the rectangle tool to display the shape tool's flyout menu, or press U and 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 actually 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 (Option-drag on the Mac) to draw the shape outward from the center.

    Tip  

    While drawing a rectangle or any other shape, press the space bar to reposition the shape. Then release the space bar 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.

    Tip  

    To lower or raise the Radius value in 1-pixel increments , press the bracket keys, [ and ]. Press Shift+[ or ] to lower or raise the value in 10-pixel increments.

  • Ellipse tool: The Ellipse tool draws, well, ellipses. Many people refer to the ellipse as an oval, and technically, this is not correct, but you get the idea. Shift-drag for circles; Alt-drag (Option-drag) 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 so on. Enter a Sides value in the Options bar to set the number of sides in the next polygon you draw.

    Tip  

    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 with the polygon tool by clicking on the Geometry Options button, as discussed in Step 4 of the next section.

  • Line tool: Not so much a line as just an extremely narrow rectangle, you enter a Weight value into the Options bar to define the thickness of the so-called line, and then drag in the image window. As shown later, this makes editing a line exceedingly difficult, and calling this tool a "line tool" is somewhat of a misnomer.

    Tip  

    Okay, so the Line tool is weird. But you can modify the Weight value in single-pixel increments by pressing the [ and ] keys. You can also add an arrowhead to a line using the Geometry Options button, discussed in Step 4 of the next section.

  • Custom shape tool: If you're familiar with Adobe Illustrator, Photoshop's shape tools may occasionally disappoint. You can't edit the roundness of an existing rectangle or add sides to a polygon while drawing it. And the kindest thing you can say about the Line tool is that it's nontraditional. Fortunately, the Custom shape tool makes up for the oversights and transgressions of its predecessors. 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, enhanced by the fact that you can also create your own custom shapes and add them to the presets.

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 labeled in Figure 7-2's Options bar you click. The first option (Shape Layer) creates a new shape layer when you draw with a shape tool; the second option(Paths) creates a conventional path, available for inspection in the Paths palette; and the final option (Fill Pixels) creates a pixel-based shape. In this last case, Photoshop doesn't add a new layer: it merely recolors the pixels on the active layer, typically within a selection. In fact, before the Shape tool was added to Photoshop, this was how rectangles and ellipses were created ” with the Marquee tool and the Fill command or Paint Bucket.

image from book
Figure 7-2: Use the options in the Options bar to specify the kind of shape you want to draw.

And that's just the beginning. Photoshop offers the aspiring shape artist a wealth of additional controls. Just for the record, here's the in-depth way to approach the process of drawing a shape layer.

STEPS: Creating a New Shape Layer

  1. Select the shape tool you want to use. Remember, U is the keyboard shortcut for the shape tools.

  2. 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, pattern, or image, you can do that after you finish drawing the shape, as discussed in the upcoming section "Editing the stuff inside the shape."

  3. Specify how you want to draw the shape. Pictured in Figure 7-2, 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 the first button is selected.

  4. Modify the geometry options. Click the down-pointing arrowhead to the right of the tool buttons in the Options bar (labeled "Custom shape options" in Figure 7-2) to see a pop-up palette of options geared to the selected shape tool. These enable 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 the ends of a line.

    Most of the geometry options are self-evident, but a few are tricky. When using the polygon tool, turn on the Star option to draw a star, and then use Indent Sides By to determine the angle of the spikes. Higher percentages mean sharper spikes. You can also round off the outside corners of a star or polygon or the inside corners of a star.

    When adding arrowheads to a line, the Width and Height values are measured relative to the line weight. A positive Concavity value bends the base of the arrowhead in; a negative value bends it out.

    Tip  

    The most 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 anti-aliasing in rectangles, select the Snap to Pixels check box to precisely align them with the pixels in the image.

  5. 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. You can edit either by pressing the bracket keys, [ and ].

    When drawing a custom shape, click the button to the right of the word "Shape" to display a pop-up palette of presets, as shown in Figure 7-2. Press the square brackets ( [ or ] ) to cycle from one preset shape to another. You can load more shapes by choosing the Load Shapes command or by choosing one of the shape libraries ” Animals, Arrows, Banners, and so forth ” listed in the lower half of the menu.

    Tip  

    To load all custom shapes that ship with Photoshop, choose the All command. When Photoshop asks you if you want to replace the current shapes with the new ones, click OK.

  6. Apply style and color. Unlike the other options discussed so far, you can assign a layer style or color to a shape either before you draw it or afterward. The key is the Link icon, labeled "Change active layer" in Figure 7-2. When turned on, the style and color options affect the active shape layer; when turned off, they affect the next shape you draw.

    Tip  

    The Style pop-up palette offers the very same presets available from the Styles palette, which are covered in the "Saving effects as styles" section at the end of this chapter. To cycle from one preset to another, press the comma (,) or period (.) key ” the former selects the previous style and the latter selects the next. Shift+comma selects the first style; Shift+period selects the last style.

  7. 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 7-3, 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, you'll see a florin icon(a cursive f) on the layer, and if you click the tiny triangle to the right of that (making the triangle point up instead of down), the list of styles displays under the layer.

    image from book
    Figure 7-3: A shape layer is actually a vector mask that masks a color, gradient, pattern, or other fill directly inside Photoshop.

  8. 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 paths to an active shape layer so that all shapes share the same fill, click the Add to Shape Area button in the Options bar. (It's labeled in Figure 7-4.) Then draw a new shape.

    image from book
    Figure 7-4: The five compound path buttons control the interaction of compound paths. The last four are available only when editing or adding to an existing shape layer.

    Tip  

    If you hit the Enter, Return, or Escape key, the current shape layer is deactivated, and you can no longer 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 on, it's a matter of editing the shape, as explained in the following sections.

Combining and editing shapes

If you're still giddy with excitement after Chapter 3's discussion of the History palette, and the nearly paradoxical time-traveling permutations it provides, hold onto your hats. Shape layers are equally malleable.

When Photoshop says "shape layer," think "perpetually editable vector mask." And make no mistake ” there's a lot to be said for anything that provides that level of freedom. Don't like a segment? Change it. Don't like a point? Move it. Hate the entire shape? Delete it. Here's how:

  • Compound path options: As explained in Step 8 in the previous 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 the language of the PostScript printer language, 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 compound path buttons, labeled in Figure 7-4. Turned on by default, the first button instructs Photoshop to create a shape on an independent layer ” in effect, ensuring that there is no compound path interaction. 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, and the fifth makes the intersection transparent.

  • Selecting shapes: To select and edit shapes, use the Direct Selection tool, also known as the arrow, or black arrow. Press A to get the black arrow tool (the white arrow, the Direct Selection tool's companion, is used for selecting paths, not shapes), which selects entire shapes at a time. Then click a shape to select it. To temporarily access the black arrow tool, press the Ctrl key ( z on the Mac) when using a shape tool.

  • Moving and transforming: Armed with the black arrow tool, 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 ( z -drag) a handle to skew or distort.

    Cross-Reference  

    If you need a transformation refresher, you can learn how to apply Transformations in Chapter 5.

  • Arranging and combining shapes: After selecting a shape with the black arrow tool, you can apply any of the four available compound path buttons. (Create New Shape Layer is unavailable, because it affects new shapes only.) As you make your selection, bear in mind that the topmost shape layer takes precedence. So if Shape A is set to Add, Shape B is set to Intersect, and Shape 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, you can fix the relationship by selecting two or more paths and clicking the Combine button in the Options bar. Photoshop then fuses the selected paths into one.

  • Selecting points and segments: Press Shift+A to get the white arrow tool, technically named the Path Selection tool. This tool selects individual points and segments in a path. Move individually selected points by dragging them; transform such points by pressing Ctrl+T ( z +T on the Mac). To select an entire path independently of any others on a layer, Alt-click (Option+click) its outline.

  • Adding and deleting points: The best tool for reshaping a shape is the Pen tool, which you get by pressing the P key. First select part of the shape with one of the selection tools. Then click a segment to insert a point that will serve as a sharp corner; click and drag a segment to add a smooth point, which defines a continuous arc. Click an existing point to delete it.

  • 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 back on.

  • 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.

    Tip  

    To delete an entire shape layer, just press the Backspace key (or Delete on the Mac). If the path outline is active, Photoshop asks you if you want to delete the entire layer, just the mask, or just the paths inside the mask. Select the first option and click OK to get rid of the entire layer. If the path outline isn't active when you press Backspace or Delete, Photoshop just deletes the layer, no questions asked.

  • Adding a vector mask to an existing layer: To add a vector mask to any kind of layer ” even one that contains standard image pixels ” first choose Layer Add Vector Mask Reveal All. Then select a shape tool, press the + key to make sure Photoshop is ready to add a shape, and draw as you normally would. There you have it: an image inside a vector mask.

    Tip  

    Better yet, instead of choosing the Reveal All command, just press the Ctrl key ( z on the Mac) and click the Add Layer Mask icon at the bottom of the Layers palette. This creates a blank vector mask, ready for you to add shapes. Grab yourself a shape tool, press the + key, and start drawing.

  • Defining your own custom shape: If you create a shape that you think you may want to repeat in the future, select the shape with either selection tool and choose Edit Define Custom Shape. Then name the shape and press Enter or Return. Photoshop adds the shape to the presets so you can draw it with the Custom Shape tool.

Editing the stuff inside the shape

What kind of a tool would Photoshop be if it didn't provide you with a plethora of possible methods for manipulating shape layers. The following are a just a few of the 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 and 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 the vector mask thumbnail to display the Blending Options section of the Layer Style dialog box, covered in Chapter 6. You can also apply or modify layer effects, as explained 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.

  • Fill with a gradient or repeating pattern: Don't want to fill your shape with a solid color? You 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. Figure 7-5 shows the dialog box for each. Most of the options will be familiar to the serious Photoshop user . The only unusual options are in the Pattern Fill dialog box. The Scale value enables you to resize the pattern inside the shape; Link with Layer makes sure that the shape and pattern move together; and Snap to Origin snaps the pattern into alignment with the origin.

    image from book
    Figure 7-5: Gradients and patterns inside a shape layer are considered a dynamic fill, which means you can edit them simply by double-clicking the layer contents thumbnail and editing the options described in this section.

    Tip  

    You can reposition a gradient or pattern inside its 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.

    Cross-Reference  

    For more on Adjustment Layers, see Chapter 11.

  • 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 healing brush, 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. One method is mentioned at the end of the previous section. Here's another: Draw a shape not as a new shape layer, but rather as a path by selecting the Paths button in the Options bar. 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 path, Ctrl-click ( z -click on the Mac) the Add Layer Mask icon at the bottom of the Layers palette to make the path clip the active image layer.

  • From clipping mask to vector mask: What if you've already made a shape layer, and now you want to fill that shape with an image? Move the image to an independent layer in front of the shape layer (and position the image literally on top of the shape), select both layers, and then press Ctrl+G ( z +G on the Mac) to group the image layer with the shape layer. You now have a clipping mask with the shape masking the contents of the image above it. Note that if your shape has a layer style applied, you need to either hide the style (right-click the layer and choose Hide All Effects) or remove the style or styles in order for the image to become the shape's apparent fill.

  • Fusing image and shape layer: If you want for any reason to fuse those two layers together, you can't just hit Ctrl+E ( z +E on the Mac). Here's what you have to do: First, select the shape layer and choose Layer Rasterize Fill Content to convert the dynamic fill to pixels. Then you can select the image layer and press Ctrl+E ( z +E on the 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 in one layer, enabling you to mix soft edges and razor sharp outlines.

In Figure 7-6, the vector mask thumbnail in the Layers palette is Ctrl-clicked ( z -clicked) to load the crown shape as a selection outline. Then the selection is converted to a layer mask by clicking the Add Layer Mask icon at the bottom of the Layers palette. The result is a layer mask that is identical to the vector mask. The question you're now probably asking is, "Why'd you do that?" "To set up the following figure" would be the answer. In Figure 7-7, Filter Blur Gaussian Blur is applied to feather the layer mask. Then Filter Pixelate Crystallize is applied to add mosaic edges. The result is organic, rippling edges along the inside of a sharp vector shape. The layer mask masks the layer, and then the vector mask masks that.

image from book
Figure 7-6: Add a layer mask to a shape layer to add pixel-based softening to the razor-sharp vector mask.
image from book
Figure 7-7: Applying the Gaussian Blur (left) and Crystallize filters to the layer mask mixes a soft pixellated effect with the hard edges provided by the vector mask (right).

The Gaussian Blur command is explained in Chapter 8. For more information on Crystallize, see Chapter 9.



Photoshop CS2 Bible
Photoshop CS2 Bible
ISBN: 0764589725
EAN: 2147483647
Year: 2003
Pages: 95

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net