| Cairo: A Vector Graphics Library |
|---|
cairo_surface_tcairo_surface_t — |
typedef cairo_surface_t; cairo_surface_t* cairo_surface_create_for_image (char *data, cairo_format_t format, int width, int height, int stride); cairo_surface_t* cairo_surface_create_similar (cairo_surface_t *other, cairo_format_t format, int width, int height); void cairo_surface_reference (cairo_surface_t *surface); void cairo_surface_destroy (cairo_surface_t *surface); cairo_status_t cairo_surface_set_repeat (cairo_surface_t *surface, int repeat); cairo_status_t cairo_surface_set_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix); cairo_status_t cairo_surface_get_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix); cairo_status_t cairo_surface_set_filter (cairo_surface_t *surface, cairo_filter_t filter); cairo_filter_t cairo_surface_get_filter (cairo_surface_t *surface);
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().
cairo_surface_t* cairo_surface_create_for_image (char *data, cairo_format_t format, int width, int height, int stride);
| data : | |
| format : | |
| width : | |
| height : | |
| stride : | |
| Returns : |
cairo_surface_t* cairo_surface_create_similar (cairo_surface_t *other, cairo_format_t format, int width, int height);
| other : | |
| format : | |
| width : | |
| height : | |
| Returns : |
cairo_status_t cairo_surface_set_repeat (cairo_surface_t *surface, int repeat);
| surface : | |
| repeat : | |
| Returns : |
cairo_status_t cairo_surface_set_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
| surface : | |
| matrix : | |
| Returns : |
cairo_status_t cairo_surface_get_matrix (cairo_surface_t *surface, cairo_matrix_t *matrix);
| surface : | |
| matrix : | |
| Returns : |
cairo_status_t cairo_surface_set_filter (cairo_surface_t *surface, cairo_filter_t filter);
| surface : | |
| filter : | |
| Returns : |
cairo_filter_t cairo_surface_get_filter (cairo_surface_t *surface);
| surface : | |
| Returns : |
| << cairo_t | cairo_pattern_t >> |