diff options
author | Carl Worth <cworth@cworth.org> | 2006-04-18 23:31:16 -0700 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2006-04-18 23:31:53 -0700 |
commit | ab2546009ff246bd0e7bbc07437330cf307e00f7 (patch) | |
tree | aaf58e47ac30020758e2d5d372a37cc9fc9f950f /src | |
parent | 241c6480cd9a5f63ea67f8cb1407f22503697ca3 (diff) |
Use fallbacks in PDF backend for CAIRO_ANTIALIAS_NONE.
Perhaps there's a way to preserve that hint in PDF output, but until
we have code that actually does that, the correct thing to do is to
call it unsupported and let the fallbacks do their thing.
With this commit, the two regressions that were recently introduced
now pass again. Specifically:
rectangle-rounding-error
unantialiased-shapes
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-pdf-surface.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/cairo-pdf-surface.c b/src/cairo-pdf-surface.c index 027e2cb17..64b564180 100644 --- a/src/cairo-pdf-surface.c +++ b/src/cairo-pdf-surface.c @@ -2232,8 +2232,14 @@ _cairo_pdf_surface_stroke (void *abstract_surface, cairo_pdf_document_t *document = surface->document; cairo_status_t status; - if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) + if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { + /* XXX: Does PDF provide a way we can preserve this hint? For now, + * this will trigger a fallback. */ + if (antialias == CAIRO_ANTIALIAS_NONE) + return CAIRO_INT_STATUS_UNSUPPORTED; + return _analyze_operation (surface, op, source); + } assert (_operation_supported (surface, op, source)); @@ -2280,8 +2286,14 @@ _cairo_pdf_surface_fill (void *abstract_surface, const char *pdf_operator; cairo_status_t status; - if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) + if (surface->paginated_mode == CAIRO_PAGINATED_MODE_ANALYZE) { + /* XXX: Does PDF provide a way we can preserve this hint? For now, + * this will trigger a fallback. */ + if (antialias == CAIRO_ANTIALIAS_NONE) + return CAIRO_INT_STATUS_UNSUPPORTED; + return _analyze_operation (surface, op, source); + } assert (_operation_supported (surface, op, source)); |