Lettuce on Toast | An Artificial Neuron

#
Cheese and Lettuce on Toast

This example illustrates how to merge paths. It extends the previous example |
|. The aim is to create the image shown in Figure 11.15.

1. Load the image you created in the |
   |, using the File->Open... menu item, or clicking on the load image button.

2. To create the slice of cheese, select the |
   |, and set the |
   | to yellow. Make a rectangle, as illustrated in Figure 11.12.

   Figure 11.12: Cheese and Lettuce on Toast Example--A Filled Rectangle

   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 |
   |, and create some ellipses on top of the yellow rectangle (Figure 11.13).

   Figure 11.13: Cheese and Lettuce on Toast Example--Adding Ellipses

3. Now |
   | all the ellipses you created in the previous step and the yellow rectangle (Figure 11.14(a)) and |
   | them using the Transform->Merge Paths menu item (Figure 11.14(b)). If the ellipses remain filled, check to make sure you have the |
   | 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.

Figure 11.15: Cheese and Lettuce on Toast Example--Completed Image

Lettuce on Toast | An Artificial Neuron