Cairo provides the ability to examine the version at either
compile-time or run-time and in both a human-readable form as well as
an encoded form suitable for direct comparison. Cairo also provides the
function cairoVersionEncode()
to perform the encoding.
Compile-time
--------
R users should not be concerned with compile-time version checking. Run-time
--------
cairoVersionString() Human-readable, use compareVersion() for comparison
cairoVersion() Encoded, not very useful in R
For example, checking that the cairo version is greater than or equal
to 1.0.0 could be achieved at compile-time or run-time as follows:
# R users should not be concerned with compile-time checking, but at runtime: if (compareVersion(cairoVersionString(), "1.0.0") == 1)
cat("Running with suitable cairo version:", cairoVersionString(), "\n")