Name
ccontext:Status -- get context status
Synopsis
status = ccontext:Status()
Function
Checks whether an error has previously occurred for this context. The following status codes are currently defined:

#CAIRO_STATUS_SUCCESS
No error has occurred.
#CAIRO_STATUS_NO_MEMORY
Out of memory
#CAIRO_STATUS_INVALID_RESTORE
ccontext:Restore() called without matching ccontext:Save()
#CAIRO_STATUS_INVALID_POP_GROUP
No saved group to pop, i.e. ccontext:PopGroup() without matching ccontext:PushGroup()
#CAIRO_STATUS_NO_CURRENT_POINT
No current point defined
#CAIRO_STATUS_INVALID_MATRIX
Invalid matrix (not invertible)
#CAIRO_STATUS_INVALID_STATUS
Invalid value for an input Cairo status
#CAIRO_STATUS_NULL_POINTER
NULL pointer
#CAIRO_STATUS_INVALID_STRING
Input string not valid UTF-8
#CAIRO_STATUS_INVALID_PATH_DATA
Input path data not valid
#CAIRO_STATUS_READ_ERROR
Error while reading from input stream
#CAIRO_STATUS_WRITE_ERROR
Error while writing to output stream
#CAIRO_STATUS_SURFACE_FINISHED
Target surface has been finished
#CAIRO_STATUS_SURFACE_TYPE_MISMATCH
The surface type is not appropriate for the operation
#CAIRO_STATUS_PATTERN_TYPE_MISMATCH
The pattern type is not appropriate for the operation
#CAIRO_STATUS_INVALID_CONTENT
Invalid value for an input Cairo content
#CAIRO_STATUS_INVALID_FORMAT
Invalid value for an input Cairo format
#CAIRO_STATUS_INVALID_VISUAL
Invalid value for an input visual
#CAIRO_STATUS_FILE_NOT_FOUND
File not found
#CAIRO_STATUS_INVALID_DASH
Invalid value for a dash setting
#CAIRO_STATUS_INVALID_DSC_COMMENT
Invalid value for a DSC comment
#CAIRO_STATUS_INVALID_INDEX
Invalid index passed to getter
#CAIRO_STATUS_CLIP_NOT_REPRESENTABLE
Clip region not representable in desired format
#CAIRO_STATUS_TEMP_FILE_ERROR
Error creating or writing to a temporary file
#CAIRO_STATUS_INVALID_STRIDE
Invalid value for stride
#CAIRO_STATUS_FONT_TYPE_MISMATCH
The font type is not appropriate for the operation
#CAIRO_STATUS_USER_FONT_IMMUTABLE
The user-font is immutable
#CAIRO_STATUS_USER_FONT_ERROR
Error occurred in a user-font callback function
#CAIRO_STATUS_NEGATIVE_COUNT
Negative number used where it is not allowed
#CAIRO_STATUS_INVALID_CLUSTERS
Input clusters do not represent the accompanying text and glyph array
#CAIRO_STATUS_INVALID_SLANT
Invalid value for an input Cairo font slant
#CAIRO_STATUS_INVALID_WEIGHT
Invalid value for an input Cairo font weight
#CAIRO_STATUS_INVALID_SIZE
Invalid value (typically too big) for the size of the input (surface, pattern, etc.)
#CAIRO_STATUS_USER_FONT_NOT_IMPLEMENTED
User-font method not implemented
#CAIRO_STATUS_DEVICE_TYPE_MISMATCH
The device type is not appropriate for the operation
#CAIRO_STATUS_DEVICE_ERROR
An operation to the device caused an unspecified error
#CAIRO_STATUS_INVALID_MESH_CONSTRUCTION
A mesh pattern construction operation was used outside begin end patch pair
#CAIRO_STATUS_DEVICE_FINISHED
Target device has been finished
#CAIRO_STATUS_JBIG2_GLOBAL_MISSING
#CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID has been used on at least one image but no image provided #CAIRO_MIME_TYPE_JBIG2_GLOBAL
#CAIRO_STATUS_PNG_ERROR
Error occurred in libpng while reading from or writing to a PNG file
#CAIRO_STATUS_FREETYPE_ERROR
Error occurred in libfreetype
#CAIRO_STATUS_WIN32_GDI_ERROR
Error occurred in the Windows Graphics Device Interface
#CAIRO_STATUS_TAG_ERROR
Invalid tag name, attributes, or nesting
#CAIRO_STATUS_DWRITE_ERROR
Error occurred in the Windows Direct Write API
#CAIRO_STATUS_SVG_FONT_ERROR
Error occurred in OpenType-SVG font rendering

Inputs
none

Results
status
the current status of this context

Show TOC