summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2011-05-22 21:08:12 +0930
committerAdrian Johnson <ajohnson@redneon.com>2011-05-22 21:08:12 +0930
commit54d00c237fadc9c6098a009ccb8ecb1e996610f4 (patch)
tree1028544f02d45159434faff4bb63ff988db06979
parent3f5aaf6baaac2766bef57367470777df62c60946 (diff)
downloadcairo-54d00c237fadc9c6098a009ccb8ecb1e996610f4.tar.gz
Revert "PS: Use tight bounding box"
3f5aaf6b was not meant to be committed to the 1.10 branch. This reverts commit 3f5aaf6baaac2766bef57367470777df62c60946.
-rw-r--r--src/cairo-ps-surface.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 5ca6a0582..4ae1aeede 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3779,10 +3779,17 @@ _cairo_ps_surface_set_bounding_box (void *abstract_surface,
cairo_bool_t has_page_media;
const char *page_media;
- x1 = floor (_cairo_fixed_to_double (bbox->p1.x));
- y1 = floor (surface->height - _cairo_fixed_to_double (bbox->p2.y));
- x2 = ceil (_cairo_fixed_to_double (bbox->p2.x));
- y2 = ceil (surface->height - _cairo_fixed_to_double (bbox->p1.y));
+ if (surface->eps) {
+ x1 = floor (_cairo_fixed_to_double (bbox->p1.x));
+ y1 = floor (surface->height - _cairo_fixed_to_double (bbox->p2.y));
+ x2 = ceil (_cairo_fixed_to_double (bbox->p2.x));
+ y2 = ceil (surface->height - _cairo_fixed_to_double (bbox->p1.y));
+ } else {
+ x1 = 0;
+ y1 = 0;
+ x2 = ceil (surface->width);
+ y2 = ceil (surface->height);
+ }
surface->page_bbox.x = x1;
surface->page_bbox.y = y1;