[cairo-commit] src/cairo-pattern.c
Adrian Johnson
ajohnson at kemper.freedesktop.org
Fri Apr 6 04:55:48 PDT 2012
src/cairo-pattern.c | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 8657ca10e34b0034602680b4304d47ecf90ccbfd
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Fri Apr 6 21:20:40 2012 +0930
fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
It had caused pdf bbox sizes to regress to page size bboxes.
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 27ba004..5b3e177 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;
More information about the cairo-commit
mailing list