Creating Compound Paths
A compound path is a single path that consists of more than one path. That sounds like an oxymoron, no? Think of the letter O in the alphabet. It appears to be a large circle with a smaller circle cut out from its center. How is such a shape created with Illustrator? The answer is by drawing two circles and combining them to become a single compound path. You do this by choosing Object > Compound Path > Create. The result is a shape with a hole cut out of the middle (Figure 4.33). Compound paths are treated as one entity, and therefore, both paths that make up this compound path take on the attributes of the bottommost path. If your compound path consists of multiple shapes, Illustrator does its best to figure out which paths become hollow and which appear solid.
Figure 4.33 An example of a compound path. The hole in the center is actually cut out from the path, and objects that appear beneath the compound shape are visible through the hole.
Illustrator uses one of two methods to decide which paths of a compound shape are hollow and which are solid. The default method is the Non-Zero Winding Fill Rule method; Illustrator can also use another method, the Even-Odd Fill Rule method. You'll find both of these buttons in the Attributes panel, and you can choose them when a compound path is selected on the artboard (Figure 4.34). By default, Illustrator uses Non-Zero Winding Fill Rule and makes the bottommost path clockwise and all the other selected paths counterclockwise.
Figure 4.34 You can use the Attributes panel to choose one of the two supported compound path methods for determining hollow and solid areas.
When you create a compound path and click Non-Zero Winding Fill Rule, you can manually reverse the path direction to control whether a shape is hollow or solid. Use the Direct Selection tool to select the path you need, and click the appropriate button in the Attributes panel (Figure 4.35).
Figure 4.35 Using the Attributes panel to manually reverse the direction of a path, you can specify whether a part of a compound path using Non-Zero Winding Fill Rule is hollow or solid.