Making animated GIFs directly from diagrams using Cairo.

Ready to merge