summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Johnson <ajohnson@redneon.com>2010-11-26 23:52:45 +1030
committerAdrian Johnson <ajohnson@redneon.com>2011-05-22 20:27:33 +0930
commit3f5aaf6baaac2766bef57367470777df62c60946 (patch)
tree07411dd50255e7609f10f997e6728c376bf10ba3
parente2c558c435b8c8f9a9057b466020e93d7d61fd70 (diff)
downloadcairo-3f5aaf6baaac2766bef57367470777df62c60946.tar.gz
PS: Use tight bounding box
Now that the page size is specified by %%DocumentMedia we can make %%BoundingBox compliant.
-rw-r--r--src/cairo-ps-surface.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 4ae1aeede..5ca6a0582 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3779,17 +3779,10 @@ _cairo_ps_surface_set_bounding_box (void *abstract_surface,
cairo_bool_t has_page_media;
const char *page_media;
- 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);
- }
+ 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));
surface->page_bbox.x = x1;
surface->page_bbox.y = y1;