From: Johan Engelen Date: Tue, 26 Oct 2010 20:22:51 +0000 (+0200) Subject: Add code to fix bug #380501 in the future... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7d7fde471fb44d408fba883c950b9ca61671b1c2;p=inkscape.git Add code to fix bug #380501 in the future... --- 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