See these examples: - https://zetcode.com/gfx/cairo/cairobackends/ - https://zetcode.com/gfx/cairo/basicdrawing/ - https://zetcode.com/gfx/cairo/shapesfills/
See these examples: