summaryrefslogtreecommitdiffstats
path: root/src/ui/cache/svg_preview_cache.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2011-08-07 10:53:12 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2011-08-07 10:53:12 +0000
commit75976ea07dba9b97186667524d0a76603de416af (patch)
tree4cb68dabb3cb7d5219e6ed6b660f0ded13fc25d3 /src/ui/cache/svg_preview_cache.cpp
parentFix compilation (oops). (diff)
downloadinkscape-75976ea07dba9b97186667524d0a76603de416af.tar.gz
inkscape-75976ea07dba9b97186667524d0a76603de416af.zip
Rewrite NRArena -> Inkscape::Drawing. Call render and update
methods on the Drawing rather than on the root DrawingItem. (bzr r10347.1.25)
Diffstat (limited to 'src/ui/cache/svg_preview_cache.cpp')
-rw-r--r--src/ui/cache/svg_preview_cache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ui/cache/svg_preview_cache.cpp b/src/ui/cache/svg_preview_cache.cpp
index ae5355c58..912bc1a40 100644
--- a/src/ui/cache/svg_preview_cache.cpp
+++ b/src/ui/cache/svg_preview_cache.cpp
@@ -30,18 +30,18 @@
#include "display/cairo-utils.h"
#include "display/drawing-context.h"
#include "display/drawing-item.h"
-#include "display/nr-arena.h"
+#include "display/drawing.h"
#include "ui/cache/svg_preview_cache.h"
-GdkPixbuf* render_pixbuf(Inkscape::DrawingItem* root, double scale_factor, const Geom::Rect& dbox, unsigned psize)
+GdkPixbuf* render_pixbuf(Inkscape::Drawing &drawing, double scale_factor, const Geom::Rect& dbox, unsigned psize)
{
Geom::Affine t(Geom::Scale(scale_factor, scale_factor));
- root->setTransform(Geom::Scale(scale_factor));
+ drawing.root()->setTransform(Geom::Scale(scale_factor));
Geom::IntRect ibox = (dbox * Geom::Scale(scale_factor)).roundOutwards();
- root->update(ibox);
+ drawing.update(ibox);
/* Find visible area */
int width = ibox.width();
@@ -59,7 +59,7 @@ GdkPixbuf* render_pixbuf(Inkscape::DrawingItem* root, double scale_factor, const
CAIRO_FORMAT_ARGB32, psize, psize);
Inkscape::DrawingContext ct(s, area.min());
- root->render(ct, area, Inkscape::DrawingItem::RENDER_BYPASS_CACHE);
+ drawing.render(ct, area, Inkscape::DrawingItem::RENDER_BYPASS_CACHE);
cairo_surface_flush(s);
GdkPixbuf* pixbuf = gdk_pixbuf_new_from_data(cairo_image_surface_get_data(s),