diff options
author | Adrian Johnson <ajohnson@redneon.com> | 2012-04-06 21:20:40 +0930 |
---|---|---|
committer | Adrian Johnson <ajohnson@redneon.com> | 2012-04-06 21:24:22 +0930 |
commit | 8657ca10e34b0034602680b4304d47ecf90ccbfd (patch) | |
tree | de8b243b166443783ec90ca064cf68ce761faec9 /src/cairo-pattern.c | |
parent | 8886220b5027296f5b3b95e9c2f93509108d3b9e (diff) | |
download | cairo-8657ca10e34b0034602680b4304d47ecf90ccbfd.tar.gz |
fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
It had caused pdf bbox sizes to regress to page size bboxes.
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r-- | src/cairo-pattern.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c index 27ba0047c..5b3e17747 100644 --- a/src/cairo-pattern.c +++ b/src/cairo-pattern.c @@ -37,6 +37,7 @@ #include "cairo-path-private.h" #include "cairo-pattern-private.h" #include "cairo-recording-surface-private.h" +#include "cairo-surface-snapshot-private.h" #include <float.h> @@ -3666,6 +3667,9 @@ _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern, (const cairo_surface_pattern_t *) pattern; cairo_surface_t *surface = surface_pattern->surface; + if (_cairo_surface_is_snapshot (surface)) + surface = _cairo_surface_snapshot_get_target (surface); + if (_cairo_surface_is_recording (surface)) { cairo_matrix_t imatrix; cairo_box_t box; |