![]() |
![]() |
![]() |
Cairo: A Vector Graphics Library | ![]() |
---|---|---|---|---|
typedef struct _cairo_surface cairo_surface_t;
A cairo_surface_t represents an image, either as the destination
of a drawing operation or as source when drawing onto another
surface. There are different subtypes of cairo_surface_t for
different drawing backends; for example, cairo_image_surface_create()
creates a bitmap image in memory.
Memory management of cairo_surface_t is done with
cairo_surface_reference()
and cairo_surface_destroy()
.
typedef enum _cairo_content { CAIRO_CONTENT_COLOR = 0x1000, CAIRO_CONTENT_ALPHA = 0x2000, CAIRO_CONTENT_COLOR_ALPHA = 0x3000 } cairo_content_t;
cairo_content_t
is used to describe the content that a surface will
contain, whether color information, alpha information (translucence
vs. opacity), or both.
Note: The large values here are designed to keep cairo_content_t values distinct from cairo_format_t values so that the implementation can detect the error if users confuse the two types.