On win32 (with cairo 1.10), some sequence may throw out "cairo: invalid matrix" error
This is a known bug on cairo version 1.10
https://github.com/diagrams/diagrams-cairo/issues/8