From: buliabyak Date: Sun, 14 May 2006 02:52:57 +0000 (+0000) Subject: patch for bug 1458643 by Andreas Burman X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=98e6c240d2397eaa2ca38f4b393b6a3a3d96272b;p=inkscape.git patch for bug 1458643 by Andreas Burman --- diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 52f8f11e4..31bee3717 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -26,6 +26,7 @@ #include "sp-object-repr.h" #include "sp-flowregion.h" #include "uri.h" +#include "print.h" #include "xml/repr.h" #include "prefs-utils.h" #include "style.h" @@ -279,11 +280,23 @@ sp_use_bbox(SPItem const *item, NRRect *bbox, NR::Matrix const &transform, unsig static void sp_use_print(SPItem *item, SPPrintContext *ctx) { + bool translated = false; + NRMatrix tp; SPUse *use = SP_USE(item); + if ((use->x._set && use->x.computed != 0) || (use->y._set && use->y.computed != 0)) { + nr_matrix_set_translate(&tp, use->x.computed, use->y.computed); + sp_print_bind(ctx, &tp, 1.0); + translated = true; + } + if (use->child && SP_IS_ITEM(use->child)) { sp_item_invoke_print(SP_ITEM(use->child), ctx); } + + if (translated) { + sp_print_release(ctx); + } } static gchar *