From c45d93910cac2bf442b7d4f7f47e6dc6567b6f60 Mon Sep 17 00:00:00 2001 From: bulia byak Date: Sun, 14 May 2006 02:52:57 +0000 Subject: patch for bug 1458643 by Andreas Burman (bzr r829) --- src/sp-use.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/sp-use.cpp') 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 * -- cgit v1.2.3