diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2012-01-18 22:13:10 +1030 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2012-01-19 19:09:10 +1030 |
commit | 0f40cdea1bdeedc730dde7814cdf056a12efb2cc (patch) | |
tree | 7ca829f6e627eef8247d662723248ad3ea48e72f /src/cairo-pdf-surface.c | |
parent | a7c9c75ffae2e17288d131eac7e719c72fcd30b0 (diff) |
api: add cairo_surface_supports_mime_type
to allow querying if a surface supports a particular mime type.
Diffstat (limited to 'src/cairo-pdf-surface.c')
-rw-r--r-- | src/cairo-pdf-surface.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 148e6ff77..cf8aab446 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -157,6 +157,14 @@ static const char * _cairo_pdf_version_strings[CAIRO_PDF_VERSION_LAST] = "PDF 1.5" }; +static const char *_cairo_pdf_supported_mime_types[] = +{ + CAIRO_MIME_TYPE_JPEG, + CAIRO_MIME_TYPE_JP2, + CAIRO_MIME_TYPE_UNIQUE_ID, + NULL +}; + typedef struct _cairo_pdf_object { long offset; } cairo_pdf_object_t; @@ -7240,6 +7248,11 @@ cleanup: return status; } +static const char ** +_cairo_pdf_surface_get_supported_mime_types (void *abstract_surface) +{ + return _cairo_pdf_supported_mime_types; +} static void _cairo_pdf_surface_set_paginated_mode (void *abstract_surface, @@ -7283,6 +7296,7 @@ static const cairo_surface_backend_t cairo_pdf_surface_backend = { NULL, /* show_glyphs */ _cairo_pdf_surface_has_show_text_glyphs, _cairo_pdf_surface_show_text_glyphs, + _cairo_pdf_surface_get_supported_mime_types, }; static const cairo_paginated_surface_backend_t |