summaryrefslogtreecommitdiffstats
path: root/src/sp-root.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2015-03-18 18:07:14 +0000
committerJabiertxof <jtx@jtx.marker.es>2015-03-18 18:07:14 +0000
commite77956b4dbd029c9f6949f81fe083606f995c624 (patch)
tree74adda4df8986d65f70efb341c6235277361fd35 /src/sp-root.cpp
parentupdated code to work on 0.92 code (diff)
parentLatvian translation update (diff)
downloadinkscape-e77956b4dbd029c9f6949f81fe083606f995c624.tar.gz
inkscape-e77956b4dbd029c9f6949f81fe083606f995c624.zip
update to trunk
(bzr r12588.1.39)
Diffstat (limited to 'src/sp-root.cpp')
-rw-r--r--src/sp-root.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index 12570e03e..8bedec0a5 100644
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
@@ -13,10 +13,6 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include <string>
#include <2geom/transforms.h>
@@ -30,17 +26,7 @@
#include "svg/stringstream.h"
#include "svg/svg.h"
#include "xml/repr.h"
-
-#include "sp-factory.h"
-
-namespace {
-SPObject *createRoot()
-{
- return new SPRoot();
-}
-
-bool rootRegistered = SPFactory::instance().registerObject("svg:svg", createRoot);
-}
+#include "util/units.h"
SPRoot::SPRoot() : SPGroup(), SPViewBox()
{
@@ -298,7 +284,7 @@ void SPRoot::update(SPCtx *ctx, guint flags)
SPItemCtx rctx = *ictx;
rctx.viewport = Geom::Rect::from_xywh( this->x.computed, this->y.computed,
this->width.computed, this->height.computed );
- rctx = get_rctx( &rctx );
+ rctx = get_rctx( &rctx, Inkscape::Util::Quantity::convert(1, this->document->getDisplayUnit(), "px") );
/* And invoke parent method */
SPGroup::update((SPCtx *) &rctx, flags);
@@ -375,6 +361,15 @@ Inkscape::DrawingItem *SPRoot::show(Inkscape::Drawing &drawing, unsigned int key
g->setChildTransform(this->c2p);
}
+ // Uncomment to print out XML tree
+ // getRepr()->recursivePrintTree(0);
+
+ // Uncomment to print out SP Object tree
+ // recursivePrintTree(0);
+
+ // Uncomment to print out Display Item tree
+ // ai->recursivePrintTree(0);
+
return ai;
}