ungerik / go-cairo

Go binding for the cairo graphics library
Other
142 stars 32 forks source link

make go-cairo compile with cairo versions older than 1.16 #31

Closed pebbe closed 6 months ago

pebbe commented 6 months ago

The function SVGSurfaceSetDocumentUnit doesn't work with Cairo older than version 1.16, because it didn't have the function cairo_svg_surface_set_document_unit. This caused compiling of go-cairo to fail.

This update adds a do-nothing implementation of cairo_svg_surface_set_document_unit if the detected version of Cairo is older than 1.16.