Skip to content

Commit

Permalink
Bug 1774631 - Fix typo in cairo-pdf-surface.c that causes us to get s…
Browse files Browse the repository at this point in the history
…puriously-rasterized PDF output. r=jrmuizel

There's a typo in the condition here, which results in returning CAIRO_INT_STATUS_UNSUPPORTED
in cases where that shouldn't be necessary. Fixing this gets me nice vector PDF output.

The bug is still present in upstream cairo trunk, so I'll report it there as well.

Differential Revision: https://phabricator.services.mozilla.com/D150381
  • Loading branch information
jfkthame committed Jun 27, 2022
1 parent 7366e6c commit 4d877eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gfx/cairo/cairo/src/cairo-pdf-surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -7560,7 +7560,7 @@ _cairo_pdf_surface_analyze_operation (cairo_pdf_surface_t *surface,
if (_cairo_surface_get_extents (surface_pattern->surface, &rec_extents)) {
if (_cairo_fixed_integer_ceil(box.p1.x) < rec_extents.x ||
_cairo_fixed_integer_ceil(box.p1.y) < rec_extents.y ||
_cairo_fixed_integer_floor(box.p2.y) > rec_extents.x + rec_extents.width ||
_cairo_fixed_integer_floor(box.p2.x) > rec_extents.x + rec_extents.width ||
_cairo_fixed_integer_floor(box.p2.y) > rec_extents.y + rec_extents.height)
{
return CAIRO_INT_STATUS_UNSUPPORTED;
Expand Down

0 comments on commit 4d877eb

Please sign in to comment.