From e7a3f5b74d1f5a95390ee95b06371d184c1812f7 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Thu, 13 Mar 2014 05:45:38 +0100 Subject: Provide a toggle in the document properties to optionally turn off antialiasing for display and export. Fixes a nearly 10 year old bug #170356 Fixed bugs: - https://launchpad.net/bugs/170356 (bzr r13144) --- src/sp-root.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/sp-root.cpp') diff --git a/src/sp-root.cpp b/src/sp-root.cpp index 12570e03e..12ac1bad4 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -25,6 +25,7 @@ #include "document.h" #include "inkscape-version.h" #include "sp-defs.h" +#include "sp-namedview.h" #include "sp-root.h" #include "display/drawing-group.h" #include "svg/stringstream.h" @@ -307,6 +308,7 @@ void SPRoot::update(SPCtx *ctx, guint flags) for (SPItemView *v = this->display; v != NULL; v = v->next) { Inkscape::DrawingGroup *g = dynamic_cast(v->arenaitem); g->setChildTransform(this->c2p); + g->setAntialiasing(sp_document_namedview(this->document, NULL)->antialiasing); } } @@ -373,6 +375,7 @@ Inkscape::DrawingItem *SPRoot::show(Inkscape::Drawing &drawing, unsigned int key if (ai) { Inkscape::DrawingGroup *g = dynamic_cast(ai); g->setChildTransform(this->c2p); + g->setAntialiasing(sp_document_namedview(this->document, NULL)->antialiasing); } return ai; @@ -391,6 +394,13 @@ const char *SPRoot::displayName() const { return "SVG"; // Do not translate } +void SPRoot::setAntialiasing(bool s) { + for (SPItemView *v = this->display; v != NULL; v = v->next) { + Inkscape::DrawingGroup *g = dynamic_cast(v->arenaitem); + g->setAntialiasing(s); + } +} + /* Local Variables: mode:c++ -- cgit v1.2.3