summaryrefslogtreecommitdiffstats
path: root/src/sp-use.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-05-14 02:52:57 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-05-14 02:52:57 +0000
commitc45d93910cac2bf442b7d4f7f47e6dc6567b6f60 (patch)
treef164b34fef156630b2407c8a7e6d9b262c71acfe /src/sp-use.cpp
parentstatusbar tip expanded (diff)
downloadinkscape-c45d93910cac2bf442b7d4f7f47e6dc6567b6f60.tar.gz
inkscape-c45d93910cac2bf442b7d4f7f47e6dc6567b6f60.zip
patch for bug 1458643 by Andreas Burman
(bzr r829)
Diffstat (limited to 'src/sp-use.cpp')
-rw-r--r--src/sp-use.cpp13
1 files changed, 13 insertions, 0 deletions
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 *