Refactored the cairo backend to support the deep embedding.

This can be generalized.