w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

cairo-surface.c File Reference
Include dependency graph for cairo-surface.c:

Go to the source code of this file.

Macros

#define DEFINE_NIL_SURFACE(status, name)
 
#define GLYPH_CACHE_SIZE   64
 

Functions

static void _cairo_surface_finish_snapshots (cairo_surface_t *surface)
 
static void _cairo_surface_finish (cairo_surface_t *surface)
 
cairo_int_status_t _cairo_surface_set_error (cairo_surface_t *surface, cairo_int_status_t status)
 
cairo_surface_type_t cairo_surface_get_type (cairo_surface_t *surface)
 
cairo_content_t cairo_surface_get_content (cairo_surface_t *surface)
 
cairo_status_t cairo_surface_status (cairo_surface_t *surface)
 
int _cairo_dummy_prototype (void)
 
static unsigned int _cairo_surface_allocate_unique_id (void)
 
cairo_device_tcairo_surface_get_device (cairo_surface_t *surface)
 
static cairo_bool_t _cairo_surface_has_snapshots (cairo_surface_t *surface)
 
static cairo_bool_t _cairo_surface_has_mime_data (cairo_surface_t *surface)
 
static void _cairo_surface_detach_mime_data (cairo_surface_t *surface)
 
static void _cairo_surface_detach_snapshots (cairo_surface_t *surface)
 
void _cairo_surface_detach_snapshot (cairo_surface_t *snapshot)
 
void _cairo_surface_attach_snapshot (cairo_surface_t *surface, cairo_surface_t *snapshot, cairo_surface_func_t detach_func)
 
cairo_surface_t_cairo_surface_has_snapshot (cairo_surface_t *surface, const cairo_surface_backend_t *backend)
 
cairo_status_t _cairo_surface_begin_modification (cairo_surface_t *surface)
 
void _cairo_surface_init (cairo_surface_t *surface, const cairo_surface_backend_t *backend, cairo_device_t *device, cairo_content_t content, cairo_bool_t is_vector)
 
static void _cairo_surface_copy_similar_properties (cairo_surface_t *surface, cairo_surface_t *other)
 
cairo_surface_tcairo_surface_create_similar (cairo_surface_t *other, cairo_content_t content, int width, int height)
 
cairo_surface_tcairo_surface_create_similar_image (cairo_surface_t *other, cairo_format_t format, int width, int height)
 
cairo_image_surface_t_cairo_surface_map_to_image (cairo_surface_t *surface, const cairo_rectangle_int_t *extents)
 
cairo_int_status_t _cairo_surface_unmap_image (cairo_surface_t *surface, cairo_image_surface_t *image)
 
cairo_surface_tcairo_surface_map_to_image (cairo_surface_t *surface, const cairo_rectangle_int_t *extents)
 
void cairo_surface_unmap_image (cairo_surface_t *surface, cairo_surface_t *image)
 
cairo_surface_t_cairo_surface_create_scratch (cairo_surface_t *other, cairo_content_t content, int width, int height, const cairo_color_t *color)
 
cairo_surface_tcairo_surface_reference (cairo_surface_t *surface)
 
void cairo_surface_destroy (cairo_surface_t *surface)
 
unsigned int cairo_surface_get_reference_count (cairo_surface_t *surface)
 
void cairo_surface_finish (cairo_surface_t *surface)
 
void _cairo_surface_release_device_reference (cairo_surface_t *surface)
 
voidcairo_surface_get_user_data (cairo_surface_t *surface, const cairo_user_data_key_t *key)
 
cairo_status_t cairo_surface_set_user_data (cairo_surface_t *surface, const cairo_user_data_key_t *key, void *user_data, cairo_destroy_func_t destroy)
 
void cairo_surface_get_mime_data (cairo_surface_t *surface, const char *mime_type, const unsigned char **data, unsigned long *length)
 
static void _cairo_mime_data_destroy (void *ptr)
 
cairo_bool_t _cairo_surface_has_mime_image (cairo_surface_t *surface)
 
cairo_status_t cairo_surface_set_mime_data (cairo_surface_t *surface, const char *mime_type, const unsigned char *data, unsigned long length, cairo_destroy_func_t destroy, void *closure)
 
cairo_bool_t cairo_surface_supports_mime_type (cairo_surface_t *surface, const char *mime_type)
 
static void _cairo_mime_data_reference (const void *key, void *elt, void *closure)
 
cairo_status_t _cairo_surface_copy_mime_data (cairo_surface_t *dst, cairo_surface_t *src)
 
void _cairo_surface_set_font_options (cairo_surface_t *surface, cairo_font_options_t *options)
 
void cairo_surface_get_font_options (cairo_surface_t *surface, cairo_font_options_t *options)
 
cairo_status_t _cairo_surface_flush (cairo_surface_t *surface, unsigned flags)
 
void cairo_surface_flush (cairo_surface_t *surface)
 
void cairo_surface_mark_dirty (cairo_surface_t *surface)
 
void cairo_surface_mark_dirty_rectangle (cairo_surface_t *surface, int x, int y, int width, int height)
 
void cairo_surface_set_device_scale (cairo_surface_t *surface, double x_scale, double y_scale)
 
void cairo_surface_get_device_scale (cairo_surface_t *surface, double *x_scale, double *y_scale)
 
void cairo_surface_set_device_offset (cairo_surface_t *surface, double x_offset, double y_offset)
 
void cairo_surface_get_device_offset (cairo_surface_t *surface, double *x_offset, double *y_offset)
 
void cairo_surface_set_fallback_resolution (cairo_surface_t *surface, double x_pixels_per_inch, double y_pixels_per_inch)
 
void cairo_surface_get_fallback_resolution (cairo_surface_t *surface, double *x_pixels_per_inch, double *y_pixels_per_inch)
 
cairo_bool_t _cairo_surface_has_device_transform (cairo_surface_t *surface)
 
cairo_status_t _cairo_surface_acquire_source_image (cairo_surface_t *surface, cairo_image_surface_t **image_out, void **image_extra)
 
cairo_status_t _cairo_surface_default_acquire_source_image (void *_surface, cairo_image_surface_t **image_out, void **image_extra)
 
void _cairo_surface_release_source_image (cairo_surface_t *surface, cairo_image_surface_t *image, void *image_extra)
 
void _cairo_surface_default_release_source_image (void *surface, cairo_image_surface_t *image, void *image_extra)
 
cairo_surface_t_cairo_surface_get_source (cairo_surface_t *surface, cairo_rectangle_int_t *extents)
 
cairo_surface_t_cairo_surface_default_source (void *surface, cairo_rectangle_int_t *extents)
 
static cairo_status_t _pattern_has_error (const cairo_pattern_t *pattern)
 
static cairo_bool_t nothing_to_do (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source)
 
cairo_status_t _cairo_surface_paint (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_clip_t *clip)
 
cairo_status_t _cairo_surface_mask (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_pattern_t *mask, const cairo_clip_t *clip)
 
cairo_status_t _cairo_surface_fill_stroke (cairo_surface_t *surface, cairo_operator_t fill_op, const cairo_pattern_t *fill_source, cairo_fill_rule_t fill_rule, double fill_tolerance, cairo_antialias_t fill_antialias, cairo_path_fixed_t *path, cairo_operator_t stroke_op, const cairo_pattern_t *stroke_source, const cairo_stroke_style_t *stroke_style, const cairo_matrix_t *stroke_ctm, const cairo_matrix_t *stroke_ctm_inverse, double stroke_tolerance, cairo_antialias_t stroke_antialias, const cairo_clip_t *clip)
 
cairo_status_t _cairo_surface_stroke (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_path_fixed_t *path, const cairo_stroke_style_t *stroke_style, const cairo_matrix_t *ctm, const cairo_matrix_t *ctm_inverse, double tolerance, cairo_antialias_t antialias, const cairo_clip_t *clip)
 
cairo_status_t _cairo_surface_fill (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_path_fixed_t *path, cairo_fill_rule_t fill_rule, double tolerance, cairo_antialias_t antialias, const cairo_clip_t *clip)
 
void cairo_surface_copy_page (cairo_surface_t *surface)
 
void cairo_surface_show_page (cairo_surface_t *surface)
 
cairo_bool_t _cairo_surface_get_extents (cairo_surface_t *surface, cairo_rectangle_int_t *extents)
 
cairo_bool_t cairo_surface_has_show_text_glyphs (cairo_surface_t *surface)
 
static cairo_int_status_t ensure_scaled_glyph (cairo_scaled_font_t *scaled_font, cairo_scaled_glyph_t **glyph_cache, cairo_glyph_t *glyph, cairo_scaled_glyph_t **scaled_glyph)
 
static cairo_int_status_t composite_one_color_glyph (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const cairo_clip_t *clip, cairo_glyph_t *glyph, cairo_scaled_glyph_t *scaled_glyph)
 
static cairo_int_status_t composite_color_glyphs (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, char *utf8, int *utf8_len, cairo_glyph_t *glyphs, int *num_glyphs, cairo_text_cluster_t *clusters, int *num_clusters, cairo_text_cluster_flags_t cluster_flags, cairo_scaled_font_t *scaled_font, const cairo_clip_t *clip)
 
cairo_status_t _cairo_surface_show_text_glyphs (cairo_surface_t *surface, cairo_operator_t op, const cairo_pattern_t *source, const char *utf8, int utf8_len, cairo_glyph_t *glyphs, int num_glyphs, const cairo_text_cluster_t *clusters, int num_clusters, cairo_text_cluster_flags_t cluster_flags, cairo_scaled_font_t *scaled_font, const cairo_clip_t *clip)
 
cairo_status_t _cairo_surface_tag (cairo_surface_t *surface, cairo_bool_t begin, const char *tag_name, const char *attributes, const cairo_pattern_t *source, const cairo_stroke_style_t *stroke_style, const cairo_matrix_t *ctm, const cairo_matrix_t *ctm_inverse, const cairo_clip_t *clip)
 
void _cairo_surface_set_resolution (cairo_surface_t *surface, double x_res, double y_res)
 
cairo_surface_t_cairo_surface_create_in_error (cairo_status_t status)
 
cairo_surface_t_cairo_int_surface_create_in_error (cairo_int_status_t status)
 

Variables

static const cairo_surface_t _cairo_surface_nil = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_NO_MEMORY , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_surface_type_mismatch = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_SURFACE_TYPE_MISMATCH , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_invalid_status = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_STATUS , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_invalid_content = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_CONTENT , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_invalid_format = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_FORMAT , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_invalid_visual = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_VISUAL , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_file_not_found = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_FILE_NOT_FOUND , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_temp_file_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_TEMP_FILE_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_read_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_READ_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_write_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_WRITE_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_invalid_stride = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_STRIDE , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_invalid_size = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_SIZE , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_device_type_mismatch = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_DEVICE_TYPE_MISMATCH , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_device_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_DEVICE_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_unsupported = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_INT_STATUS_UNSUPPORTED , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const cairo_surface_t _cairo_surface_nil_nothing_to_do = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_INT_STATUS_NOTHING_TO_DO , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
 
static const char * _cairo_surface_image_mime_types []
 

Macro Definition Documentation

◆ DEFINE_NIL_SURFACE

#define DEFINE_NIL_SURFACE (   status,
  name 
)

SECTION:cairo-surface @Title: cairo_surface_t @Short_Description: Base class for surfaces @See_Also: cairo_t, cairo_pattern_t

cairo_surface_t is the abstract type representing all different drawing targets that cairo can render to. The actual drawings are performed using a cairo <firstterm>context</firstterm>.

A cairo surface is created by using <firstterm>backend</firstterm>-specific constructors, typically of the form <function>cairo_<emphasis>backend</emphasis>_surface_create()</function>.

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 cairo_surface_flush() before reading from or writing to the surface and that you must use cairo_surface_mark_dirty() after modifying it.

<title>Directly modifying an image surface</title> <programlisting> 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); } </programlisting>

Note that for other surface types it might be necessary to acquire the surface's device first. See cairo_device_acquire() for a discussion of devices.

Definition at line 101 of file cairo-surface.c.

◆ GLYPH_CACHE_SIZE

#define GLYPH_CACHE_SIZE   64

Definition at line 2599 of file cairo-surface.c.

Function Documentation

◆ _cairo_dummy_prototype()

int _cairo_dummy_prototype ( void  )

◆ _cairo_int_surface_create_in_error()

cairo_surface_t* _cairo_int_surface_create_in_error ( cairo_int_status_t  status)

Definition at line 3064 of file cairo-surface.c.

◆ _cairo_mime_data_destroy()

◆ _cairo_mime_data_reference()

static void _cairo_mime_data_reference ( const void key,
void elt,
void closure 
)
static

◆ _cairo_surface_acquire_source_image()

cairo_status_t _cairo_surface_acquire_source_image ( cairo_surface_t surface,
cairo_image_surface_t **  image_out,
void **  image_extra 
)

_cairo_surface_acquire_source_image: @surface: a cairo_surface_t @image_out: location to store a pointer to an image surface that has identical contents to @surface. This surface could be @surface itself, a surface held internal to @surface, or it could be a new surface with a copy of the relevant portion of @surface. @image_extra: location to store image specific backend data

Gets an image surface to use when drawing as a fallback when drawing with @surface as a source. _cairo_surface_release_source_image() must be called when finished.

Return value: CAIRO_STATUS_SUCCESS if an image was stored in @image_out. CAIRO_INT_STATUS_UNSUPPORTED if an image cannot be retrieved for the specified surface. Or CAIRO_STATUS_NO_MEMORY.

Definition at line 2040 of file cairo-surface.c.

References _cairo_debug_check_image_surface_is_defined, _cairo_surface_set_error(), _cairo_surface_backend::acquire_source_image, assert(), _cairo_surface::backend, CAIRO_INT_STATUS_UNSUPPORTED, CAIRO_STATUS_SUCCESS, _cairo_surface::finished, NULL, _cairo_surface::status, status, surface, and unlikely.

Referenced by _cairo_cogl_acquire_surface_texture(), _cairo_pdf_surface_acquire_source_image_from_pattern(), _cairo_pdf_surface_analyze_surface_pattern_transparency(), _cairo_pdf_surface_emit_surface(), _cairo_ps_surface_acquire_source_surface_from_pattern(), _cairo_ps_surface_analyze_surface_pattern_transparency(), _cairo_ps_surface_emit_image(), _cairo_surface_observer_acquire_source_image(), _cairo_surface_snapshot_acquire_source_image(), _cairo_surface_snapshot_copy_on_write(), _cairo_surface_to_cgimage(), _cairo_surface_wrapper_acquire_source_image(), _cairo_type3_glyph_surface_paint(), _cairo_win32_printing_surface_acquire_image_pattern(), _cairo_xcb_surface_picture(), _cairo_xml_emit_surface(), _emit_image_surface_pattern(), _pixman_image_for_raster(), _pixman_image_for_surface(), _vg_clone_image_surface(), i915_surface_create_from_cacheable_image(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), PatternToBrushConverter::PatternToBrushConverter(), proxy_acquire_source_image(), upload_boxes(), and write_png().

◆ _cairo_surface_allocate_unique_id()

static unsigned int _cairo_surface_allocate_unique_id ( void  )
static

Definition at line 265 of file cairo-surface.c.

References _cairo_atomic_uint_cmpxchg, _cairo_atomic_uint_get, and id.

Referenced by _cairo_surface_init().

◆ _cairo_surface_attach_snapshot()

◆ _cairo_surface_begin_modification()

◆ _cairo_surface_copy_mime_data()

◆ _cairo_surface_copy_similar_properties()

◆ _cairo_surface_create_in_error()

cairo_surface_t* _cairo_surface_create_in_error ( cairo_status_t  status)

_cairo_surface_create_in_error: @status: the error status

Return an appropriate static error surface for the error status. On error, surface creation functions should always return a surface created with _cairo_surface_create_in_error() instead of a new surface in an error state. This simplifies internal code as no refcounting has to be done.

Definition at line 2993 of file cairo-surface.c.

Referenced by _cairo_int_surface_create_in_error(), _cairo_surface_create_scratch(), cairo_surface_create_similar(), cairo_surface_create_similar_image(), and cairo_surface_map_to_image().

◆ _cairo_surface_create_scratch()

◆ _cairo_surface_default_acquire_source_image()

cairo_status_t _cairo_surface_default_acquire_source_image ( void _surface,
cairo_image_surface_t **  image_out,
void **  image_extra 
)

Definition at line 2065 of file cairo-surface.c.

◆ _cairo_surface_default_release_source_image()

void _cairo_surface_default_release_source_image ( void surface,
cairo_image_surface_t image,
void image_extra 
)

Definition at line 2099 of file cairo-surface.c.

◆ _cairo_surface_default_source()

cairo_surface_t* _cairo_surface_default_source ( void surface,
cairo_rectangle_int_t extents 
)

Definition at line 2119 of file cairo-surface.c.

◆ _cairo_surface_detach_mime_data()

static void _cairo_surface_detach_mime_data ( cairo_surface_t surface)
static

◆ _cairo_surface_detach_snapshot()

◆ _cairo_surface_detach_snapshots()

static void _cairo_surface_detach_snapshots ( cairo_surface_t surface)
static

◆ _cairo_surface_fill()

◆ _cairo_surface_fill_stroke()

◆ _cairo_surface_finish()

◆ _cairo_surface_finish_snapshots()

static void _cairo_surface_finish_snapshots ( cairo_surface_t surface)
static

◆ _cairo_surface_flush()

cairo_status_t _cairo_surface_flush ( cairo_surface_t surface,
unsigned  flags 
)

◆ _cairo_surface_get_extents()

cairo_bool_t _cairo_surface_get_extents ( cairo_surface_t surface,
cairo_rectangle_int_t extents 
)

_cairo_surface_get_extents: @surface: the cairo_surface_t to fetch extents for

This function returns a bounding box for the surface. The surface bounds are defined as a region beyond which no rendering will possibly be recorded, in other words, it is the maximum extent of potentially usable coordinates.

For vector surfaces, (PDF, PS, SVG and recording-surfaces), the surface might be conceived as unbounded, but we force the user to provide a maximum size at the time of surface_create. So get_extents uses that size.

Note: The coordinates returned are in "backend" space rather than "surface" space. That is, they are relative to the true (0,0) origin rather than the device_transform origin. This might seem a bit inconsistent with other cairo_surface_t interfaces, but all current callers are within the surface layer where backend space is desired.

This behavior would have to be changed is we ever exported a public variant of this function.

Definition at line 2533 of file cairo-surface.c.

References _cairo_surface_set_error(), _cairo_unbounded_rectangle_init(), _cairo_surface::backend, CAIRO_STATUS_SURFACE_FINISHED, FALSE, _cairo_surface::finished, _cairo_surface_backend::get_extents, NULL, _cairo_surface::status, surface, TRUE, and unlikely.

Referenced by _analyze_recording_surface_pattern(), _cairo_analysis_surface_get_extents(), _cairo_analysis_surface_operation_extents(), _cairo_composite_rectangles_init(), _cairo_default_context_push_group(), _cairo_gstate_copy_clip_rectangle_list(), _cairo_gstate_fill(), _cairo_gstate_int_clip_extents(), _cairo_paginated_surface_acquire_source_image(), _cairo_paginated_surface_get_extents(), _cairo_pattern_get_extents(), _cairo_pdf_surface_analyze_operation(), _cairo_ps_surface_acquire_source_surface_from_pattern(), _cairo_ps_surface_analyze_operation(), _cairo_quartz_cairo_repeating_surface_pattern_to_quartz(), _cairo_quartz_cg_mask_with_surface(), _cairo_quartz_setup_state(), _cairo_surface_default_source(), _cairo_surface_observer_get_extents(), _cairo_surface_snapshot_get_extents(), _cairo_surface_wrapper_get_extents(), _cairo_surface_wrapper_get_target_extents(), _cairo_svg_surface_emit_composite_surface_pattern(), _cairo_svg_surface_emit_recording_surface(), _cairo_svg_surface_emit_surface(), _cairo_xcb_surface_pixmap(), _create_recording_surface_for_target(), _get_source_surface_extents(), _paint_page(), _paint_thumbnail_image(), _surface_is_clear(), _surface_is_opaque(), _vg_clone_image_surface(), _vg_clone_recording_surface(), cairo_script_surface_create_for_target(), cairo_surface_mark_dirty(), record_source(), record_target(), and surface_source().

◆ _cairo_surface_get_source()

cairo_surface_t* _cairo_surface_get_source ( cairo_surface_t surface,
cairo_rectangle_int_t extents 
)

Definition at line 2111 of file cairo-surface.c.

◆ _cairo_surface_has_device_transform()

cairo_bool_t _cairo_surface_has_device_transform ( cairo_surface_t surface)

◆ _cairo_surface_has_mime_data()

static cairo_bool_t _cairo_surface_has_mime_data ( cairo_surface_t surface)
static

◆ _cairo_surface_has_mime_image()

◆ _cairo_surface_has_snapshot()

◆ _cairo_surface_has_snapshots()

◆ _cairo_surface_init()

void _cairo_surface_init ( cairo_surface_t surface,
const cairo_surface_backend_t backend,
cairo_device_t device,
cairo_content_t  content,
cairo_bool_t  is_vector 
)

Definition at line 401 of file cairo-surface.c.

References _cairo_surface_allocate_unique_id(), _cairo_user_data_array_init(), _cairo_surface::_finishing, _cairo_surface::backend, backend, cairo_device_reference(), cairo_list_init(), cairo_matrix_init_identity(), CAIRO_MUTEX_INITIALIZE, CAIRO_REFERENCE_COUNT_INIT, CAIRO_STATUS_SUCCESS, CAIRO_SURFACE_FALLBACK_RESOLUTION_DEFAULT, CAIRO_SURFACE_RESOLUTION_DEFAULT, _cairo_surface::content, check-c-linkage-decls::content, _cairo_surface::damage, _cairo_surface::device, _cairo_surface::device_transform, _cairo_surface::device_transform_inverse, _cairo_surface::device_transform_observers, FALSE, _cairo_surface::finished, _cairo_surface::has_font_options, _cairo_surface::is_clear, _cairo_surface::is_vector, _cairo_surface::mime_data, NULL, _cairo_surface::owns_device, _cairo_surface::ref_count, _cairo_surface::serial, _cairo_surface::snapshot_of, _cairo_surface::snapshots, _cairo_surface::status, surface, _cairo_surface::type, _cairo_surface::unique_id, _cairo_surface::user_data, _cairo_surface::x_fallback_resolution, _cairo_surface::x_resolution, _cairo_surface::y_fallback_resolution, and _cairo_surface::y_resolution.

Referenced by _cairo_analysis_surface_create(), _cairo_beos_surface_create_internal(), _cairo_cogl_surface_create_full(), _cairo_gl_pattern_to_source(), _cairo_gl_surface_init(), _cairo_gl_white_source(), _cairo_image_source_create_for_pattern(), _cairo_image_surface_create_for_pixman_image(), _cairo_null_surface_create(), _cairo_paginated_surface_create(), _cairo_pdf_surface_create_for_stream_internal(), _cairo_ps_surface_create_for_stream_internal(), _cairo_quartz_surface_create_internal(), _cairo_recording_surface_snapshot(), _cairo_script_surface_create_internal(), _cairo_surface_create_for_rectangle_int(), _cairo_surface_create_observer_internal(), _cairo_surface_snapshot(), _cairo_svg_surface_create_for_document(), _cairo_type3_glyph_surface_create(), _cairo_win32_display_surface_create_for_dc(), _cairo_xcb_picture_create(), _cairo_xcb_pixmap_copy(), _cairo_xcb_pixmap_create(), _cairo_xcb_surface_create_internal(), _cairo_xlib_surface_create_internal(), _cairo_xml_surface_create_internal(), _vg_surface_create_internal(), attach_proxy(), attach_snapshot(), cairo_directfb_surface_create(), cairo_os2_surface_create(), cairo_qt_surface_create(), cairo_qt_surface_create_with_qimage(), cairo_qt_surface_create_with_qpixmap(), cairo_quartz_image_surface_create(), cairo_recording_surface_create(), cairo_surface_create_for_rectangle(), cairo_tee_surface_create(), cairo_win32_printing_surface_create(), cairo_win32_surface_create_with_format(), gallium_surface_create_internal(), init_source(), intel_surface_init(), radeon_surface_init(), source(), and surface_source().

◆ _cairo_surface_map_to_image()

cairo_image_surface_t* _cairo_surface_map_to_image ( cairo_surface_t surface,
const cairo_rectangle_int_t extents 
)

_cairo_surface_map_to_image: @surface: an existing surface used to extract the image from @extents: limit the extraction to an rectangular region

Returns an image surface that is the most efficient mechanism for modifying the backing store of the target surface. The region retrieved is limited to @extents.

Note, the use of the original surface as a target or source whilst it is mapped is undefined. The result of mapping the surface multiple times is undefined. Calling cairo_surface_destroy() or cairo_surface_finish() on the resulting image surface results in undefined behavior. Changing the device transform of the image surface or of @surface before the image surface is unmapped results in undefined behavior.

Assumes that @surface is valid (CAIRO_STATUS_SUCCESS, non-finished).

Return value: a pointer to the newly allocated image surface. The caller must use _cairo_surface_unmap_image() to destroy this image surface.

This function always returns a valid pointer, but it will return a pointer to a "nil" surface if @other is already in an error state or any other error occurs.

The returned image might have a CAIRO_FORMAT_INVALID format.

Definition at line 637 of file cairo-surface.c.

References _cairo_image_surface_clone_subimage(), assert(), _cairo_surface::backend, image, _cairo_surface_backend::map_to_image, NULL, and surface.

Referenced by _cairo_fallback_compositor_fill(), _cairo_fallback_compositor_glyphs(), _cairo_fallback_compositor_mask(), _cairo_fallback_compositor_paint(), _cairo_fallback_compositor_stroke(), _cairo_gl_pattern_texture_setup(), _cairo_quartz_image_surface_map_to_image(), _cairo_quartz_surface_map_to_image(), _cairo_surface_default_acquire_source_image(), _cairo_surface_observer_map_to_image(), _cairo_surface_subsurface_map_to_image(), _cairo_surface_sync(), _cairo_win32_display_surface_map_to_image(), _cairo_xcb_surface_map_to_image(), cairo_surface_map_to_image(), render_pattern(), and surface_source().

◆ _cairo_surface_mask()

◆ _cairo_surface_paint()

cairo_status_t _cairo_surface_paint ( cairo_surface_t surface,
cairo_operator_t  op,
const cairo_pattern_t source,
const cairo_clip_t clip 
)

Definition at line 2171 of file cairo-surface.c.

References _cairo_clip_is_all_clipped(), _cairo_error(), _cairo_surface_begin_modification(), _cairo_surface_set_error(), _pattern_has_error(), _cairo_surface::backend, CAIRO_INT_STATUS_NOTHING_TO_DO, CAIRO_OPERATOR_CLEAR, CAIRO_STATUS_SUCCESS, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface::finished, _cairo_surface::is_clear, nothing_to_do(), NULL, _cairo_surface_backend::paint, _cairo_surface::serial, _cairo_surface::status, status, surface, TRACE, and unlikely.

Referenced by _cairo_clip_combine_with_surface(), _cairo_clip_get_image(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gl_surface_draw_image(), _cairo_gstate_fill(), _cairo_gstate_mask(), _cairo_gstate_paint(), _cairo_image_surface_clone_subimage(), _cairo_paginated_surface_paint(), _cairo_pdf_surface_add_padded_image_surface(), _cairo_pdf_surface_emit_image(), _cairo_ps_surface_create_padded_image_from_image(), _cairo_ps_surface_emit_image(), _cairo_ps_surface_flatten_image_transparency(), _cairo_quartz_cg_mask(), _cairo_quartz_image_surface_paint(), _cairo_surface_create_scratch(), _cairo_surface_observer_paint(), _cairo_surface_offset_paint(), _cairo_surface_subsurface_acquire_source_image(), _cairo_surface_subsurface_snapshot(), _cairo_surface_unmap_image(), _cairo_surface_wrapper_paint(), _cairo_win32_printing_surface_paint_image_pattern(), _cairo_win32_scaled_font_init_glyph_surface(), _cairo_xcb_fallback_compositor_paint(), _cairo_xlib_surface_add_glyph(), _get_image(), _get_image_surface(), _paint_fallback_image(), _paint_thumbnail_image(), _render_to_picture(), _render_to_pixmap(), _transform_glyph_bitmap(), cairo_surface_create_similar(), gallium_surface_paint(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), i965_surface_enable_scan_out(), i965_surface_glyphs(), intel_surface_paint(), radeon_surface_paint(), subsurface_source(), and surface_source().

◆ _cairo_surface_release_device_reference()

void _cairo_surface_release_device_reference ( cairo_surface_t surface)

_cairo_surface_release_device_reference: @surface: a cairo_surface_t

This function makes @surface release the reference to its device. The function is intended to be used for avoiding cycling references for surfaces that are owned by their device, for example cache surfaces. Note that the @surface will still assume that the device is available. So it is the caller's responsibility to ensure the device stays around until the @surface is destroyed. Just calling cairo_surface_finish() is not enough.

Definition at line 1098 of file cairo-surface.c.

References assert(), cairo_device_destroy(), _cairo_surface::device, FALSE, _cairo_surface::owns_device, and surface.

Referenced by cairo_gl_context_get_glyph_cache().

◆ _cairo_surface_release_source_image()

void _cairo_surface_release_source_image ( cairo_surface_t surface,
cairo_image_surface_t image,
void image_extra 
)

_cairo_surface_release_source_image: @surface: a cairo_surface_t @image_extra: same as return from the matching _cairo_surface_acquire_source_image()

Releases any resources obtained with _cairo_surface_acquire_source_image()

Definition at line 2088 of file cairo-surface.c.

References assert(), _cairo_surface::backend, _cairo_surface::finished, _cairo_surface_backend::release_source_image, and surface.

Referenced by _acquire_source_cleanup(), _cairo_cogl_acquire_surface_texture(), _cairo_pdf_surface_analyze_surface_pattern_transparency(), _cairo_pdf_surface_emit_surface(), _cairo_pdf_surface_release_source_image_from_pattern(), _cairo_ps_surface_acquire_source_surface_from_pattern(), _cairo_ps_surface_analyze_surface_pattern_transparency(), _cairo_ps_surface_emit_image(), _cairo_surface_observer_release_source_image(), _cairo_surface_snapshot_copy_on_write(), _cairo_surface_snapshot_release_source_image(), _cairo_surface_wrapper_release_source_image(), _cairo_type3_glyph_surface_paint(), _cairo_win32_printing_surface_release_image_pattern(), _cairo_xcb_surface_picture(), _cairo_xml_emit_surface(), _emit_image_surface_pattern(), _pixman_image_for_raster(), _pixman_image_for_surface(), _raster_source_cleanup(), _vg_clone_image_surface(), DataProviderReleaseCallback(), i915_surface_create_from_cacheable_image(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), proxy_release_source_image(), upload_boxes(), write_png(), and PatternToBrushConverter::~PatternToBrushConverter().

◆ _cairo_surface_set_error()

cairo_int_status_t _cairo_surface_set_error ( cairo_surface_t surface,
cairo_int_status_t  status 
)

_cairo_surface_set_error: @surface: a surface @status: a status value indicating an error

Atomically sets surface->status to @status and calls _cairo_error; Does nothing if status is CAIRO_STATUS_SUCCESS or any of the internal status values.

All assignments of an error status to surface->status should happen through _cairo_surface_set_error(). Note that due to the nature of the atomic operation, it is not safe to call this function on the nil objects.

The purpose of this function is to allow the user to set a breakpoint in _cairo_error() to generate a stack trace for when the user causes cairo to detect an error.

Return value: the error status.

Definition at line 184 of file cairo-surface.c.

References _cairo_error(), _cairo_status_set_error, CAIRO_INT_STATUS_LAST_STATUS, CAIRO_INT_STATUS_NOTHING_TO_DO, CAIRO_INT_STATUS_SUCCESS, _cairo_surface::status, status, and surface.

Referenced by _cairo_paginated_surface_set_size(), _cairo_recording_surface_replay_internal(), _cairo_recording_surface_replay_one(), _cairo_surface_acquire_source_image(), _cairo_surface_copy_mime_data(), _cairo_surface_fill(), _cairo_surface_fill_stroke(), _cairo_surface_finish(), _cairo_surface_get_extents(), _cairo_surface_mask(), _cairo_surface_paint(), _cairo_surface_set_font_options(), _cairo_surface_show_text_glyphs(), _cairo_surface_snapshot_copy_on_write(), _cairo_surface_stroke(), _cairo_surface_tag(), _drawable_changed(), _extract_pdf_surface(), _extract_ps_surface(), _extract_svg_surface(), _paint_page(), _start_page(), cairo_drm_surface_get_name(), cairo_drm_surface_map_to_image(), cairo_gl_surface_set_size(), cairo_gl_surface_swapbuffers(), cairo_pdf_surface_add_outline(), cairo_pdf_surface_set_metadata(), cairo_pdf_surface_set_size(), cairo_ps_surface_dsc_comment(), cairo_ps_surface_set_size(), cairo_recording_surface_ink_extents(), cairo_surface_copy_page(), cairo_surface_flush(), cairo_surface_has_show_text_glyphs(), cairo_surface_mark_dirty(), cairo_surface_mark_dirty_rectangle(), cairo_surface_set_device_offset(), cairo_surface_set_device_scale(), cairo_surface_set_fallback_resolution(), cairo_surface_set_mime_data(), cairo_surface_show_page(), cairo_surface_supports_mime_type(), cairo_surface_unmap_image(), cairo_tee_surface_add(), cairo_tee_surface_remove(), cairo_xcb_surface_set_drawable(), cairo_xcb_surface_set_size(), cairo_xlib_surface_set_drawable(), and cairo_xlib_surface_set_size().

◆ _cairo_surface_set_font_options()

void _cairo_surface_set_font_options ( cairo_surface_t surface,
cairo_font_options_t options 
)

_cairo_surface_set_font_options: @surface: a cairo_surface_t @options: a cairo_font_options_t object that contains the options to use for this surface instead of backend's default font options.

Sets the default font rendering options for the surface. This is useful to correctly propagate default font options when falling back to an image surface in a backend implementation. This affects the options returned in cairo_surface_get_font_options().

If @options is NULL the surface options are reset to those of the backend default.

Definition at line 1561 of file cairo-surface.c.

References _cairo_error(), _cairo_font_options_init_copy(), _cairo_surface_set_error(), assert(), CAIRO_STATUS_SURFACE_FINISHED, FALSE, _cairo_surface::finished, _cairo_surface::font_options, _cairo_surface::has_font_options, NULL, _cairo_surface::snapshot_of, _cairo_surface::status, surface, and TRUE.

Referenced by _cairo_paginated_surface_create_image_surface(), and _cairo_surface_copy_similar_properties().

◆ _cairo_surface_set_resolution()

void _cairo_surface_set_resolution ( cairo_surface_t surface,
double  x_res,
double  y_res 
)

_cairo_surface_set_resolution: @surface: the surface @x_res: x resolution, in dpi @y_res: y resolution, in dpi

Set the actual surface resolution of @surface to the given x and y DPI. Mainly used for correctly computing the scale factor when fallback rendering needs to take place in the paginated surface.

Definition at line 2971 of file cairo-surface.c.

References _cairo_surface::status, surface, _cairo_surface::x_resolution, and _cairo_surface::y_resolution.

Referenced by _cairo_win32_printing_surface_start_page().

◆ _cairo_surface_show_text_glyphs()

◆ _cairo_surface_stroke()

◆ _cairo_surface_tag()

◆ _cairo_surface_unmap_image()

cairo_int_status_t _cairo_surface_unmap_image ( cairo_surface_t surface,
cairo_image_surface_t image 
)

_cairo_surface_unmap_image: @surface: the surface passed to _cairo_surface_map_to_image(). the currently mapped image

Unmaps the image surface as returned from _cairo_surface_map_to_image().

The content of the image will be uploaded to the target surface. Afterwards, the image is destroyed.

Using an image surface which wasn't returned by _cairo_surface_map_to_image() results in undefined behavior.

An image surface in error status can be passed to _cairo_surface_unmap_image().

Return value: the unmap status.

Even if the unmap status is not successful, destroyed.

Definition at line 676 of file cairo-surface.c.

References _cairo_clip_destroy(), _cairo_clip_intersect_rectangle(), _cairo_image_surface_is_clone(), _cairo_pattern_fini(), _cairo_pattern_init_for_surface(), _cairo_surface_paint(), _cairo_surface::backend, CAIRO_FILTER_NEAREST, CAIRO_INT_STATUS_UNSUPPORTED, cairo_matrix_init_translate(), CAIRO_OPERATOR_SOURCE, CAIRO_STATUS_SUCCESS, cairo_surface_destroy(), cairo_surface_finish(), NULL, pattern, status, surface, unlikely, and _cairo_surface_backend::unmap_image.

Referenced by _cairo_fallback_compositor_fill(), _cairo_fallback_compositor_glyphs(), _cairo_fallback_compositor_mask(), _cairo_fallback_compositor_paint(), _cairo_fallback_compositor_stroke(), _cairo_gl_pattern_texture_setup(), _cairo_quartz_image_surface_unmap_image(), _cairo_quartz_surface_unmap_image(), _cairo_surface_default_release_source_image(), _cairo_surface_observer_unmap_image(), _cairo_surface_subsurface_unmap_image(), _cairo_surface_sync(), _cairo_win32_display_surface_unmap_image(), _cairo_xcb_surface_unmap(), cairo_surface_unmap_image(), render_pattern(), and surface_source().

◆ _pattern_has_error()

◆ cairo_surface_copy_page()

void cairo_surface_copy_page ( cairo_surface_t surface)

cairo_surface_copy_page: @surface: a cairo_surface_t

Emits the current page for backends that support multiple pages, but doesn't clear it, so that the contents of the current page will be retained for the next page. Use cairo_surface_show_page() if you want to get an empty page after the emission.

There is a convenience function for this that takes a cairo_t, namely cairo_copy_page().

Since: 1.6

Definition at line 2449 of file cairo-surface.c.

References _cairo_surface_set_error(), assert(), _cairo_surface::backend, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface_backend::copy_page, _cairo_surface::finished, NULL, _cairo_surface::snapshot_of, _cairo_surface::status, surface, and unlikely.

Referenced by _cairo_gstate_copy_page().

◆ cairo_surface_create_similar()

cairo_surface_t* cairo_surface_create_similar ( cairo_surface_t other,
cairo_content_t  content,
int  width,
int  height 
)

cairo_surface_create_similar: @other: an existing surface used to select the backend of the new surface @content: the content for the new surface @width: width of the new surface, (in device-space units) @height: height of the new surface (in device-space units)

Create a new surface that is as compatible as possible with an existing surface. For example the new surface will have the same device scale, fallback resolution and font options as @other. Generally, the new surface will also use the same backend as @other, unless that is not possible for some reason. The type of the returned surface may be examined with cairo_surface_get_type().

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

Use cairo_surface_create_similar_image() if you need an image surface which can be painted quickly to the target surface.

Return value: a pointer to the newly allocated surface. The caller owns the surface and should call cairo_surface_destroy() when done with it.

This function always returns a valid pointer, but it will return a pointer to a "nil" surface if @other is already in an error state or any other error occurs.

Since: 1.0

Definition at line 492 of file cairo-surface.c.

References _cairo_format_from_content(), _cairo_pattern_init_solid(), _cairo_surface_copy_similar_properties(), _cairo_surface_create_in_error(), _cairo_surface_paint(), assert(), CAIRO_COLOR_TRANSPARENT, CAIRO_CONTENT_VALID, CAIRO_OPERATOR_CLEAR, CAIRO_STATUS_INVALID_CONTENT, CAIRO_STATUS_INVALID_SIZE, CAIRO_STATUS_SURFACE_FINISHED, cairo_surface_create_similar_image(), cairo_surface_destroy(), cairo_surface_set_device_scale(), check-c-linkage-decls::content, height, _cairo_surface::is_clear, NULL, other, pattern, _cairo_surface::status, status, surface, unlikely, and width.

Referenced by CairoOutputDev::tilingPatternFill().

◆ cairo_surface_create_similar_image()

cairo_surface_t* cairo_surface_create_similar_image ( cairo_surface_t other,
cairo_format_t  format,
int  width,
int  height 
)

cairo_surface_create_similar_image: @other: an existing surface used to select the preference of the new surface @format: the format for the new surface @width: width of the new surface, (in pixels) @height: height of the new surface (in pixels)

Create a new image surface that is as compatible as possible for uploading to and the use in conjunction with an existing surface. However, this surface can still be used like any normal image surface. Unlike cairo_surface_create_similar() the new image surface won't inherit the device scale from @other.

Initially the surface contents are all 0 (transparent if contents have transparency, black otherwise.)

Use cairo_surface_create_similar() if you don't need an image surface.

Return value: a pointer to the newly allocated image surface. The caller owns the surface and should call cairo_surface_destroy() when done with it.

This function always returns a valid pointer, but it will return a pointer to a "nil" surface if @other is already in an error state or any other error occurs.

Since: 1.12

Definition at line 576 of file cairo-surface.c.

References _cairo_surface_create_in_error(), assert(), CAIRO_FORMAT_VALID, cairo_image_surface_create(), CAIRO_STATUS_INVALID_FORMAT, CAIRO_STATUS_INVALID_SIZE, CAIRO_STATUS_SURFACE_FINISHED, format, height, image, NULL, other, unlikely, and width.

Referenced by _cairo_clip_get_image(), _cairo_image_surface_clone_subimage(), _cairo_mask_compositor_fill(), _cairo_mask_compositor_glyphs(), _cairo_mask_compositor_stroke(), _cairo_surface_create_scratch(), cairo_surface_create_similar(), and fallback_box().

◆ cairo_surface_destroy()

void cairo_surface_destroy ( cairo_surface_t surface)

cairo_surface_destroy: @surface: a cairo_surface_t

Decreases the reference count on @surface by one. If the result is zero, then @surface and all associated resources are freed. See cairo_surface_reference().

Since: 1.0

Definition at line 949 of file cairo-surface.c.

References _cairo_damage_destroy(), _cairo_reference_count_dec_and_test, _cairo_surface_finish(), _cairo_surface_finish_snapshots(), _cairo_surface_has_snapshots(), _cairo_user_data_array_fini(), assert(), cairo_device_destroy(), CAIRO_REFERENCE_COUNT_GET_VALUE, CAIRO_REFERENCE_COUNT_HAS_REFERENCE, CAIRO_REFERENCE_COUNT_IS_INVALID, _cairo_surface::damage, _cairo_surface::device, _cairo_surface::finished, free, _cairo_surface::mime_data, NULL, _cairo_surface::owns_device, _cairo_surface::ref_count, _cairo_surface::snapshot_of, surface, and _cairo_surface::user_data.

Referenced by __clip_to_surface(), _analyze_recording_surface_pattern(), _cairo_analysis_surface_finish(), _cairo_beos_surface_release_dest_image(), _cairo_beos_surface_release_source_image(), _cairo_clip_get_image(), _cairo_clip_get_surface(), _cairo_cogl_acquire_pattern_texture(), _cairo_cogl_acquire_surface_texture(), _cairo_cogl_surface_create_similar(), _cairo_cogl_surface_release_source_image(), _cairo_default_context_pop_group(), _cairo_default_context_push_group(), _cairo_ft_scaled_glyph_init(), _cairo_gl_glyph_cache_fini(), _cairo_gl_msaa_compositor_fill(), _cairo_gl_msaa_compositor_glyphs(), _cairo_gl_msaa_compositor_mask(), _cairo_gl_msaa_compositor_stroke(), _cairo_gl_operand_destroy(), _cairo_gl_pattern_texture_setup(), _cairo_gl_pattern_to_source(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gl_surface_create_and_clear_scratch(), _cairo_gl_surface_create_similar(), _cairo_gl_surface_draw_image(), _cairo_gl_surface_map_to_image(), _cairo_gl_surface_release_source_image(), _cairo_gl_surface_unmap_image(), _cairo_gstate_fini(), _cairo_image_surface_clone_subimage(), _cairo_image_surface_finish(), _cairo_image_surface_unmap_image(), _cairo_mask_compositor_fill(), _cairo_mask_compositor_glyphs(), _cairo_mask_compositor_stroke(), _cairo_os2_surface_finish(), _cairo_paginated_surface_acquire_source_image(), _cairo_paginated_surface_create(), _cairo_paginated_surface_finish(), _cairo_paginated_surface_release_source_image(), _cairo_paginated_surface_set_size(), _cairo_paginated_surface_show_page(), _cairo_pattern_fini(), _cairo_pattern_init_snapshot(), _cairo_pdf_surface_add_padded_image_surface(), _cairo_pdf_surface_add_source_surface(), _cairo_pdf_surface_analyze_user_font_subset(), _cairo_pdf_surface_clear(), _cairo_pdf_surface_create_for_stream_internal(), _cairo_pdf_surface_emit_image(), _cairo_pdf_surface_emit_recording_surface(), _cairo_pdf_surface_emit_type3_font_subset(), _cairo_ps_form_pluck(), _cairo_ps_surface_acquire_source_surface_from_pattern(), _cairo_ps_surface_analyze_user_font_subset(), _cairo_ps_surface_create_for_stream_internal(), _cairo_ps_surface_emit_image(), _cairo_ps_surface_emit_recording_surface(), _cairo_ps_surface_emit_surface_pattern(), _cairo_ps_surface_emit_type3_font_subset(), _cairo_ps_surface_flatten_image_transparency(), _cairo_ps_surface_paint_surface(), _cairo_qt_surface_acquire_source_image(), _cairo_qt_surface_create_similar(), _cairo_qt_surface_finish(), _cairo_qt_surface_release_source_image(), _cairo_qt_surface_unmap_image(), _cairo_quartz_cg_mask(), _cairo_quartz_image_surface_create_similar(), _cairo_quartz_image_surface_create_similar_image(), _cairo_quartz_init_glyph_surface(), _cairo_quartz_surface_acquire_source_image(), _cairo_quartz_surface_finish(), _cairo_quartz_surface_unmap_image(), _cairo_recording_surface_acquire_source_image(), _cairo_recording_surface_merge_source_attributes(), _cairo_recording_surface_release_source_image(), _cairo_recording_surface_snapshot(), _cairo_scaled_glyph_fini(), _cairo_scaled_glyph_set_color_surface(), _cairo_scaled_glyph_set_recording_surface(), _cairo_scaled_glyph_set_surface(), _cairo_script_surface_create_similar(), _cairo_shape_mask_compositor_fill(), _cairo_shape_mask_compositor_glyphs(), _cairo_shape_mask_compositor_stroke(), _cairo_surface_create_scratch(), _cairo_surface_detach_snapshot(), _cairo_surface_observer_create_similar(), _cairo_surface_observer_finish(), _cairo_surface_snapshot(), _cairo_surface_snapshot_acquire_source_image(), _cairo_surface_snapshot_finish(), _cairo_surface_snapshot_flush(), _cairo_surface_snapshot_get_extents(), _cairo_surface_snapshot_release_source_image(), _cairo_surface_subsurface_acquire_source_image(), _cairo_surface_subsurface_detach_snapshot(), _cairo_surface_subsurface_finish(), _cairo_surface_subsurface_release_source_image(), _cairo_surface_subsurface_snapshot(), _cairo_surface_to_cgimage(), _cairo_surface_unmap_image(), _cairo_surface_wrapper_fini(), _cairo_svg_document_emit_bitmap_glyph_data(), _cairo_svg_surface_create_for_document(), _cairo_svg_surface_emit_recording_surface(), _cairo_tee_surface_create_similar(), _cairo_traps_compositor_mask(), _cairo_type3_glyph_surface_emit_image(), _cairo_user_font_face_scaled_font_create(), _cairo_user_scaled_glyph_init(), _cairo_win32_display_surface_discard_fallback(), _cairo_win32_display_surface_finish(), _cairo_win32_display_surface_flush(), _cairo_win32_display_surface_map_to_image(), _cairo_win32_printing_surface_paint_image_pattern(), _cairo_win32_printing_surface_paint_recording_pattern(), _cairo_win32_scaled_font_init_glyph_surface(), _cairo_xcb_linear_picture(), _cairo_xcb_pixmap_finish(), _cairo_xcb_radial_picture(), _cairo_xcb_screen_finish(), _cairo_xcb_screen_store_linear_picture(), _cairo_xcb_screen_store_radial_picture(), _cairo_xcb_solid_picture(), _cairo_xcb_surface_add_glyph(), _cairo_xcb_surface_core_copy_boxes(), _cairo_xcb_surface_finish(), _cairo_xcb_surface_fixup_unbounded(), _cairo_xcb_surface_fixup_unbounded_with_mask(), _cairo_xcb_surface_flush(), _cairo_xcb_surface_map_to_image(), _cairo_xcb_surface_picture(), _cairo_xcb_surface_release_source_image(), _cairo_xcb_surface_render_fill_via_mask(), _cairo_xcb_surface_render_glyphs_via_mask(), _cairo_xcb_surface_render_stroke_via_mask(), _cairo_xcb_surface_unmap(), _cairo_xlib_proxy_finish(), _cairo_xlib_surface_add_glyph(), _cairo_xlib_surface_discard_shm(), _cairo_xlib_surface_draw_image(), _cairo_xlib_surface_release_source_image(), _cairo_xlib_surface_unmap_image(), _clip_and_composite_combine(), _clip_and_composite_source(), _clip_and_composite_with_mask(), _composite_boxes(), _composite_glyphs(), _composite_mask(), _composite_mask_clip_boxes(), _composite_opacity_boxes(), _composite_traps(), _create_composite_mask(), _defer_free_cleanup(), _drawable_changed(), _emit_image_surface(), _emit_recording_surface_pattern(), _emit_surface_pattern(), _get_image(), _get_image_surface(), _get_shm_image(), _get_source_surface_extents(), _paint_back_unbounded_surface(), _paint_fallback_image(), _paint_page(), _paint_thumbnail_image(), _pattern_cache_entry_destroy(), _pixman_image_for_recording(), _pixman_image_for_surface(), _prepare_unbounded_surface(), _recording_surface_get_ink_bbox(), _render_composite_boxes(), _render_to_picture(), _render_to_pixmap(), _trace_mask_to_path(), _transform_glyph_bitmap(), _vg_clone_recording_surface(), _vg_setup_surface_source(), _vg_snapshot_cache_remove(), _vg_surface_clipper_intersect_clip_path(), _vg_surface_release_source_image(), aptex_vdbg_ship_close(), attach_snapshot(), CairoOutputDev::beginTransparencyGroup(), cairo_drm_surface_unmap(), cairo_gl_surface_create(), cairo_os2_surface_set_size(), cairo_script_from_recording_surface(), cairo_surface_create_similar(), cairo_surface_finish(), cairo_surface_map_to_image(), cairo_surface_unmap_image(), cairo_win32_printing_surface_create(), cairo_xml_for_recording_surface(), clip_and_composite(), clip_and_composite_combine(), clip_and_composite_source(), clip_and_composite_with_mask(), combine_clip_as_traps(), composite_aligned_boxes(), composite_box(), composite_boxes(), composite_mask(), composite_mask_clip_boxes(), composite_opacity(), composite_opacity_boxes(), composite_tristrip(), create_composite_mask(), DataProviderReleaseCallback(), detach_proxy(), draw_image_boxes(), CairoOutputDev::drawImage(), CairoImageOutputDev::drawImage(), CairoImageOutputDev::drawImageMask(), CairoOutputDev::drawImageMaskPrescaled(), CairoOutputDev::drawImageMaskRegular(), CairoOutputDev::drawMaskedImage(), CairoImageOutputDev::drawMaskedImage(), CairoOutputDev::drawSoftMaskedImage(), CairoImageOutputDev::drawSoftMaskedImage(), endDocument(), endPage(), fallback_box(), fixup_unbounded_mask(), fixup_unbounded_with_mask(), gallium_surface_flush(), gallium_surface_release_source_image(), get_clip_source(), get_clip_surface(), i915_blt_boxes(), i915_surface_copy_subimage(), i915_surface_create_from_cacheable_image_internal(), i915_surface_extract_X_from_Y(), i915_surface_glyphs(), i965_shader_acquire_solid_surface(), i965_shader_acquire_surface(), i965_shader_fini(), i965_surface_clone(), i965_surface_enable_scan_out(), i965_surface_glyphs(), intel_get_glyph(), intel_surface_flush(), intel_surface_release_source_image(), log_fini(), opaque_source(), radeon_surface_acquire_source_image(), radeon_surface_flush(), radeon_surface_release_source_image(), read_png(), record_source(), record_to_picture(), render_glyphs_via_mask(), render_pattern(), replay_record(), CairoImage::setImage(), CairoOutputDev::setSoftMask(), CairoImageOutputDev::setSoftMaskFromImageMask(), subsurface_source(), surface_finish_and_destroy(), surface_source(), CairoOutputDev::tilingPatternFill(), transparent_source(), traps_get_clip_surface(), traps_to_operand(), tristrip_to_surface(), write_png(), and CairoImage::~CairoImage().

◆ cairo_surface_finish()

void cairo_surface_finish ( cairo_surface_t surface)

cairo_surface_finish: @surface: the cairo_surface_t to finish

This function finishes the surface and drops all references to external resources. For example, for the Xlib backend it means that cairo will no longer access the drawable, which can be freed. After calling cairo_surface_finish() the only valid operations on a surface are getting and setting user, referencing and destroying, and flushing and finishing it. Further drawing to the surface will not affect the surface but will instead trigger a CAIRO_STATUS_SURFACE_FINISHED error.

When the last call to cairo_surface_destroy() decreases the reference count to zero, cairo will call cairo_surface_finish() if it hasn't been called already, before freeing the resources associated with the surface.

Since: 1.0

Definition at line 1063 of file cairo-surface.c.

References _cairo_surface_finish(), _cairo_surface_finish_snapshots(), CAIRO_REFERENCE_COUNT_IS_INVALID, cairo_surface_destroy(), cairo_surface_reference(), _cairo_surface::finished, NULL, _cairo_surface::ref_count, and surface.

Referenced by _cairo_gl_surface_unmap_image(), _cairo_image_surface_unmap_image(), _cairo_paginated_surface_finish(), _cairo_ps_surface_analyze_user_font_subset(), _cairo_ps_surface_emit_type3_font_subset(), _cairo_qt_surface_unmap_image(), _cairo_quartz_surface_unmap_image(), _cairo_scaled_glyph_fini(), _cairo_scaled_glyph_set_recording_surface(), _cairo_surface_snapshot_finish(), _cairo_surface_unmap_image(), _cairo_win32_display_surface_discard_fallback(), _cairo_win32_display_surface_finish(), _cairo_xcb_screen_finish(), _cairo_xcb_surface_finish(), _cairo_xcb_surface_flush(), _cairo_xcb_surface_render_fill_via_mask(), _cairo_xcb_surface_render_glyphs_via_mask(), _cairo_xcb_surface_render_stroke_via_mask(), _cairo_xcb_surface_unmap(), _cairo_xlib_screen_destroy(), _cairo_xlib_surface_discard_shm(), _cairo_xlib_surface_unmap_image(), cairo_surface_unmap_image(), detach_proxy(), endDocument(), endPage(), gallium_surface_flush(), i915_surface_glyphs(), i965_surface_glyphs(), intel_surface_flush(), radeon_surface_flush(), and surface_finish_and_destroy().

◆ cairo_surface_flush()

void cairo_surface_flush ( cairo_surface_t surface)

cairo_surface_flush: @surface: a cairo_surface_t

Do any pending drawing for the surface and also restore any temporary modifications cairo has made to the surface's state. This function must be called before switching from drawing on the surface with cairo to drawing on it directly with native APIs, or accessing its memory outside of Cairo. If the surface doesn't support direct access, then this function does nothing.

Since: 1.0

Definition at line 1648 of file cairo-surface.c.

References _cairo_surface_flush(), _cairo_surface_set_error(), _cairo_surface::finished, _cairo_surface::status, status, surface, and unlikely.

Referenced by _cairo_recording_surface_break_self_copy_loop(), _cairo_xlib_surface_discard_shm(), cairo_cogl_surface_end_frame(), cairo_drm_surface_unmap(), and writePageImage().

◆ cairo_surface_get_content()

cairo_content_t cairo_surface_get_content ( cairo_surface_t surface)

cairo_surface_get_content: @surface: a cairo_surface_t

This function returns the content type of @surface which indicates whether the surface contains color and/or alpha information. See cairo_content_t.

Return value: The content type of @surface.

Since: 1.2

Definition at line 238 of file cairo-surface.c.

References _cairo_surface::content, and surface.

◆ cairo_surface_get_device()

cairo_device_t* cairo_surface_get_device ( cairo_surface_t surface)

cairo_surface_get_device: @surface: a cairo_surface_t

This function returns the device for a @surface. See cairo_device_t.

Return value: The device for @surface or NULL if the surface does not have an associated device.

Since: 1.10

Definition at line 300 of file cairo-surface.c.

References _cairo_device_create_in_error(), _cairo_surface::device, _cairo_surface::status, surface, and unlikely.

◆ cairo_surface_get_device_offset()

void cairo_surface_get_device_offset ( cairo_surface_t surface,
double *  x_offset,
double *  y_offset 
)

cairo_surface_get_device_offset: @surface: a cairo_surface_t @x_offset: the offset in the X direction, in device units @y_offset: the offset in the Y direction, in device units

This function returns the previous device offset set by cairo_surface_set_device_offset().

Since: 1.2

Definition at line 1913 of file cairo-surface.c.

References _cairo_surface::device_transform, surface, _cairo_matrix::x0, x_offset, _cairo_matrix::y0, and y_offset.

Referenced by _cairo_pdf_surface_add_source_surface(), _cairo_pdf_surface_emit_combined_smask(), _cairo_ps_surface_acquire_source_surface_from_pattern(), _cairo_win32_printing_surface_acquire_image_pattern(), _trace_mask_to_path(), _transform_glyph_bitmap(), and CairoOutputDev::setSoftMask().

◆ cairo_surface_get_device_scale()

void cairo_surface_get_device_scale ( cairo_surface_t surface,
double *  x_scale,
double *  y_scale 
)

cairo_surface_get_device_scale: @surface: a cairo_surface_t @x_scale: the scale in the X direction, in device units @y_scale: the scale in the Y direction, in device units

This function returns the previous device offset set by cairo_surface_set_device_scale().

Since: 1.14

Definition at line 1835 of file cairo-surface.c.

References _cairo_surface::device_transform, surface, _cairo_matrix::xx, y_scale, and _cairo_matrix::yy.

◆ cairo_surface_get_fallback_resolution()

void cairo_surface_get_fallback_resolution ( cairo_surface_t surface,
double *  x_pixels_per_inch,
double *  y_pixels_per_inch 
)

cairo_surface_get_fallback_resolution: @surface: a cairo_surface_t @x_pixels_per_inch: horizontal pixels per inch @y_pixels_per_inch: vertical pixels per inch

This function returns the previous fallback resolution set by cairo_surface_set_fallback_resolution(), or default fallback resolution if never set.

Since: 1.8

Definition at line 2006 of file cairo-surface.c.

References surface, _cairo_surface::x_fallback_resolution, and _cairo_surface::y_fallback_resolution.

◆ cairo_surface_get_font_options()

void cairo_surface_get_font_options ( cairo_surface_t surface,
cairo_font_options_t options 
)

cairo_surface_get_font_options: @surface: a cairo_surface_t @options: a cairo_font_options_t object into which to store the retrieved options. All existing values are overwritten

Retrieves the default font rendering options for the surface. This allows display surfaces to report the correct subpixel order for rendering on them, print surfaces to disable hinting of metrics and so forth. The result can then be used with cairo_scaled_font_create().

Since: 1.0

Definition at line 1597 of file cairo-surface.c.

References _cairo_font_options_init_copy(), _cairo_font_options_init_default(), _cairo_surface::backend, cairo_font_options_status(), _cairo_surface::finished, _cairo_surface::font_options, _cairo_surface_backend::get_font_options, _cairo_surface::has_font_options, _cairo_surface::status, surface, and TRUE.

Referenced by _cairo_gstate_ensure_scaled_font(), _cairo_paginated_surface_create_image_surface(), _cairo_paginated_surface_get_font_options(), _cairo_surface_copy_similar_properties(), _cairo_surface_wrapper_get_font_options(), and _cairo_surface_wrapper_show_text_glyphs().

◆ cairo_surface_get_mime_data()

void cairo_surface_get_mime_data ( cairo_surface_t surface,
const char *  mime_type,
const unsigned char **  data,
unsigned long *  length 
)

◆ cairo_surface_get_reference_count()

unsigned int cairo_surface_get_reference_count ( cairo_surface_t surface)

cairo_surface_get_reference_count: @surface: a cairo_surface_t

Returns the current reference count of @surface.

Return value: the current reference count of @surface. If the object is a nil object, 0 will be returned.

Since: 1.4

Definition at line 1003 of file cairo-surface.c.

References CAIRO_REFERENCE_COUNT_GET_VALUE, CAIRO_REFERENCE_COUNT_IS_INVALID, NULL, _cairo_surface::ref_count, and surface.

◆ cairo_surface_get_type()

cairo_surface_type_t cairo_surface_get_type ( cairo_surface_t surface)

cairo_surface_get_type: @surface: a cairo_surface_t

This function returns the type of the backend used to create a surface. See cairo_surface_type_t for available types.

Return value: The type of @surface.

Since: 1.2

Definition at line 216 of file cairo-surface.c.

References surface, and _cairo_surface::type.

Referenced by CairoOutputDev::setMimeData().

◆ cairo_surface_get_user_data()

void* cairo_surface_get_user_data ( cairo_surface_t surface,
const cairo_user_data_key_t key 
)

cairo_surface_get_user_data: @surface: a cairo_surface_t @key: the address of the cairo_user_data_key_t the user data was attached to

Return user data previously attached to @surface using the specified key. If no user data has been attached with the given key this function returns NULL.

Return value: the user data previously attached or NULL.

Since: 1.0

Definition at line 1121 of file cairo-surface.c.

References _cairo_user_data_array_get_data(), CAIRO_REFERENCE_COUNT_HAS_REFERENCE, key, NULL, _cairo_surface::ref_count, surface, and _cairo_surface::user_data.

◆ cairo_surface_has_show_text_glyphs()

cairo_bool_t cairo_surface_has_show_text_glyphs ( cairo_surface_t surface)

cairo_surface_has_show_text_glyphs: @surface: a cairo_surface_t

Returns whether the surface supports sophisticated cairo_show_text_glyphs() operations. That is, whether it actually uses the provided text and cluster data to a cairo_show_text_glyphs() call.

Note: Even if this function returns FALSE, a cairo_show_text_glyphs() operation targeted at @surface will still succeed. It just will act like a cairo_show_glyphs() operation. Users can use this function to avoid computing UTF-8 text and cluster mapping if the target surface does not use it.

Return value: TRUE if @surface supports cairo_show_text_glyphs(), FALSE otherwise

Since: 1.8

Definition at line 2582 of file cairo-surface.c.

References _cairo_surface_set_error(), _cairo_surface::backend, CAIRO_STATUS_SURFACE_FINISHED, FALSE, _cairo_surface::finished, _cairo_surface_backend::has_show_text_glyphs, NULL, _cairo_surface_backend::show_text_glyphs, _cairo_surface::status, surface, and unlikely.

Referenced by _cairo_analysis_surface_has_show_text_glyphs(), _cairo_gstate_show_text_glyphs(), _cairo_paginated_surface_has_show_text_glyphs(), _cairo_surface_wrapper_has_show_text_glyphs(), cairo_show_text(), and CairoOutputDev::updateFont().

◆ cairo_surface_map_to_image()

cairo_surface_t* cairo_surface_map_to_image ( cairo_surface_t surface,
const cairo_rectangle_int_t extents 
)

cairo_surface_map_to_image: @surface: an existing surface used to extract the image from @extents: limit the extraction to an rectangular region

Returns an image surface that is the most efficient mechanism for modifying the backing store of the target surface. The region retrieved may be limited to the @extents or NULL for the whole surface

Note, the use of the original surface as a target or source whilst it is mapped is undefined. The result of mapping the surface multiple times is undefined. Calling cairo_surface_destroy() or cairo_surface_finish() on the resulting image surface results in undefined behavior. Changing the device transform of the image surface or of @surface before the image surface is unmapped results in undefined behavior.

Return value: a pointer to the newly allocated image surface. The caller must use cairo_surface_unmap_image() to destroy this image surface.

This function always returns a valid pointer, but it will return a pointer to a "nil" surface if @other is already in an error state or any other error occurs. If the returned pointer does not have an error status, it is guaranteed to be an image surface whose format is not CAIRO_FORMAT_INVALID.

Since: 1.12

Definition at line 764 of file cairo-surface.c.

References _cairo_image_surface_clone_subimage(), _cairo_rectangle_contains_rectangle(), _cairo_surface_create_in_error(), _cairo_surface_map_to_image(), _cairo_surface::backend, CAIRO_FORMAT_INVALID, CAIRO_STATUS_INVALID_SIZE, CAIRO_STATUS_SURFACE_FINISHED, cairo_surface_destroy(), _cairo_surface::finished, _cairo_surface_backend::get_extents, image, likely, NULL, _cairo_surface::status, status, surface, and unlikely.

Referenced by _compute_mask().

◆ cairo_surface_mark_dirty()

void cairo_surface_mark_dirty ( cairo_surface_t surface)

cairo_surface_mark_dirty: @surface: a cairo_surface_t

Tells cairo that drawing has been done to surface using means other than cairo, and that cairo should reread any cached areas. Note that you must call cairo_surface_flush() before doing such drawing.

Since: 1.0

Definition at line 1675 of file cairo-surface.c.

References _cairo_error(), _cairo_surface_get_extents(), _cairo_surface_set_error(), CAIRO_STATUS_SURFACE_FINISHED, cairo_surface_mark_dirty_rectangle(), _cairo_surface::finished, _cairo_surface::status, surface, and unlikely.

Referenced by _get_image_surface(), CairoOutputDev::drawImageMaskPrescaled(), CairoOutputDev::drawImageMaskRegular(), CairoOutputDev::drawMaskedImage(), CairoOutputDev::drawSoftMaskedImage(), RescaleDrawImage::getSourceImage(), and CairoOutputDev::setSoftMask().

◆ cairo_surface_mark_dirty_rectangle()

void cairo_surface_mark_dirty_rectangle ( cairo_surface_t surface,
int  x,
int  y,
int  width,
int  height 
)

cairo_surface_mark_dirty_rectangle: @surface: a cairo_surface_t @x: X coordinate of dirty rectangle @y: Y coordinate of dirty rectangle @width: width of dirty rectangle @height: height of dirty rectangle

Like cairo_surface_mark_dirty(), but drawing has been done only to the specified rectangle, so that cairo can retain cached contents for other parts of the surface.

Any cached clip set on the surface will be reset by this function, to make sure that future cairo calls have the clip set that they expect.

Since: 1.0

Definition at line 1712 of file cairo-surface.c.

References _cairo_damage_add_box(), _cairo_error(), _cairo_surface_has_mime_data(), _cairo_surface_has_snapshots(), _cairo_surface_set_error(), assert(), _cairo_surface::backend, box, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface::damage, _cairo_surface::device_transform, FALSE, _cairo_surface::finished, height, _cairo_surface::is_clear, _cairo_surface_backend::mark_dirty_rectangle, NULL, _cairo_surface::serial, _cairo_surface::snapshot_of, _cairo_surface::status, status, surface, unlikely, width, cordic::x, _cairo_matrix::x0, y, and _cairo_matrix::y0.

Referenced by cairo_surface_mark_dirty().

◆ cairo_surface_reference()

cairo_surface_t* cairo_surface_reference ( cairo_surface_t surface)

cairo_surface_reference: @surface: a cairo_surface_t

Increases the reference count on @surface by one. This prevents @surface from being destroyed until a matching call to cairo_surface_destroy() is made.

Use cairo_surface_get_reference_count() to get the number of references to a cairo_surface_t.

Return value: the referenced cairo_surface_t.

Since: 1.0

Definition at line 924 of file cairo-surface.c.

References _cairo_reference_count_inc, assert(), CAIRO_REFERENCE_COUNT_HAS_REFERENCE, CAIRO_REFERENCE_COUNT_IS_INVALID, NULL, _cairo_surface::ref_count, and surface.

Referenced by _cairo_analysis_surface_create(), _cairo_default_context_pop_group(), _cairo_gl_operand_copy(), _cairo_gl_subsurface_clone_operand_init(), _cairo_gstate_init(), _cairo_gstate_init_copy(), _cairo_gstate_redirect_target(), _cairo_image_surface_clone_subimage(), _cairo_image_surface_coerce_to_format(), _cairo_paginated_surface_create(), _cairo_pattern_init_copy(), _cairo_pattern_init_for_surface(), _cairo_pdf_surface_add_source_surface(), _cairo_pdf_surface_set_thumbnail_image(), _cairo_ps_surface_use_form(), _cairo_qt_surface_acquire_source_image(), _cairo_quartz_image_surface_flush(), _cairo_recording_surface_acquire_source_image(), _cairo_surface_attach_snapshot(), _cairo_surface_create_for_rectangle_int(), _cairo_surface_create_observer_internal(), _cairo_surface_snapshot(), _cairo_surface_subsurface_set_snapshot(), _cairo_surface_wrapper_init(), _cairo_xcb_black_picture(), _cairo_xcb_pixmap_copy(), _cairo_xcb_screen_lookup_linear_picture(), _cairo_xcb_screen_lookup_radial_picture(), _cairo_xcb_screen_store_linear_picture(), _cairo_xcb_screen_store_radial_picture(), _cairo_xcb_solid_picture(), _cairo_xcb_surface_acquire_source_image(), _cairo_xcb_surface_picture(), _cairo_xcb_surface_pixmap(), _cairo_xcb_transparent_picture(), _cairo_xcb_white_picture(), _emit_image_surface(), _pixman_image_for_recording(), _vg_setup_surface_source(), alpha_source(), cairo_drm_surface_map_to_image(), cairo_quartz_image_surface_create(), cairo_surface_create_for_rectangle(), cairo_surface_create_similar_clip(), cairo_surface_finish(), gallium_surface_acquire_source_image(), i965_shader_acquire_surface(), init_source(), intel_surface_acquire_source_image(), native_source(), opaque_source(), radeon_surface_acquire_source_image(), recording_pattern_get_surface(), CairoImage::setImage(), subsurface_source(), surface_source(), transparent_source(), and white_source().

◆ cairo_surface_set_device_offset()

void cairo_surface_set_device_offset ( cairo_surface_t surface,
double  x_offset,
double  y_offset 
)

cairo_surface_set_device_offset: @surface: a cairo_surface_t @x_offset: the offset in the X direction, in device units @y_offset: the offset in the Y direction, in device units

Sets an offset that is added to the device coordinates determined by the CTM when drawing to @surface. One use case for this function is when we want to create a cairo_surface_t that redirects drawing for a portion of an onscreen surface to an offscreen surface in a way that is completely invisible to the user of the cairo API. Setting a transformation via cairo_translate() isn't sufficient to do this, since functions like cairo_device_to_user() will expose the hidden offset.

Note that the offset affects drawing to the surface as well as using the surface in a source pattern.

Since: 1.0

Definition at line 1867 of file cairo-surface.c.

References _cairo_error(), _cairo_observers_notify(), _cairo_surface_begin_modification(), _cairo_surface_set_error(), assert(), cairo_matrix_invert(), CAIRO_STATUS_SUCCESS, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface::device_transform, _cairo_surface::device_transform_inverse, _cairo_surface::device_transform_observers, _cairo_surface::finished, NULL, _cairo_surface::snapshot_of, _cairo_surface::status, status, surface, unlikely, _cairo_matrix::x0, x_offset, _cairo_matrix::y0, and y_offset.

Referenced by _cairo_default_context_push_group(), _cairo_gl_surface_map_to_image(), _cairo_image_surface_clone_subimage(), _cairo_image_surface_map_to_image(), _cairo_quartz_init_glyph_surface(), _cairo_script_surface_create_internal(), _cairo_svg_surface_emit_recording_surface(), _cairo_user_scaled_glyph_init(), _cairo_win32_scaled_font_init_glyph_surface(), _cairo_xcb_surface_map_to_image(), _cairo_xlib_surface_map_to_image(), _paint_fallback_image(), _paint_thumbnail_image(), _render_glyph_bitmap(), _render_glyph_outline(), _transform_glyph_bitmap(), _vg_clone_recording_surface(), cairo_xml_for_recording_surface(), map_qimage_to_image(), and CairoOutputDev::setSoftMask().

◆ cairo_surface_set_device_scale()

void cairo_surface_set_device_scale ( cairo_surface_t surface,
double  x_scale,
double  y_scale 
)

cairo_surface_set_device_scale: @surface: a cairo_surface_t @x_scale: a scale factor in the X direction @y_scale: a scale factor in the Y direction

Sets a scale that is multiplied to the device coordinates determined by the CTM when drawing to @surface. One common use for this is to render to very high resolution display devices at a scale factor, so that code that assumes 1 pixel will be a certain size will still work. Setting a transformation via cairo_translate() isn't sufficient to do this, since functions like cairo_device_to_user() will expose the hidden scale.

Note that the scale affects drawing to the surface as well as using the surface in a source pattern.

Since: 1.14

Definition at line 1787 of file cairo-surface.c.

References _cairo_error(), _cairo_observers_notify(), _cairo_surface_begin_modification(), _cairo_surface_set_error(), assert(), cairo_matrix_invert(), CAIRO_STATUS_SUCCESS, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface::device_transform, _cairo_surface::device_transform_inverse, _cairo_surface::device_transform_observers, _cairo_surface::finished, NULL, _cairo_surface::snapshot_of, _cairo_surface::status, status, surface, unlikely, _cairo_matrix::xx, _cairo_matrix::xy, y_scale, _cairo_matrix::yx, and _cairo_matrix::yy.

Referenced by _cairo_default_context_push_group(), _cairo_surface_create_for_rectangle_int(), _paint_fallback_image(), _paint_thumbnail_image(), cairo_surface_create_for_rectangle(), and cairo_surface_create_similar().

◆ cairo_surface_set_fallback_resolution()

void cairo_surface_set_fallback_resolution ( cairo_surface_t surface,
double  x_pixels_per_inch,
double  y_pixels_per_inch 
)

cairo_surface_set_fallback_resolution: @surface: a cairo_surface_t @x_pixels_per_inch: horizontal setting for pixels per inch @y_pixels_per_inch: vertical setting for pixels per inch

Set the horizontal and vertical resolution for image fallbacks.

When certain operations aren't supported natively by a backend, cairo will fallback by rendering operations to an image and then overlaying that image onto the output. For backends that are natively vector-oriented, this function can be used to set the resolution used for these image fallbacks, (larger values will result in more detailed images, but also larger file sizes).

Some examples of natively vector-oriented backends are the ps, pdf, and svg backends.

For backends that are natively raster-oriented, image fallbacks are still possible, but they are always performed at the native device resolution. So this function has no effect on those backends.

Note: The fallback resolution only takes effect at the time of completing a page (with cairo_show_page() or cairo_copy_page()) so there is currently no way to have more than one fallback resolution in effect on a single page.

The default fallback resoultion is 300 pixels per inch in both dimensions.

Since: 1.2

Definition at line 1958 of file cairo-surface.c.

References _cairo_error(), _cairo_surface_begin_modification(), _cairo_surface_set_error(), assert(), CAIRO_STATUS_INVALID_MATRIX, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface::finished, NULL, _cairo_surface::snapshot_of, _cairo_surface::status, status, surface, unlikely, _cairo_surface::x_fallback_resolution, and _cairo_surface::y_fallback_resolution.

Referenced by _cairo_surface_copy_similar_properties(), _cairo_svg_surface_emit_recording_surface(), and beginPage().

◆ cairo_surface_set_mime_data()

cairo_status_t cairo_surface_set_mime_data ( cairo_surface_t surface,
const char *  mime_type,
const unsigned char *  data,
unsigned long  length,
cairo_destroy_func_t  destroy,
void closure 
)

CAIRO_MIME_TYPE_CCITT_FAX:

Group 3 or Group 4 CCITT facsimile encoding (International Telecommunication Union, Recommendations T.4 and T.6.)

Since: 1.16 CAIRO_MIME_TYPE_CCITT_FAX_PARAMS:

Decode parameters for Group 3 or Group 4 CCITT facsimile encoding. See [CCITT Fax Images][ccitt].

Since: 1.16 CAIRO_MIME_TYPE_EPS:

Encapsulated PostScript file. Encapsulated PostScript File Format Specification

Since: 1.16 CAIRO_MIME_TYPE_EPS_PARAMS:

Embedding parameters Encapsulated PostScript data. See [Embedding EPS files][eps].

Since: 1.16 CAIRO_MIME_TYPE_JBIG2:

Joint Bi-level Image Experts Group image coding standard (ISO/IEC 11544).

Since: 1.14 CAIRO_MIME_TYPE_JBIG2_GLOBAL:

Joint Bi-level Image Experts Group image coding standard (ISO/IEC 11544) global segment.

Since: 1.14 CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID:

An unique identifier shared by a JBIG2 global segment and all JBIG2 images that depend on the global segment.

Since: 1.14 CAIRO_MIME_TYPE_JP2:

The Joint Photographic Experts Group (JPEG) 2000 image coding standard (ISO/IEC 15444-1).

Since: 1.10 CAIRO_MIME_TYPE_JPEG:

The Joint Photographic Experts Group (JPEG) image coding standard (ISO/IEC 10918-1).

Since: 1.10 CAIRO_MIME_TYPE_PNG:

The Portable Network Graphics image file format (ISO/IEC 15948).

Since: 1.10 CAIRO_MIME_TYPE_URI:

URI for an image file (unofficial MIME type).

Since: 1.10 CAIRO_MIME_TYPE_UNIQUE_ID:

Unique identifier for a surface (cairo specific MIME type). All surfaces with the same unique identifier will only be embedded once.

Since: 1.12 cairo_surface_set_mime_data: @surface: a cairo_surface_t @mime_type: the MIME type of the image data @data: the image data to attach to the surface @length: the length of the image data @destroy: a cairo_destroy_func_t which will be called when the surface is destroyed or when new image data is attached using the same mime type. @closure: the data to be passed to the @destroy notifier

Attach an image in the format @mime_type to @surface. To remove the data from a surface, call this function with same mime type and NULL for @data.

The attached image (or filename) data can later be used by backends which support it (currently: PDF, PS, SVG and Win32 Printing surfaces) to emit this data instead of making a snapshot of the @surface. This approach tends to be faster and requires less memory and disk space.

The recognized MIME types are the following: CAIRO_MIME_TYPE_JPEG, CAIRO_MIME_TYPE_PNG, CAIRO_MIME_TYPE_JP2, CAIRO_MIME_TYPE_URI, CAIRO_MIME_TYPE_UNIQUE_ID, CAIRO_MIME_TYPE_JBIG2, CAIRO_MIME_TYPE_JBIG2_GLOBAL, CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID, CAIRO_MIME_TYPE_CCITT_FAX, CAIRO_MIME_TYPE_CCITT_FAX_PARAMS.

See corresponding backend surface docs for details about which MIME types it can handle. Caution: the associated MIME data will be discarded if you draw on the surface afterwards. Use this function with care.

Even if a backend supports a MIME type, that does not mean cairo will always be able to use the attached MIME data. For example, if the backend does not natively support the compositing operation used to apply the MIME data to the backend. In that case, the MIME data will be ignored. Therefore, to apply an image in all cases, it is best to create an image surface which contains the decoded image data and then attach the MIME data to that. This ensures the image will always be used while still allowing the MIME data to be used whenever possible.

Return value: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data.

Since: 1.10

Definition at line 1415 of file cairo-surface.c.

References _cairo_error(), _cairo_intern_string(), _cairo_malloc, _cairo_mime_data_destroy(), _cairo_surface_set_error(), _cairo_user_data_array_set_data(), CAIRO_REFERENCE_COUNT_HAS_REFERENCE, CAIRO_REFERENCE_COUNT_INIT, CAIRO_REFERENCE_COUNT_IS_INVALID, CAIRO_STATUS_NO_MEMORY, CAIRO_STATUS_SUCCESS, CAIRO_STATUS_SURFACE_FINISHED, _cairo_mime_data::closure, data, _cairo_mime_data::data, _cairo_mime_data::destroy, FALSE, _cairo_surface::finished, free, _cairo_surface::is_clear, length, _cairo_mime_data::length, _cairo_surface::mime_data, NULL, _cairo_surface::ref_count, _cairo_mime_data::ref_count, _cairo_surface::status, status, surface, and unlikely.

Referenced by read_png(), CairoOutputDev::setMimeData(), CairoOutputDev::setMimeDataForCCITTParams(), CairoOutputDev::setMimeDataForJBIG2Globals(), and setMimeIdFromRef().

◆ cairo_surface_set_user_data()

cairo_status_t cairo_surface_set_user_data ( cairo_surface_t surface,
const cairo_user_data_key_t key,
void user_data,
cairo_destroy_func_t  destroy 
)

cairo_surface_set_user_data: @surface: a cairo_surface_t @key: the address of a cairo_user_data_key_t to attach the user data to @user_data: the user data to attach to the surface @destroy: a cairo_destroy_func_t which will be called when the surface is destroyed or when new user data is attached using the same key.

Attach user data to @surface. To remove user data from a surface, call this function with the key that was used to set it and NULL for @data.

Return value: CAIRO_STATUS_SUCCESS or CAIRO_STATUS_NO_MEMORY if a slot could not be allocated for the user data.

Since: 1.0

Definition at line 1150 of file cairo-surface.c.

References _cairo_error(), _cairo_user_data_array_set_data(), CAIRO_REFERENCE_COUNT_HAS_REFERENCE, CAIRO_REFERENCE_COUNT_IS_INVALID, CAIRO_STATUS_SURFACE_FINISHED, key, _cairo_surface::ref_count, _cairo_surface::status, surface, and _cairo_surface::user_data.

◆ cairo_surface_show_page()

void cairo_surface_show_page ( cairo_surface_t surface)

cairo_surface_show_page: @surface: a #cairo_Surface_t

Emits and clears the current page for backends that support multiple pages. Use cairo_surface_copy_page() if you don't want to clear the page.

There is a convenience function for this that takes a cairo_t, namely cairo_show_page().

Since: 1.6

Definition at line 2482 of file cairo-surface.c.

References _cairo_surface_begin_modification(), _cairo_surface_set_error(), _cairo_surface::backend, CAIRO_STATUS_SURFACE_FINISHED, _cairo_surface::finished, NULL, _cairo_surface_backend::show_page, _cairo_surface::status, status, surface, and unlikely.

Referenced by _cairo_gstate_show_page(), _cairo_paginated_surface_copy_page(), _cairo_paginated_surface_show_page(), _cairo_svg_surface_emit_recording_surface(), and endPage().

◆ cairo_surface_status()

◆ cairo_surface_supports_mime_type()

cairo_bool_t cairo_surface_supports_mime_type ( cairo_surface_t surface,
const char *  mime_type 
)

cairo_surface_supports_mime_type: @surface: a cairo_surface_t @mime_type: the mime type

Return whether @surface supports @mime_type.

Return value: TRUE if @surface supports @mime_type, FALSE otherwise

Since: 1.12

Definition at line 1483 of file cairo-surface.c.

References _cairo_error(), _cairo_surface_set_error(), _cairo_surface::backend, CAIRO_STATUS_SURFACE_FINISHED, FALSE, _cairo_surface::finished, _cairo_surface_backend::get_supported_mime_types, _cairo_surface::status, strcmp(), surface, TRUE, types, and unlikely.

◆ cairo_surface_unmap_image()

void cairo_surface_unmap_image ( cairo_surface_t surface,
cairo_surface_t image 
)

cairo_surface_unmap_image: @surface: the surface passed to cairo_surface_map_to_image(). the currently mapped image

Unmaps the image surface as returned from cairo_surface_map_to_image().

The content of the image will be uploaded to the target surface. Afterwards, the image is destroyed.

Using an image surface which wasn't returned by cairo_surface_map_to_image() results in undefined behavior.

Since: 1.12

Definition at line 824 of file cairo-surface.c.

References _cairo_error(), _cairo_surface_is_image(), _cairo_surface_set_error(), _cairo_surface_unmap_image(), CAIRO_STATUS_SUCCESS, CAIRO_STATUS_SURFACE_FINISHED, CAIRO_STATUS_SURFACE_TYPE_MISMATCH, cairo_surface_destroy(), cairo_surface_finish(), error, _cairo_surface::finished, _cairo_surface::status, status, surface, and unlikely.

Referenced by _compute_mask().

◆ composite_color_glyphs()

◆ composite_one_color_glyph()

◆ ensure_scaled_glyph()

◆ nothing_to_do()

Variable Documentation

◆ _cairo_surface_image_mime_types

const char* _cairo_surface_image_mime_types[]
static
Initial value:
= {
"image/jpeg" ,
"image/png" ,
"image/jp2" ,
"application/x-cairo.jbig2" ,
"image/g3fax" ,
}

Definition at line 1228 of file cairo-surface.c.

Referenced by _cairo_surface_has_mime_image().

◆ _cairo_surface_nil

const cairo_surface_t _cairo_surface_nil = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_NO_MEMORY , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

◆ _cairo_surface_nil_device_error

const cairo_surface_t _cairo_surface_nil_device_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_DEVICE_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 155 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_device_type_mismatch

const cairo_surface_t _cairo_surface_nil_device_type_mismatch = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_DEVICE_TYPE_MISMATCH , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 154 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_file_not_found

const cairo_surface_t _cairo_surface_nil_file_not_found = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_FILE_NOT_FOUND , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 148 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_invalid_content

const cairo_surface_t _cairo_surface_nil_invalid_content = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_CONTENT , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 145 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_invalid_format

const cairo_surface_t _cairo_surface_nil_invalid_format = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_FORMAT , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 146 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_invalid_size

const cairo_surface_t _cairo_surface_nil_invalid_size = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_SIZE , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 153 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_invalid_status

const cairo_surface_t _cairo_surface_nil_invalid_status = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_STATUS , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 144 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_invalid_stride

const cairo_surface_t _cairo_surface_nil_invalid_stride = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_STRIDE , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 152 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_invalid_visual

const cairo_surface_t _cairo_surface_nil_invalid_visual = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_INVALID_VISUAL , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 147 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_nothing_to_do

const cairo_surface_t _cairo_surface_nil_nothing_to_do = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_INT_STATUS_NOTHING_TO_DO , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 158 of file cairo-surface.c.

Referenced by _cairo_int_surface_create_in_error().

◆ _cairo_surface_nil_read_error

const cairo_surface_t _cairo_surface_nil_read_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_READ_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 150 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_surface_type_mismatch

const cairo_surface_t _cairo_surface_nil_surface_type_mismatch = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_SURFACE_TYPE_MISMATCH , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 143 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_temp_file_error

const cairo_surface_t _cairo_surface_nil_temp_file_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_TEMP_FILE_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 149 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().

◆ _cairo_surface_nil_unsupported

const cairo_surface_t _cairo_surface_nil_unsupported = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_INT_STATUS_UNSUPPORTED , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 157 of file cairo-surface.c.

Referenced by _cairo_int_surface_create_in_error().

◆ _cairo_surface_nil_write_error

const cairo_surface_t _cairo_surface_nil_write_error = { NULL, NULL, CAIRO_SURFACE_TYPE_IMAGE, CAIRO_CONTENT_COLOR, { ((cairo_atomic_int_t) -1) } , CAIRO_STATUS_WRITE_ERROR , 0, 0, NULL, 0 , 0 , 1 , 0 , 0 , 0 , { 0, 0, 0, NULL, }, { 0, 0, 0, NULL, }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0 }, { NULL, NULL }, 0.0, 0.0, 0.0, 0.0, NULL, NULL, { NULL, NULL }, { NULL, NULL }, { CAIRO_ANTIALIAS_DEFAULT, CAIRO_SUBPIXEL_ORDER_DEFAULT, CAIRO_LCD_FILTER_DEFAULT, CAIRO_HINT_STYLE_DEFAULT, CAIRO_HINT_METRICS_DEFAULT, CAIRO_ROUND_GLYPH_POS_DEFAULT } }
static

Definition at line 151 of file cairo-surface.c.

Referenced by _cairo_surface_create_in_error().