previous   Lettuce on ToastAn Artificial Neuron   next


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.

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

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

    Figure 11.12: Cheese and Lettuce on Toast Example--A Filled Rectangle
    Image cheese1.png

  3. 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.13: Cheese and Lettuce on Toast Example--Adding Ellipses
    Image cheese2.png

  4. 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.)

    Figure 11.14: Cheese and Lettuce on Toast Example--merging paths: (a) paths selected; (b) paths merged into a single path.
    Image cheese3a.png
    (a)
    Image cheese3b.png
    (b)

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


previous   Lettuce on ToastAn Artificial Neuron   next