summaryrefslogtreecommitdiff
path: root/src/cairo-pattern.c
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2016-06-04 14:43:43 +0930
committerAdrian Johnson <ajohnson@redneon.com>2016-06-05 20:43:36 +0930
commita736fd8699e0ebcdd98392acb8383ea414688caf (patch)
tree6504e48c57df95103f89d2f40ce4821500e07942 /src/cairo-pattern.c
parent1e07ced66d26475e6631df9ffa2a15709104bd8f (diff)
downloadcairo-a736fd8699e0ebcdd98392acb8383ea414688caf.tar.gz
Fix PDF record-neg-extents test failure
Modify PDF surface to allow surface extents to have negative x, y. When emitting recording surfaces, set the surface extents to the recording extents.
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r--src/cairo-pattern.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index b4bc83c0e..9cb89e99f 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -4607,7 +4607,36 @@ static void
_cairo_debug_print_surface_pattern (FILE *file,
const cairo_surface_pattern_t *pattern)
{
- printf (" surface type: %d\n", pattern->surface->type);
+ const char *s;
+ switch (pattern->surface->type) {
+ case CAIRO_SURFACE_TYPE_IMAGE: s = "image"; break;
+ case CAIRO_SURFACE_TYPE_PDF: s = "pdf"; break;
+ case CAIRO_SURFACE_TYPE_PS: s = "ps"; break;
+ case CAIRO_SURFACE_TYPE_XLIB: s = "xlib"; break;
+ case CAIRO_SURFACE_TYPE_XCB: s = "xcb"; break;
+ case CAIRO_SURFACE_TYPE_GLITZ: s = "glitz"; break;
+ case CAIRO_SURFACE_TYPE_QUARTZ: s = "quartz"; break;
+ case CAIRO_SURFACE_TYPE_WIN32: s = "win32"; break;
+ case CAIRO_SURFACE_TYPE_BEOS: s = "beos"; break;
+ case CAIRO_SURFACE_TYPE_DIRECTFB: s = "directfb"; break;
+ case CAIRO_SURFACE_TYPE_SVG: s = "svg"; break;
+ case CAIRO_SURFACE_TYPE_OS2: s = "os2"; break;
+ case CAIRO_SURFACE_TYPE_WIN32_PRINTING: s = "win32_printing"; break;
+ case CAIRO_SURFACE_TYPE_QUARTZ_IMAGE: s = "quartz_image"; break;
+ case CAIRO_SURFACE_TYPE_SCRIPT: s = "script"; break;
+ case CAIRO_SURFACE_TYPE_QT: s = "qt"; break;
+ case CAIRO_SURFACE_TYPE_RECORDING: s = "recording"; break;
+ case CAIRO_SURFACE_TYPE_VG: s = "vg"; break;
+ case CAIRO_SURFACE_TYPE_GL: s = "gl"; break;
+ case CAIRO_SURFACE_TYPE_DRM: s = "drm"; break;
+ case CAIRO_SURFACE_TYPE_TEE: s = "tee"; break;
+ case CAIRO_SURFACE_TYPE_XML: s = "xml"; break;
+ case CAIRO_SURFACE_TYPE_SKIA: s = "skia"; break;
+ case CAIRO_SURFACE_TYPE_SUBSURFACE: s = "subsurface"; break;
+ case CAIRO_SURFACE_TYPE_COGL: s = "cogl"; break;
+ default: s = "invalid"; ASSERT_NOT_REACHED; break;
+ }
+ fprintf (file, " surface type: %s\n", s);
}
static void