[cairo-commit] src/cairo-ps-surface.c

Carl Worth cworth at kemper.freedesktop.org
Wed May 3 11:15:11 PDT 2006


 src/cairo-ps-surface.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

New commits:
diff-tree a4fc0c2e2c9ce52750f43dabc2be5daeb8aee9c4 (from e91b2c87ccf75e1c4935f1593dfdd10b1992de34)
Author: Carl Worth <cworth at cworth.org>
Date:   Wed May 3 11:10:24 2006 -0700

    PS: Use ceil, not rounding when computing integers for BoundingBox

diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 1099aca..f24e633 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -190,8 +190,8 @@ _cairo_ps_surface_emit_header (cairo_ps_
 				 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 *abst
     _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",


More information about the cairo-commit mailing list