From 7d7fde471fb44d408fba883c950b9ca61671b1c2 Mon Sep 17 00:00:00 2001 From: Johan Engelen Date: Tue, 26 Oct 2010 22:22:51 +0200 Subject: [PATCH] Add code to fix bug #380501 in the future... --- src/extension/internal/cairo-render-context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index 066324ebf..9cb2b8a0b 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -796,6 +796,13 @@ CairoRenderContext::setupSurface(double width, double height) #if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 5, 2)) cairo_ps_surface_restrict_to_level(surface, (cairo_ps_level_t)_ps_level); cairo_ps_surface_set_eps(surface, (cairo_bool_t) _eps); +#endif + // Cairo calculates the bounding box itself, however we want to override this. See Launchpad bug #380501 +#if (CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)) + if (override_bbox) { + cairo_ps_dsc_comment(surface, "%%BoundingBox: 100 100 200 200"); + cairo_ps_dsc_comment(surface, "%%PageBoundingBox: 100 100 200 200"); + } #endif break; #endif -- 2.30.2