Cheese and Lettuce on Toast
This example illustrates how to merge paths. It extends the previous example Lettuce on Toast. The aim is to create the image shown in Figure 11.15.
- Load the image you created in the
lettuce on toast example, using the
File->Open menu item, or clicking on the load image
button.
- To create the slice of cheese, select the
rectangle tool, and set the
fill colour to yellow.
Make a rectangle, as illustrated in Figure 11.12.
This slice of cheese is going to have holes in it, and we need to be able to see the lettuce and toast through the holes. Since this is not a uniform colour, we can't just, say, put green ellipses on top of the cheese as this won't look right. Instead, we are going to create some ellipses, and then merge them into the yellow rectangle. To do this, first select the ellipse tool, and create some ellipses on top of the yellow rectangle (Figure 11.13).Figure 11.12: Cheese and Lettuce on Toast Example--A Filled Rectangle Figure 11.13: Cheese and Lettuce on Toast Example--Adding Ellipses - Now select all the ellipses
you created in the previous step and the yellow rectangle
(Figure 11.14(a)) and
merge them using the
Transform->Merge Paths menu item (Figure 11.14(b)).
If the ellipses remain filled, check to make sure you have the
winding rule set to even-odd.
(Alternatively, you can use the Transform->Subtract Paths
menu item, in which case you don't need to worry about the winding
rule.)
(a) (b) Figure 11.14: Cheese and Lettuce on Toast Example--merging paths: (a) paths selected; (b) paths merged into a single path.