We talked about drawing open paths (lines) and closed paths (shapes of all sorts) on page 28. There’s another path type that you’ll often run across when drawing shapes—a compound path.
A compound path is made of two (or more) overlapping paths, and where they overlap a hole is created in the bottom fill by the shape of the top path. That may sound confusing, but it’s easy to do.
Task 16 Draw a compound path
- Draw a star shape: Select the Star tool from the Tools panel, then drag a star shape on an artboard (see page 42 if you need more details). Fill it with a color if it isn’t already.
- Now select the Ellipse tool and drag a circle shape (page 41) on top of the star shape.
Choose the Selection tool and marquee around both shapes (below).
With both shapes selected, choose Object > Compound Path > Make.
A circle-shaped hole is cut out of the star shape (left). A compound path takes on the fill and stroke attributes of the backmost object (the star), and it behaves like a grouped object. When other shapes are behind the compound path, they show through the hole in the compound path. Use the white Direct Selection tool to select individual parts of the compound path.
- To release a selected compound path, choose Object > Compound Path > Release.