| Value | Meaning |
|---|---|
| Image0 | The surface is of type image, since 1.2 |
| Pdf1 | The surface is of type pdf, since 1.2 |
| Ps2 | The surface is of type ps, since 1.2 |
| Xlib3 | The surface is of type xlib, since 1.2 |
| Xcb4 | The surface is of type xcb, since 1.2 |
| Glitz5 | The surface is of type glitz, since 1.2, deprecated 1.18 (glitz support have been removed, this surface type will never be set by cairo) |
| Quartz6 | The surface is of type quartz, since 1.2 |
| Win327 | The surface is of type win32, since 1.2 |
| Beos8 | The surface is of type beos, since 1.2, deprecated 1.18 (beos support have been removed, this surface type will never be set by cairo) |
| Directfb9 | The surface is of type directfb, since 1.2, deprecated 1.18 (directfb support have been removed, this surface type will never be set by cairo) |
| Svg10 | The surface is of type svg, since 1.2 |
| Os211 | The surface is of type os2, since 1.4, deprecated 1.18 (os2 support have been removed, this surface type will never be set by cairo) |
| Win32Printing12 | The surface is a win32 printing surface, since 1.6 |
| QuartzImage13 | The surface is of type quartz_image, since 1.6 |
| Script14 | The surface is of type script, since 1.10 |
| Qt15 | The surface is of type Qt, since 1.10, deprecated 1.18 (Ot support have been removed, this surface type will never be set by cairo) |
| Recording16 | The surface is of type recording, since 1.10 |
| Vg17 | The surface is a OpenVG surface, since 1.10, deprecated 1.18 (OpenVG support have been removed, this surface type will never be set by cairo) |
| Gl18 | The surface is of type OpenGL, since 1.10, deprecated 1.18 (OpenGL support have been removed, this surface type will never be set by cairo) |
| Drm19 | The surface is of type Direct Render Manager, since 1.10, deprecated 1.18 (DRM support have been removed, this surface type will never be set by cairo) |
| Tee20 | The surface is of type 'tee' (a multiplexing surface), since 1.10 |
| Xml21 | The surface is of type XML (for debugging), since 1.10 |
| Skia22 | The surface is of type Skia, since 1.10, deprecated 1.18 (Skia support have been removed, this surface type will never be set by cairo) |
#cairo_surface_type_t is used to describe the type of a given surface. The surface types are also known as "backends" or "surface backends" within cairo.
The type of a surface is determined by the function used to create it, which will generally be of the form <function>cairo_<emphasis>type</emphasis>_surface_create(<!-- -->)</function>, (though see cairo.surface.Surface.createSimilar as well).
The surface type can be queried with cairo.surface.Surface.getSurfaceType
The various #cairo_surface_t functions can be used with surfaces of any type, but some backends also provide type-specific functions that must only be called with a surface of the appropriate type. These functions have names that begin with <literal>cairo_<emphasis>type</emphasis>_surface</literal> such as cairo.global.imageSurfaceGetWidth.
The behavior of calling a type-specific function with a surface of the wrong type is undefined.
New entries may be added in future versions.