Up: cl-cffi-gtk API documentation

Package cairo

Cairo is a software library used to provide a vector graphics-based, device-independent API for software developers. It is designed to provide primitives for 2-dimensional drawing across a number of different backends. Cairo is designed to use hardware acceleration when available.

This is the API documentation of a Lisp binding to Cairo. At this time only a few types and functions are implemented, which are needed to compile the Lisp bindung to GTK.

About This Package

Drawing
Fonts
Surfaces
Utilities

Drawing


The Cairo drawing context

A cairo-t context is the main object used when drawing with Cairo. To draw with Cairo, you create a cairo-t context, set the target surface, and drawing options for the cairo-t context, create shapes with functions like the cairo-move-to and cairo-line-to functions, and then draw shapes with the cairo-stroke or cairo-fill functions.

The cairo-t context can be pushed to a stack via the cairo-save function. They may then safely be changed, without losing the current state. Use the cairo-restore function to restore to the saved state.

Specifies the type of antialiasing to do when rendering text or shapes. ...

The cairo-fill-rule-t enumeration is used to select how paths are filled. ...

Specifies how to render the endpoints of the path when stroking. ...

Specifies how to render the junction of two lines when stroking. ...

The cairo-operator-t enumeration is used to set the compositing operator for all Cairo drawing operations. ...

A data structure for holding a rectangle. ...

A data structure for holding a dynamically allocated array of rectangles. ...

A cairo-t context contains the current state of the rendering device, including coordinates of yet to be drawn shapes. ...

Creates a new Cairo context with all graphics state parameters set to default values and with target as a target surface. ...

Increases the reference count on cr by one. ...

Decreases the reference count on cr by one. ...

Checks whether an error has previously occurred for this Cairo context. ...

Makes a copy of the current state of cr and saves it on an internal stack of saved states for cr. ...

Restores cr to the state saved by a preceding call to the cairo-save function and removes that state from the stack of saved states. ...

Gets the target surface for the Cairo context as passed to the cairo-create function. ...

Temporarily redirects drawing to an intermediate surface known as a group. ...

Temporarily redirects drawing to an intermediate surface known as a group. ...

Terminates the redirection begun by a call to the cairo-push-group or cairo-push-group-with-content functions and returns a new pattern containing the results of all drawing operations performed to the group. ...

Terminates the redirection begun by a call to the cairo-push-group or cairo-push-group-with-content functions and installs the resulting pattern as the source pattern in the given Cairo context. ...

Gets the current destination surface for the Cairo context. ...

Sets the source pattern within cr to an opaque color. ...

Sets the source pattern within cr to a translucent color. ...

Sets the source pattern within cr to source. ...

This is a convenience function for creating a pattern from surface and setting it as the source in cr with the cairo-set-source function. ...

Gets the current source pattern for cr. ...

Set the antialiasing mode of the rasterizer used for drawing shapes. ...

Gets the current shape antialiasing mode, as set by the cairo-set-antialias function. ...

Sets the dash pattern to be used by the cairo-stroke function. ...

This function returns the length of the dash array in cr, 0 if dashing is not currently in effect. ...

Gets the current dash list. ...

Set the current fill rule within the Cairo context. ...

Gets the current fill rule, as set by the cairo-set-fill-rule function. ...

Sets the current line cap style within the Cairo context. ...

Gets the current line cap style, as set by the cairo-set-line-cap function. ...

Sets the current line join style within the Cairo context. ...

Gets the current line join style, as set by the cairo-set-line-join function. ...

Sets the current line width within the Cairo context. ...

This function returns the current line width value exactly as set by the cairo-set-line-width function. ...

Sets the current miter limit within the Cairo context. ...

Gets the current miter limit, as set by the cairo-set-miter-limit function. ...

Sets the compositing operator to be used for all drawing operations. ...

Gets the current compositing operator for a Cairo context. ...

Sets the tolerance used when converting paths into trapezoids. ...

Gets the current tolerance value, as set by the cairo-set-tolerance function. ...

Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by the cairo-fill function and according to the current fill rule, see the cairo-set-fill-rule function. ...

Establishes a new clip region by intersecting the current clip region with the current path as it would be filled by the cairo-fill function and according to the current fill rule. ...

Computes a bounding box in user coordinates covering the area inside the current clip. ...

Tests whether the given point is inside the area that would be visible through the current clip, i.e. the area that would be filled by a call to the cairo-paint function. ...

Reset the current clip region to its original, unrestricted state. ...

Unconditionally frees rectangles and all associated references. ...

Gets the current clip region as a list of rectangles in user coordinates. ...

A drawing operator that fills the current path according to the current fill rule, each sub-path is implicitly closed before being filled. ...

A drawing operator that fills the current path according to the current fill rule, each sub-path is implicitly closed before being filled. ...

Computes a bounding box in user coordinates covering the area that would be affected, the "inked" area, by a cairo-fill operation given the current path and fill parameters. ...

Tests whether the given point is inside the area that would be affected by a cairo-fill operation given the current path and filling parameters. ...

A drawing operator that paints the current source using the alpha channel of pattern as a mask. ...

A drawing operator that paints the current source using the alpha channel of surface as a mask. ...

A drawing operator that paints the current source everywhere within the current clip region. ...

A drawing operator that paints the current source everywhere within the current clip region using a mask of constant alpha value alpha. ...

A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. ...

A drawing operator that strokes the current path according to the current line width, line join, line cap, and dash settings. ...

Computes a bounding box in user coordinates covering the area that would be affected, the "inked" area, by a cairo-stroke operation given the current path and stroke parameters. ...

Tests whether the given point is inside the area that would be affected by a cairo-stroke operation given the current path and stroking parameters. ...

Emits the current page for backends that support multiple pages, but does not clear it, so, the contents of the current page will be retained for the next page too. ...

Emits and clears the current page for backends that support multiple pages. ...

Returns the current reference count of cr. ...


Paths

Creating paths and manipulating path data.

Paths are the most basic drawing tools and are primarily used to implicitly generate simple masks.

The cairo-path-data-type-t enumeration is used to describe the type of one portion of a path when represented as a cairo-path-t instance. ...

The cairo-path-data-t structure is used to represent the path data inside a cairo-path-t instance. ...

A data structure for holding a path. ...

Creates a copy of the current path and returns it to the user as a cairo-path-t structure. ...

Gets a flattened copy of the current path and returns it to the user as a cairo-path-t structure. ...

Immediately releases all memory associated with path. ...

Append path onto the current path. ...

Returns whether a current point is defined on the current path. ...

Gets the current point of the current path, which is conceptually the final point reached by the path so far. ...

Clears the current path. ...

Begin a new sub-path. ...

Adds a line segment to the path from the current point to the beginning of the current sub-path, the most recent point passed to the cairo-move-to function, and closes this sub-path. ...

Adds a circular arc of the given radius to the current path. ...

Adds a circular arc of the given radius to the current path. ...

Adds a cubic Bezier spline to the path from the current point to position (x3, y3) in user-space coordinates, using (x1, y1) and (x2, y2) as the control points. ...

Adds a line to the path from the current point to position (x, y) in user-space coordinates. ...

Begin a new sub-path. ...

Adds a closed sub-path rectangle of the given size to the current path at position (x, y) in user-space coordinates. ...

Adds closed paths for the glyphs to the current path. ...

Adds closed paths for text to the current path. ...

Relative-coordinate version of the cairo-curve-to function. ...

Relative-coordinate version of the cairo-line-to function. ...

Begin a new sub-path. ...

Computes a bounding box in user-space coordinates covering the points on the current path. ...


Pattern

Sources for drawing.

The cairo-pattern-t structure is the paint with which Cairo draws. The primary use of patterns is as the source for all Cairo drawing operations, although they can also be used as masks, that is, as the brush too.

A Cairo pattern is created by using one of the many constructors, of the form cairo-pattern-create-type or implicitly through the cairo-set-source-type functions.

A cairo-pattern-t structure represents a source when drawing onto a surface. ...

The cairo-extend-t enumeration is used to describe how pattern color/alpha will be determined for areas "outside" the pattern's natural area, for example, outside the surface bounds or outside the gradient geometry. ...

The cairo-filter-t enumeration is used to indicate what filtering should be applied when reading pixel values from patterns. ...

The cairo-pattern-type-t enumeration is used to describe the type of a given pattern. ...

Adds an opaque color stop to a gradient pattern. ...

Adds a translucent color stop to a gradient pattern. ...

Gets the number of color stops specified in the given gradient pattern. ...

Gets the color and offset information at the given index for a gradient pattern. ...

Creates a new cairo-pattern-t instance corresponding to an opaque color. ...

Creates a new cairo-pattern-t instance corresponding to a translucent color. ...

Gets the solid color for a solid color pattern. ...

Create a new cairo-pattern-t instance for the given surface. ...

Gets the surface of a surface pattern. ...

Create a new linear gradient cairo-pattern-t instance along the line defined by (x0, y0) and (x1, y1). ...

Gets the gradient endpoints for a linear gradient. ...

Creates a new radial gradient cairo-pattern-t instance between the two circles defined by (x0, y0, radius0) and (x1, y1, radius1). ...

Gets the gradient endpoint circles for a radial gradient, each specified as a center coordinate and a radius. ...

Create a new mesh pattern. ...

Begin a patch in a mesh pattern. ...

Indicates the end of the current patch in a mesh pattern. ...

Define the first point of the current patch in a mesh pattern. ...

Adds a line to the current patch from the current point to position (x, y) in pattern-space coordinates. ...

Adds a cubic Bézier spline to the current patch from the current point to position (x3, y3) in pattern-space coordinates, using (x1, y1) and (x2, y2) as the control points. ...

Set an internal control point of the current patch. ...

Sets the color of a corner of the current patch in a mesh pattern. ...

Sets the color of a corner of the current patch in a mesh pattern. ...

Gets the number of patches specified in the given mesh pattern. ...

Gets path defining the patch patch-num for a mesh pattern. ...

Gets the control point point-num of patch patch-num for a mesh pattern. ...

Gets the color information in corner corner-num of patch patch-num for a mesh pattern. ...

Increases the reference count on pattern by one. ...

Decreases the reference count on pattern by one. ...

Checks whether an error has previously occurred for this pattern. ...

Sets the mode to be used for drawing outside the area of a pattern. ...

Gets the current extend mode for a pattern. ...

Sets the filter to be used for resizing when using this pattern. ...

Gets the current filter for a pattern. ...

Sets the pattern's transformation matrix to matrix. ...

Stores the pattern's transformation matrix into matrix. ...

This function returns the type of a pattern. ...

Returns the current reference count of pattern. ...


Regions

Representing a pixel-aligned area.

Regions are a simple graphical data type representing an area of integer-aligned rectangles. They are often used on raster surfaces to track areas of interest, such as change or clip areas.

Used as the return value for the function cairo-region-contains-rectangle. ...

A cairo-region-t structure represents a set of integer-aligned rectangles. ...

Allocates a new empty region instance. ...

Allocates a new region instance containing rect. ...

Allocates a new region instance containing the union of all given rects. ...

Allocates a new region instance copying the area from region. ...

Increases the reference count on region by one. ...

Destroys a cairo-region-t instance created with the functions cairo-region-create, cairo-region-copy, or cairo-region-create-rectangle. ...

Checks whether an error has previous occurred for this region instance. ...

Gets the bounding rectangle of region as a cairo-rectangle-int-t instance. ...

Returns the number of rectangles contained in region. ...

Stores the nth rectangle from the region in rectangle. ...

Checks whether region is empty. ...

Checks whether (x, y) is contained in region. ...

Checks whether rectangle is inside, outside or partially contained in region. ...

Compares whether region-a is equivalent to region-b. NULL as an argument is equal to itself, but not to any non-NULL region. ...

Translates region by (dx, dy). ...

Computes the intersection of region with other and places the result in region. ...

Computes the intersection of region with rectangle and places the result in region. ...

Subtracts other from region and places the result in region. ...

Subtracts rectangle from region and places the result in region. ...

Computes the union of region with other and places the result in region. ...

Computes the union of region with rectangle and places the result in region. ...

Computes the exclusive difference of region with other and places the result in region. ...

Computes the exclusive difference of region with rectangle and places the result in region. ...


Transformations

Manipulating the current transformation matrix.

The current transformation matrix, CTM, is a two-dimensional affine transformation that maps all coordinates and other drawing instruments from the user space into the surface's canonical coordinate system, also known as the device space.

Modifies the current transformation matrix (CTM) by translating the user-space origin by (tx, ty). ...

Modifies the current transformation matrix (CTM) by scaling the x and y user-space axes by sx and sy respectively. ...

Modifies the current transformation matrix (CTM) by rotating the user-space axes by angle radians. ...

Modifies the current transformation matrix (CTM) by applying matrix as an additional transformation. ...

Modifies the current transformation matrix (CTM) by setting it equal to matrix. ...

Stores the current transformation matrix (CTM) into matrix. ...

Resets the current transformation matrix (CTM) by setting it equal to the identity matrix. ...

Transform a coordinate from user space to device space by multiplying the given point by the current transformation matrix (CTM). ...

Transform a distance vector from user space to device space. ...

Transform a coordinate from device space to user space by multiplying the given point by the inverse of the current transformation matrix (CTM). ...

Transform a distance vector from device space to user space. ...


Text

Rendering text and glyphs.

The functions with text in their name form Cairo's toy text API. The toy API takes UTF-8 encoded text and is limited in its functionality to rendering simple left-to-right text with no advanced features. That means for example that most complex scripts like Hebrew, Arabic, and Indic scripts are out of question. No kerning or correct positioning of diacritical marks either. The font selection is pretty limited too and does not handle the case that the selected font does not cover the characters in the text. This set of functions are really that, a toy text API, for testing and demonstration purposes. Any serious application should avoid them.

The functions with glyphs in their name form Cairo's low-level text API. The low-level API relies on the user to convert text to a set of glyph indexes and positions. This is a very hard problem and is best handled by external libraries, like the pangocairo library that is part of the Pango text layout and rendering library. Pango is available from the Pango library.

The cairo-glyph-t structure holds information about a single glyph when drawing or measuring text. ...

Specifies variants of a font face based on their slant. ...

Specifies variants of a font face based on their weight. ...

The cairo-text-cluster-t structure holds information about a single text cluster. ...

Specifies properties of a text cluster mapping. ...

Selects a family and style of font from a simplified description as a family name, slant and weight. ...

Sets the current font matrix to a scale by a factor of size, replacing any font matrix previously set with the cairo-set-font-size or cairo-set-font-matrix functions. ...

Sets the current font matrix to matrix. ...

Stores the current font matrix into matrix. ...

The cairo-font-options function retrieves font rendering options. ...

Replaces the current cairo-font-face-t instance in the Cairo context with face. ...

Gets the current font face for a Cairo context. ...

Replaces the current font face, font matrix, and font options in the Cairo context with those of the cairo-scaled-font-t instance. ...

Gets the current scaled font for the Cairo context. ...

A drawing operator that generates the shape from a string of UTF-8 characters, rendered according to the current font face, font size (font matrix), and font options. ...

A drawing operator that generates the shape from a list of glyphs, rendered according to the current font face, font size (font matrix), and font options. ...

This operation has rendering effects similar to the cairo-show-glyphs function but, if the target surface supports it, uses the provided text and cluster mapping to embed the text for the glyphs shown in the output. ...

Gets the font extents for the currently selected font. ...

Gets the extents for a string of text. ...

Gets the extents for a list of glyphs. ...

Creates a font face from a triplet of family, slant, and weight. ...

Gets the familly name of a toy font. ...

Gets the slant a toy font. ...

Gets the weight a toy font. ...

Allocates an array of cairo-glyph-t instances. ...

Frees an array of cairo-glyph-t instances allocated using the cairo-glyph-allocate function. ...

Allocates an array of cairo-text-cluster-t instances. ...

Frees an array of cairo-text-cluster-t instances allocated using the cairo-text-cluster-allocate function. ...


Raster Source

Supplying arbitrary image data.


Hyperlinks and document structure

Fonts


Font Faces

Base class for font faces.

The cairo-font-face-t structure represents a particular font at a particular weight, slant, and other characteristic but no size, transformation, or size.

Font faces are created using font-backend-specific constructors, typically of the form cairo-backend-font-face-create, or implicitly using the toy text API by way of the cairo-select-font-face function. The resulting face can be accessed using the cairo-get-font-face function.

A cairo-font-face-t structure specifies all aspects of a font other than the size or font matrix (a font matrix is used to distort a font by sheering it or scaling it unequally in the two directions). ...

The cairo-font-type-t enumeration is used to describe the type of a given font face or scaled font. ...

Increases the reference count on font-face by one. ...

Decreases the reference count on font-face by one. ...

Checks whether an error has previously occurred for this font face. ...

This function returns the type of the backend used to create a font face. ...

Returns the current reference count of font-face. ...


Scaled Fonts

Font face at particular size and options.

The cairo-scaled-font-t structure represents a realization of a font face at a particular size and transformation and a certain set of font options.

A cairo-scaled-font-t structure is a font scaled to a particular size and device resolution. ...

The cairo-font-extents-t structure stores metric information for a font. ...

Accessor of the ascent slot of the cairo-font-extents-t structure. ...

Accessor of the descent slot of the cairo-font-extents-t structure. ...

Accessor of the height slot of the cairo-font-extents-t structure. ...

Accessor of the max-x-advance slot of the cairo-font-extents-t structure. ...

Accessor of the max-y-advance slot of the cairo-font-extents-t structure. ...

The cairo-text-extents-t structure stores the extents of a single glyph or a string of glyphs in user-space coordinates. ...

Accessor of the x-bearing slot of the cairo-text-extents-t structure. ...

Accessor of the y-bearing slot of the cairo-text-extents-t structure. ...

Accessor of the width slot of the cairo-text-extents-t structure. ...

Accessor of the height slot of the cairo-text-extents-t structure. ...

Accessor of the x-advance slot of the cairo-text-extents-t structure. ...

Accessor of the y-advance slot of the cairo-text-extents-t structure. ...

Creates a cairo-scaled-font-t instance from a font face and matrices that describe the size of the font and the environment in which it will be used. ...

Increases the reference count on scaled-font by one. ...

Decreases the reference count on scaled-font by one. ...

Checks whether an error has previously occurred for this scaled font. ...

Gets the metrics for a scaled font. ...

Gets the extents for a string of text. ...











Font Options

How a font should be rendered.

The font options specify how fonts should be rendered. Most of the time the font options implied by a surface are just right and do not need any changes, but for pixel-based targets tweaking font options may result in superior output on a particular display.

An opaque structure holding all options that are used when rendering fonts. ...

Allocates a new font options object with all options initialized to default values. ...

Allocates a new font options object copying the option values from original. ...

Destroys a cairo-font-options-t instance created with the cairo-font-options-create or cairo-font-options-copy function. ...

Checks whether an error has previously occurred for this font options instance. ...

Merges non-default options from other into options, replacing existing values. ...

Compute a hash for the font options instance. ...

Compares two font options instances for equality. ...

The cairo-font-options-antialias function gets the antialiasing mode for the font options instance. ...

The subpixel order specifies the order of color elements within each pixel on the display device when rendering with an antialiasing mode of :subpixel. ...

The cairo-font-options-subpixel-order function gets the subpixel order for the font options instance. ...

Specifies the type of hinting to do on font outlines. ...

The cairo-font-options-hint-style function gets the hint style for font outlines for the font options instance. ...

Specifies whether to hint font metrics. ...

The cairo-font-options-hint-metrics function gets the metrics hinting mode for the font options instance. ...

The cairo-font-options-variations function gets the OpenType font variations for the font options instance. ...


FreeType Fonts

Font support for FreeType

Win32 Fonts

Font support for Microsoft Windows

Quartz Fonts

Font support via CGFont on OS X

User Fonts

Font support with font data provided by the user

Surfaces


cairo_device_t

Interface to underlying rendering system.

A cairo-device-t structure represents the driver interface for drawing operations to a cairo-surface-t instance. ...

The cairo-device-type-t enumeration is used to describe the type of a given device. ...

Increases the reference count on device by one. ...

Decreases the reference count on device by one. ...

This function returns the type of the device. ...

Returns the current reference count of the device. ...

Acquires the device for the current thread. ...

Releases a device previously acquired using the function cairo-device-acquire. ...


Cairo surfaces

Base class for surfaces.

A cairo-surface-t structure is the abstract type representing all different drawing targets that cairo can render to. The actual drawings are performed using a Cairo context.

A cairo surface is created by using backend-specific constructors, typically of the form cairo-backend-surface-create.

Most surface types allow accessing the surface without using Cairo functions. If you do this, keep in mind that it is mandatory that you call the cairo-surface-flush function before reading from or writing to the surface and that you must use the cairo-surface-mark-dirty function after modifying it.

Example 1. Directly modifying an image surface
 void
 modify_image_surface (cairo_surface_t *surface)
 {
   unsigned char *data;
   int width, height, stride;

// flush to ensure all writing to the image was done cairo_surface_flush (surface);

// modify the image data = cairo_image_surface_get_data (surface); width = cairo_image_surface_get_width (surface); height = cairo_image_surface_get_height (surface); stride = cairo_image_surface_get_stride (surface); modify_image_data (data, width, height, stride);

// mark the image dirty so Cairo clears its caches. cairo_surface_mark_dirty (surface); }
Note that for other surface types it might be necessary to acquire the surface's device first. See the cairo-device-acquire function for a discussion of devices.

A cairo-surface-t structure represents an image, either as the destination of a drawing operation or as source when drawing onto another surface. ...

The cairo-content-t enumeration is used to describe the content that a surface will contain, whether color information, alpha information (translucence vs. opacity), or both. ...

The cairo-surface-type-t enumeration is used to describe the type of a given surface. ...

Create a new surface that is as compatible as possible with an existing surface. ...

Create a new image surface that is as compatible as possible for uploading to and the use in conjunction with an existing surface. ...

Create a new surface that is a rectangle within the target surface. ...

Increases the reference count on surface by one. ...

Decreases the reference count on surface by one. ...

Checks whether an error has previously occurred for this surface. ...

This function finishes the surface and drops all references to external resources. ...

Do any pending drawing for the surface and also restore any temporary modifications Cairo has made to the surface's state. ...

Tells Cairo that drawing has been done to surface using means other than Cairo, and that Cairo should reread any cached areas. ...

Sets an offset that is added to the device coordinates determined by the CTM when drawing to surface. ...

This function returns the type of the backend used to create a surface. ...

Returns the current reference count of surface. ...

Emits the current page for backends that support multiple pages, but does not clear it, so that the contents of the current page will be retained for the next page. ...

Emits and clears the current page for backends that support multiple pages. ...


Image Surfaces

Rendering to memory buffers.

Image surfaces provide the ability to render to memory buffers either allocated by Cairo or by the calling code. The supported image formats are those defined in the cairo-format-t enumeration.

The cairo-format-t enumeration is used to identify the memory format of image data. ...

This function provides a stride value that will respect all alignment requirements of the accelerated image-rendering code within Cairo. ...

Creates an image surface of the specified format and dimensions. ...

Creates an image surface for the provided pixel data. ...

Get a pointer to the data of the image surface, for direct inspection or modification. ...

Get the format of the image surface. ...

Gets the width of the image surface in pixels. ...

Gets the height of the image surface in pixels. ...

Get the stride of the image surface in bytes. ...


PDF Surfaces

Rendering PDF documents

The cairo-pdf-outline-flags-t flags is used by the function cairo-pdf-surface-add-outline to specify the attributes of an outline item. ...

The cairo-pdf-metadata-t enumeration is used by the function cairo-pdf-surface-set-metadata to specify the metadata to set. ...

Creates a PDF surface of the specified size in points to be written to filename. ...


PNG Support

Reading and writing PNG images.

The PNG functions allow reading PNG images into image surfaces, and writing any surface to a PNG file.

It is a toy API. It only offers very simple support for reading and writing PNG files, which is sufficient for testing and demonstration purposes. Applications which need more control over the generated PNG file should access the pixel data directly, using the cairo-image-surface-data function or a backend-specific access function, and process it with another library, e.g. GdkPixbuf or libpng.

Creates a new image surface and initializes the contents to the given PNG file. ...

Writes the contents of the image surface to a new file as a PNG image. ...


PostScript Surfaces

Rendering PostScript documents

Recording Surfaces

Records all drawing operations

Win32 Surfaces

Microsoft Windows surface support

SVG Surfaces

Rendering SVG documents

Quartz Surfaces

Rendering to Quartz surfaces

XCB Surfaces

X Window System rendering using the XCB library

XLib Surfaces

X Window System rendering using XLib

XLib-XRender Backend

X Window System rendering using the X Render extension

Script Surfaces

Rendering to replayable scripts

Utilities


Error handling

Decoding Cairo's status.

Cairo uses a single status type to represent all kinds of errors. A status value of :success represents no error and has an integer value of zero. All other status values represent an error.

Cairo's error handling is designed to be easy to use and safe. All major Cairo objects retain an error status internally which can be queried anytime by the users using cairo*-status calls. In the mean time, it is safe to call all Cairo functions normally even if the underlying object is in an error status. This means that no error handling code is required before or after each individual Cairo function call.

The cairo-status-t enumeration is used to indicate errors that can occur when using Cairo. ...

Provides a human readable description of a Cairo status value. ...


Version Information

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 cairo-version-encode function to perform the encoding.

This function encodes the given Cairo version into an integer. ...

Returns the version of the Cairo library encoded in a single integer. ...

Returns the version of the Cairo library as a human readable string of the form "x.y.z". ...


Types

This section lists generic data types used in the cairo API.

no documentation string found

A data structure for holding a rectangle with integer coordinates. ...

Exported Symbol Index

cairo-antialias-t, CEnum
cairo-append-path, Function
cairo-arc, Function
cairo-arc-negative, Function
cairo-bool-t, Symbol
cairo-clip, Function
cairo-clip-extents, Function
cairo-clip-preserve, Function
cairo-close-path, Function
cairo-content-t, CEnum
cairo-copy-clip-rectangle-list, Function
cairo-copy-page, Function
cairo-copy-path, Function
cairo-copy-path-flat, Function
cairo-create, Function
cairo-curve-to, Function
cairo-destroy, Function
cairo-device-acquire, Function
cairo-device-destroy, Function
cairo-device-get-reference-count, Function
cairo-device-get-type, Function
cairo-device-reference, Function
cairo-device-release, Function
cairo-device-t, CStruct
cairo-device-to-user, Function
cairo-device-to-user-distance, Function
cairo-device-type-t, CEnum
cairo-extend-t, CEnum
cairo-fill, Function
cairo-fill-extents, Function
cairo-fill-preserve, Function
cairo-fill-rule-t, CEnum
cairo-filter-t, Enum
cairo-font-extents, Function
cairo-font-extents-ascent, Function
cairo-font-extents-descent, Function
cairo-font-extents-height, Function
cairo-font-extents-max-x-advance, Function
cairo-font-extents-max-y-advance, Function
cairo-font-extents-t, CStruct
cairo-font-face-destroy, Function
cairo-font-face-get-reference-count, Function
cairo-font-face-get-type, Function
cairo-font-face-reference, Function
cairo-font-face-status, Function
cairo-font-face-t, CStruct
cairo-font-options, Function
cairo-font-options-antialias, Function
cairo-font-options-copy, Function
cairo-font-options-create, Function
cairo-font-options-destroy, Function
cairo-font-options-equal, Function
cairo-font-options-hash, Function
cairo-font-options-hint-metrics, Function
cairo-font-options-hint-style, Function
cairo-font-options-merge, Function
cairo-font-options-status, Function
cairo-font-options-subpixel-order, Function
cairo-font-options-t, CStruct
cairo-font-options-variations, Function
cairo-font-slant-t, CEnum
cairo-font-type-t, CEnum
cairo-font-weight-t, CEnum
cairo-format-stride-for-width, Function
cairo-format-t, CEnum
cairo-get-antialias, Function
cairo-get-current-point, Function
cairo-get-dash, Function
cairo-get-dash-count, Function
cairo-get-fill-rule, Function
cairo-get-font-face, Function
cairo-get-font-matrix, Function
cairo-get-group-target, Function
cairo-get-line-cap, Function
cairo-get-line-join, Function
cairo-get-line-width, Function
cairo-get-matrix, Function
cairo-get-miter-limit, Function
cairo-get-operator, Function
cairo-get-reference-count, Function
cairo-get-scaled-font, Function
cairo-get-source, Function
cairo-get-target, Function
cairo-get-tolerance, Function
cairo-glyph-allocate, Function
cairo-glyph-extents, Function
cairo-glyph-free, Function
cairo-glyph-path, Function
cairo-glyph-t, CStruct
cairo-has-current-point, Function
cairo-hint-metrics-t, CEnum
cairo-hint-style-t, CEnum
cairo-identity-matrix, Function
cairo-image-surface-create, Function
cairo-image-surface-create-for-data, Function
cairo-image-surface-create-from-png, Function
cairo-image-surface-data, Function
cairo-image-surface-format, Function
cairo-image-surface-height, Function
cairo-image-surface-stride, Function
cairo-image-surface-width, Function
cairo-in-clip, Function
cairo-in-fill, Function
cairo-in-stroke, Function
cairo-line-cap-t, CEnum
cairo-line-join-t, CEnum
cairo-line-to, Function
cairo-mask, Function
cairo-mask-surface, Function
cairo-matrix-init, Function  (undocumented)
cairo-matrix-init-identity, Function  (undocumented)
cairo-matrix-init-rotate, Function  (undocumented)
cairo-matrix-init-scale, Function  (undocumented)
cairo-matrix-init-translate, Function  (undocumented)
cairo-matrix-invert, Function  (undocumented)
cairo-matrix-multiply, Function  (undocumented)
cairo-matrix-rotate, Function  (undocumented)
cairo-matrix-scale, Function  (undocumented)
cairo-matrix-t, CStruct
cairo-matrix-to-list, Function  (undocumented)
cairo-matrix-transform-distance, Function  (undocumented)
cairo-matrix-transform-point, Function  (undocumented)
cairo-matrix-translate, Function  (undocumented)
cairo-mesh-pattern-begin-patch, Function
cairo-mesh-pattern-curve-to, Function
cairo-mesh-pattern-end-patch, Function
cairo-mesh-pattern-get-control-point, Function
cairo-mesh-pattern-get-corner-color-rgba, Function
cairo-mesh-pattern-get-patch-count, Function
cairo-mesh-pattern-get-path, Function
cairo-mesh-pattern-line-to, Function
cairo-mesh-pattern-move-to, Function
cairo-mesh-pattern-set-control-point, Function
cairo-mesh-pattern-set-corner-color-rgb, Function
cairo-mesh-pattern-set-corner-color-rgba, Function
cairo-move-to, Function
cairo-new-path, Function
cairo-new-sub-path, Function
cairo-operator-t, CEnum
cairo-paint, Function
cairo-paint-with-alpha, Function
cairo-path-data-t, CStruct
cairo-path-data-type-t, CEnum
cairo-path-destroy, Function
cairo-path-extents, Function
cairo-path-t, CStruct
cairo-pattern-add-color-stop-rgb, Function
cairo-pattern-add-color-stop-rgba, Function
cairo-pattern-create-for-surface, Function
cairo-pattern-create-linear, Function
cairo-pattern-create-mesh, Function
cairo-pattern-create-radial, Function
cairo-pattern-create-rgb, Function
cairo-pattern-create-rgba, Function
cairo-pattern-destroy, Function
cairo-pattern-get-color-stop-count, Function
cairo-pattern-get-color-stop-rgba, Function
cairo-pattern-get-extend, Function
cairo-pattern-get-filter, Function
cairo-pattern-get-linear-points, Function
cairo-pattern-get-matrix, Function
cairo-pattern-get-radial-circles, Function
cairo-pattern-get-reference-count, Function
cairo-pattern-get-rgba, Function
cairo-pattern-get-surface, Function
cairo-pattern-get-type, Function
cairo-pattern-reference, Function
cairo-pattern-set-extend, Function
cairo-pattern-set-filter, Function
cairo-pattern-set-matrix, Function
cairo-pattern-status, Function
cairo-pattern-t, CStruct
cairo-pattern-type-t, Enum
cairo-pdf-metadata-t, CEnum
cairo-pdf-outline-flags-t, CFlags
cairo-pdf-surface-create, Function
cairo-pop-group, Function
cairo-pop-group-to-source, Function
cairo-push-group, Function
cairo-push-group-with-content, Function
cairo-rectangle, Function
cairo-rectangle-int-t, CStruct
cairo-rectangle-list-destroy, Function
cairo-rectangle-list-t, CStruct
cairo-rectangle-t, CStruct
cairo-reference, Function
cairo-region-contains-point, Function
cairo-region-contains-rectangle, Function
cairo-region-copy, Function
cairo-region-create, Function
cairo-region-create-rectangle, Function
cairo-region-create-rectangles, Function
cairo-region-destroy, Function
cairo-region-equal, Function
cairo-region-get-extents, Function
cairo-region-get-rectangle, Function
cairo-region-intersect, Function
cairo-region-intersect-rectangle, Function
cairo-region-is-empty, Function
cairo-region-num-rectangles, Function
cairo-region-overlap-t, Enum
cairo-region-reference, Function
cairo-region-status, Function
cairo-region-subtract, Function
cairo-region-subtract-rectangle, Function
cairo-region-t, CStruct
cairo-region-translate, Function
cairo-region-union, Function
cairo-region-union-rectangle, Function
cairo-region-xor, Function
cairo-region-xor-rectangle, Function
cairo-rel-curve-to, Function
cairo-rel-line-to, Function
cairo-rel-move-to, Function
cairo-reset-clip, Function
cairo-restore, Function
cairo-rotate, Function
cairo-save, Function
cairo-scale, Function
cairo-scaled-font-create, Function
cairo-scaled-font-destroy, Function
cairo-scaled-font-extents, Function
cairo-scaled-font-get-ctm, Function  (undocumented)
cairo-scaled-font-get-font-face, Function  (undocumented)
cairo-scaled-font-get-font-matrix, Function  (undocumented)
cairo-scaled-font-get-font-options, Function  (undocumented)
cairo-scaled-font-get-reference-count, Function  (undocumented)
cairo-scaled-font-get-scale-matrix, Function  (undocumented)
cairo-scaled-font-get-type, Function  (undocumented)
cairo-scaled-font-glyph-extents, Function  (undocumented)
cairo-scaled-font-reference, Function
cairo-scaled-font-status, Function
cairo-scaled-font-t, CStruct
cairo-scaled-font-text-extents, Function
cairo-scaled-font-text-to-glyphs, Function  (undocumented)
cairo-select-font-face, Function
cairo-set-antialias, Function
cairo-set-dash, Function
cairo-set-fill-rule, Function
cairo-set-font-face, Function
cairo-set-font-matrix, Function
cairo-set-font-size, Function
cairo-set-line-cap, Function
cairo-set-line-join, Function
cairo-set-line-width, Function
cairo-set-matrix, Function
cairo-set-miter-limit, Function
cairo-set-operator, Function
cairo-set-scaled-font, Function
cairo-set-source, Function
cairo-set-source-rgb, Function
cairo-set-source-rgba, Function
cairo-set-source-surface, Function
cairo-set-tolerance, Function
cairo-show-glyphs, Function
cairo-show-page, Function
cairo-show-text, Function
cairo-show-text-glyphs, Function
cairo-status, Function
cairo-status-t, CEnum
cairo-status-to-string, Function
cairo-stroke, Function
cairo-stroke-extents, Function
cairo-stroke-preserve, Function
cairo-subpixel-order-t, CEnum
cairo-surface-copy-page, Function
cairo-surface-create-for-rectangle, Function
cairo-surface-create-similar, Function
cairo-surface-create-similar-image, Function
cairo-surface-destroy, Function
cairo-surface-finish, Function
cairo-surface-flush, Function
cairo-surface-get-reference-count, Function
cairo-surface-get-type, Function
cairo-surface-mark-dirty, Function
cairo-surface-reference, Function
cairo-surface-set-device-offset, Function
cairo-surface-show-page, Function
cairo-surface-status, Function
cairo-surface-t, CStruct
cairo-surface-type-t, CEnum
cairo-surface-write-to-png, Function
cairo-svg-surface-create, Function  (undocumented)
cairo-t, CStruct
cairo-text-cluster-allocate, Function
cairo-text-cluster-flags-t, CEnum
cairo-text-cluster-free, Function
cairo-text-cluster-t, CStruct
cairo-text-extents, Function
cairo-text-extents-height, Function
cairo-text-extents-t, CStruct
cairo-text-extents-width, Function
cairo-text-extents-x-advance, Function
cairo-text-extents-x-bearing, Function
cairo-text-extents-y-advance, Function
cairo-text-extents-y-bearing, Function
cairo-text-path, Function
cairo-toy-font-face-create, Function
cairo-toy-font-face-get-family, Function
cairo-toy-font-face-get-slant, Function
cairo-toy-font-face-get-weight, Function
cairo-transform, Function
cairo-translate, Function
cairo-user-to-device, Function
cairo-user-to-device-distance, Function
cairo-version, Function
cairo-version-encode, Function
cairo-version-string, Function