diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2014-03-13 04:45:38 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2014-03-13 04:45:38 +0000 |
| commit | e7a3f5b74d1f5a95390ee95b06371d184c1812f7 (patch) | |
| tree | 78f665a8013ebba1d57b3114744734730e4fa8b4 /src/sp-root.cpp | |
| parent | Render zero-width PDF lines as 1px lines compensated for current transform. (diff) | |
| download | inkscape-e7a3f5b74d1f5a95390ee95b06371d184c1812f7.tar.gz inkscape-e7a3f5b74d1f5a95390ee95b06371d184c1812f7.zip | |
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)
Diffstat (limited to 'src/sp-root.cpp')
| -rw-r--r-- | src/sp-root.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
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<Inkscape::DrawingGroup *>(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<Inkscape::DrawingGroup *>(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<Inkscape::DrawingGroup *>(v->arenaitem); + g->setAntialiasing(s); + } +} + /* Local Variables: mode:c++ |
