See these examples in Cairo and PyCairo: - https://zetcode.com/gfx/cairo/transformations/ - https://gist.github.com/bert/1164354/75fd53542bc6fda77d22c435e349ee5f96ced1e7 - https://zetcode.com/gfx/pycairo/transformations/
See these examples in Cairo and PyCairo: