cairo_status_t is used to indicate errors that can occur when
using Cairo. In some cases it is returned directly by functions.
but when using cairo_t, the last error, if any, is stored in
the context and can be retrieved with cairo_status().
New entries may be added in future versions. Use Status.toString
to get a human-readable representation of an error message.
CAIRO_STATUS_SUCCESS
no error has occurred (Since 1.0)
CAIRO_STATUS_NO_MEMORY
out of memory (Since 1.0)
CAIRO_STATUS_INVALID_RESTORE
cairo_restore() called without matching cairo_save() (Since 1.0)
CAIRO_STATUS_INVALID_POP_GROUP
no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0)
CAIRO_STATUS_NO_CURRENT_POINT
no current point defined (Since 1.0)
CAIRO_STATUS_INVALID_MATRIX
invalid matrix (not invertible) (Since 1.0)
CAIRO_STATUS_INVALID_STATUS
invalid value for an input cairo_status_t (Since 1.0)
CAIRO_STATUS_NULL_POINTER
NULL pointer (Since 1.0)
CAIRO_STATUS_INVALID_STRING
input string not valid UTF-8 (Since 1.0)
CAIRO_STATUS_INVALID_PATH_DATA
input path data not valid (Since 1.0)
CAIRO_STATUS_READ_ERROR
error while reading from input stream (Since 1.0)
CAIRO_STATUS_WRITE_ERROR
error while writing to output stream (Since 1.0)
CAIRO_STATUS_SURFACE_FINISHED
target surface has been finished (Since 1.0)
CAIRO_STATUS_SURFACE_TYPE_MISMATCH
the surface type is not appropriate for the operation (Since 1.0)
CAIRO_STATUS_PATTERN_TYPE_MISMATCH
the pattern type is not appropriate for the operation (Since 1.0)
CAIRO_STATUS_INVALID_CONTENT
invalid value for an input cairo_content_t (Since 1.0)
CAIRO_STATUS_INVALID_FORMAT
invalid value for an input cairo_format_t (Since 1.0)
CAIRO_STATUS_INVALID_VISUAL
invalid value for an input Visual* (Since 1.0)
CAIRO_STATUS_FILE_NOT_FOUND
file not found (Since 1.0)
CAIRO_STATUS_INVALID_DASH
invalid value for a dash setting (Since 1.0)
CAIRO_STATUS_INVALID_DSC_COMMENT
invalid value for a DSC comment (Since 1.2)
CAIRO_STATUS_INVALID_INDEX
invalid index passed to getter (Since 1.4)
CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
clip region not representable in desired format (Since 1.4)
CAIRO_STATUS_TEMP_FILE_ERROR
error creating or writing to a temporary file (Since 1.6)
CAIRO_STATUS_INVALID_STRIDE
invalid value for stride (Since 1.6)
CAIRO_STATUS_FONT_TYPE_MISMATCH
the font type is not appropriate for the operation (Since 1.8)
CAIRO_STATUS_USER_FONT_IMMUTABLE
the user-font is immutable (Since 1.8)
CAIRO_STATUS_USER_FONT_ERROR
error occurred in a user-font callback function (Since 1.8)
CAIRO_STATUS_NEGATIVE_COUNT
negative number used where it is not allowed (Since 1.8)
CAIRO_STATUS_INVALID_CLUSTERS
input clusters do not represent the accompanying text and glyph array (Since 1.8)
CAIRO_STATUS_INVALID_SLANT
invalid value for an input cairo_font_slant_t (Since 1.8)
CAIRO_STATUS_INVALID_WEIGHT
invalid value for an input cairo_font_weight_t (Since 1.8)
CAIRO_STATUS_INVALID_SIZE
invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10)
CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
user-font method not implemented (Since 1.10)
CAIRO_STATUS_DEVICE_TYPE_MISMATCH
the device type is not appropriate for the operation (Since 1.10)
CAIRO_STATUS_DEVICE_ERROR
an operation to the device caused an unspecified error (Since 1.10)
CAIRO_STATUS_INVALID_MESH_CONSTRUCTION
a mesh pattern
construction operation was used outside of a
MeshPattern.beginPatch/MeshPattern.endPatch
pair (Since 1.12)
CAIRO_STATUS_DEVICE_FINISHED
target device has been finished (Since 1.12)
CAIRO_STATUS_LAST_STATUS
this is a special value indicating the number of
status values defined in this enumeration. When using this value, note
that the version of cairo at run-time may have additional status values
defined than the value of this symbol at compile-time. (Since 1.10)
Since 1.0
cairo_status_t is used to indicate errors that can occur when using Cairo. In some cases it is returned directly by functions. but when using cairo_t, the last error, if any, is stored in the context and can be retrieved with cairo_status(). New entries may be added in future versions. Use Status.toString to get a human-readable representation of an error message. CAIRO_STATUS_SUCCESS no error has occurred (Since 1.0) CAIRO_STATUS_NO_MEMORY out of memory (Since 1.0) CAIRO_STATUS_INVALID_RESTORE cairo_restore() called without matching cairo_save() (Since 1.0) CAIRO_STATUS_INVALID_POP_GROUP no saved group to pop, i.e. cairo_pop_group() without matching cairo_push_group() (Since 1.0) CAIRO_STATUS_NO_CURRENT_POINT no current point defined (Since 1.0) CAIRO_STATUS_INVALID_MATRIX invalid matrix (not invertible) (Since 1.0) CAIRO_STATUS_INVALID_STATUS invalid value for an input cairo_status_t (Since 1.0) CAIRO_STATUS_NULL_POINTER NULL pointer (Since 1.0) CAIRO_STATUS_INVALID_STRING input string not valid UTF-8 (Since 1.0) CAIRO_STATUS_INVALID_PATH_DATA input path data not valid (Since 1.0) CAIRO_STATUS_READ_ERROR error while reading from input stream (Since 1.0) CAIRO_STATUS_WRITE_ERROR error while writing to output stream (Since 1.0) CAIRO_STATUS_SURFACE_FINISHED target surface has been finished (Since 1.0) CAIRO_STATUS_SURFACE_TYPE_MISMATCH the surface type is not appropriate for the operation (Since 1.0) CAIRO_STATUS_PATTERN_TYPE_MISMATCH the pattern type is not appropriate for the operation (Since 1.0) CAIRO_STATUS_INVALID_CONTENT invalid value for an input cairo_content_t (Since 1.0) CAIRO_STATUS_INVALID_FORMAT invalid value for an input cairo_format_t (Since 1.0) CAIRO_STATUS_INVALID_VISUAL invalid value for an input Visual* (Since 1.0) CAIRO_STATUS_FILE_NOT_FOUND file not found (Since 1.0) CAIRO_STATUS_INVALID_DASH invalid value for a dash setting (Since 1.0) CAIRO_STATUS_INVALID_DSC_COMMENT invalid value for a DSC comment (Since 1.2) CAIRO_STATUS_INVALID_INDEX invalid index passed to getter (Since 1.4) CAIRO_STATUS_CLIP_NOT_REPRESENTABLE clip region not representable in desired format (Since 1.4) CAIRO_STATUS_TEMP_FILE_ERROR error creating or writing to a temporary file (Since 1.6) CAIRO_STATUS_INVALID_STRIDE invalid value for stride (Since 1.6) CAIRO_STATUS_FONT_TYPE_MISMATCH the font type is not appropriate for the operation (Since 1.8) CAIRO_STATUS_USER_FONT_IMMUTABLE the user-font is immutable (Since 1.8) CAIRO_STATUS_USER_FONT_ERROR error occurred in a user-font callback function (Since 1.8) CAIRO_STATUS_NEGATIVE_COUNT negative number used where it is not allowed (Since 1.8) CAIRO_STATUS_INVALID_CLUSTERS input clusters do not represent the accompanying text and glyph array (Since 1.8) CAIRO_STATUS_INVALID_SLANT invalid value for an input cairo_font_slant_t (Since 1.8) CAIRO_STATUS_INVALID_WEIGHT invalid value for an input cairo_font_weight_t (Since 1.8) CAIRO_STATUS_INVALID_SIZE invalid value (typically too big) for the size of the input (surface, pattern, etc.) (Since 1.10) CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED user-font method not implemented (Since 1.10) CAIRO_STATUS_DEVICE_TYPE_MISMATCH the device type is not appropriate for the operation (Since 1.10) CAIRO_STATUS_DEVICE_ERROR an operation to the device caused an unspecified error (Since 1.10) CAIRO_STATUS_INVALID_MESH_CONSTRUCTION a mesh pattern construction operation was used outside of a MeshPattern.beginPatch/MeshPattern.endPatch pair (Since 1.12) CAIRO_STATUS_DEVICE_FINISHED target device has been finished (Since 1.12) CAIRO_STATUS_LAST_STATUS this is a special value indicating the number of status values defined in this enumeration. When using this value, note that the version of cairo at run-time may have additional status values defined than the value of this symbol at compile-time. (Since 1.10) Since 1.0