version_

Returns the version of the cairo library encoded in a single integer as per CAIRO_VERSION_ENCODE. The encoding ensures that later versions compare greater than earlier versions.

A run-time comparison to check that cairo's version is greater than or equal to version X.Y.Z could be performed as follows:

<informalexample><programlisting> if (cairo.global.version_ >= CAIRO_VERSION_ENCODE(X,Y,Z)) {...} </programlisting></informalexample>

See also cairo.global.versionString as well as the compile-time equivalents CAIRO_VERSION and CAIRO_VERSION_STRING.

int
version_
()

Return Value

Type: int

the encoded version.