diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2011-08-07 10:53:12 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2011-08-07 10:53:12 +0000 |
| commit | 75976ea07dba9b97186667524d0a76603de416af (patch) | |
| tree | 4cb68dabb3cb7d5219e6ed6b660f0ded13fc25d3 /src/ui/cache | |
| parent | Fix compilation (oops). (diff) | |
| download | inkscape-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')
| -rw-r--r-- | src/ui/cache/svg_preview_cache.cpp | 10 | ||||
| -rw-r--r-- | src/ui/cache/svg_preview_cache.h | 2 |
2 files changed, 6 insertions, 6 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), diff --git a/src/ui/cache/svg_preview_cache.h b/src/ui/cache/svg_preview_cache.h index b9fa6f627..2318307e2 100644 --- a/src/ui/cache/svg_preview_cache.h +++ b/src/ui/cache/svg_preview_cache.h @@ -16,7 +16,7 @@ #include "display/display-forward.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); namespace Inkscape { namespace UI { |
