From a4fc0c2e2c9ce52750f43dabc2be5daeb8aee9c4 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 3 May 2006 11:10:24 -0700 Subject: [PATCH] PS: Use ceil, not rounding when computing integers for BoundingBox --- src/cairo-ps-surface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c index 1099aca31..f24e6336b 100644 --- a/src/cairo-ps-surface.c +++ b/src/cairo-ps-surface.c @@ -190,8 +190,8 @@ _cairo_ps_surface_emit_header (cairo_ps_surface_t *surface) ctime (&now), surface->num_pages, 0, 0, - (int) (surface->max_width + 0.5), - (int) (surface->max_height + 0.5)); + (int) ceil (surface->max_width), + (int) ceil (surface->max_height)); _cairo_output_stream_printf (surface->final_stream, "%%%%DocumentData: Clean7Bit\n" @@ -1190,8 +1190,8 @@ _cairo_ps_surface_start_page (void *abstract_surface) _cairo_output_stream_printf (surface->stream, "%%%%PageBoundingBox: %d %d %d %d\n", 0, 0, - (int) (surface->width + 0.5), - (int) (surface->height + 0.5)); + (int) ceil (surface->width), + (int) ceil (surface->height)); _cairo_output_stream_printf (surface->stream, "gsave %f %f translate %f %f scale \n",