diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-09 12:49:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-04-09 12:49:20 +0100 |
commit | 7cb5053c0694992320b5f7ea3b91ea497431813b (patch) | |
tree | c7b29d0c098db0ef2607398d4f2cd43a9716de99 | |
parent | de61681574eb7d6e0e497ea7f25797e3d9b20ac4 (diff) |
analysis: Apply the integer translation to the bbox as well
The bbox is used to compute the ink extents (and so the pattern extents
of a recording surface) and if given an integer translation we failed to
transform the bbox into the target space.
Fixes mask (pdf).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/cairo-analysis-surface.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c index b8abe02c..8878f62b 100644 --- a/src/cairo-analysis-surface.c +++ b/src/cairo-analysis-surface.c @@ -220,6 +220,14 @@ _add_operation (cairo_analysis_surface_t *surface, if (_cairo_matrix_is_integer_translation (&surface->ctm, &tx, &ty)) { rect->x += tx; rect->y += ty; + + tx = _cairo_fixed_from_int (tx); + bbox.p1.x += tx; + bbox.p2.x += tx; + + ty = _cairo_fixed_from_int (ty); + bbox.p1.y += ty; + bbox.p2.y += ty; } else { _cairo_matrix_transform_bounding_box_fixed (&surface->ctm, &bbox, NULL); |