[cairo] since which version? cairo.Format
buhtz at posteo.de
buhtz at posteo.de
Tue Dec 18 08:06:39 UTC 2018
> > > It was added with 1.13, see
> > > https://pycairo.readthedocs.io/en/latest/reference/enums.html#cairo.Format
> >
> > Is this "cairo.version" (pycairo) or "cairo.cairo_version()" (C
> > cairo library)?
>
> pycairo.
So this would do the trick I think.
if cairo.version_info >= (1, 13, 0):
_surface_format = cairo.Format.RGB24,
else:
_surface_format = cairo.FORMAT_RGB24
More information about the cairo
mailing list