mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-07 01:38:38 +02:00
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
This commit is contained in:
parent
241c6480cd
commit
ab2546009f
1 changed files with 14 additions and 2 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue