summaryrefslogtreecommitdiffstats
path: root/src/sp-root.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-25 19:16:02 +0000
committerKrzysztof Kosinski <tweenk.pl@gmail.com>2011-08-25 19:16:02 +0000
commit093f4174abc07b4ea523617fccdd8028f2670fea (patch)
tree5aba6cd030bc6b0dbb59ec48e32a0b0364b516bd /src/sp-root.cpp
parentGerman translation update (diff)
parentReduce default rendering cache size to 64 MiB (diff)
downloadinkscape-093f4174abc07b4ea523617fccdd8028f2670fea.tar.gz
inkscape-093f4174abc07b4ea523617fccdd8028f2670fea.zip
Merge rendering cache branch (GSoC 2011)
(bzr r10579)
Diffstat (limited to 'src/sp-root.cpp')
-rw-r--r--src/sp-root.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/sp-root.cpp b/src/sp-root.cpp
index 918bd3295..a6df580d3 100644
--- a/src/sp-root.cpp
+++ b/src/sp-root.cpp
@@ -22,7 +22,7 @@
#include <2geom/transforms.h>
#include "svg/svg.h"
-#include "display/nr-arena-group.h"
+#include "display/drawing-group.h"
#include "attributes.h"
#include "print.h"
#include "document.h"
@@ -46,7 +46,7 @@ static void sp_root_update(SPObject *object, SPCtx *ctx, guint flags);
static void sp_root_modified(SPObject *object, guint flags);
static Inkscape::XML::Node *sp_root_write(SPObject *object, Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, guint flags);
-static NRArenaItem *sp_root_show(SPItem *item, NRArena *arena, unsigned int key, unsigned int flags);
+static Inkscape::DrawingItem *sp_root_show(SPItem *item, Inkscape::Drawing &drawing, unsigned int key, unsigned int flags);
static void sp_root_print(SPItem *item, SPPrintContext *ctx);
static SPGroupClass *parent_class;
@@ -538,9 +538,10 @@ static void sp_root_update(SPObject *object, SPCtx *ctx, guint flags)
if (((SPObjectClass *) (parent_class))->update)
((SPObjectClass *) (parent_class))->update(object, (SPCtx *) &rctx, flags);
- /* As last step set additional transform of arena group */
+ /* As last step set additional transform of drawing group */
for (SPItemView *v = root->display; v != NULL; v = v->next) {
- nr_arena_group_set_child_transform(NR_ARENA_GROUP(v->arenaitem), root->c2p);
+ Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(v->arenaitem);
+ g->setChildTransform(root->c2p);
}
}
@@ -607,18 +608,19 @@ sp_root_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML:
}
/**
- * Displays the SPRoot item on the NRArena.
+ * Displays the SPRoot item on the drawing.
*/
-static NRArenaItem *
-sp_root_show(SPItem *item, NRArena *arena, unsigned int key, unsigned int flags)
+static Inkscape::DrawingItem *
+sp_root_show(SPItem *item, Inkscape::Drawing &drawing, unsigned int key, unsigned int flags)
{
SPRoot *root = SP_ROOT(item);
- NRArenaItem *ai;
+ Inkscape::DrawingItem *ai;
if (((SPItemClass *) (parent_class))->show) {
- ai = ((SPItemClass *) (parent_class))->show(item, arena, key, flags);
+ ai = ((SPItemClass *) (parent_class))->show(item, drawing, key, flags);
if (ai) {
- nr_arena_group_set_child_transform(NR_ARENA_GROUP(ai), root->c2p);
+ Inkscape::DrawingGroup *g = dynamic_cast<Inkscape::DrawingGroup *>(ai);
+ g->setChildTransform(root->c2p);
}
} else {
ai = NULL;