summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-10-09 08:12:24 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-10-09 08:12:24 +0000
commit9d33236478436c623736995f363c47d57f1b58d7 (patch)
tree39f149ac0e2992aef905186ed167ee4a99dbdb5e /src
parentadd blur speed/quality options (diff)
downloadinkscape-9d33236478436c623736995f363c47d57f1b58d7.tar.gz
inkscape-9d33236478436c623736995f363c47d57f1b58d7.zip
export bitmap at maximum blur rendering quality
(bzr r1783)
Diffstat (limited to 'src')
-rw-r--r--src/helper/png-write.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/helper/png-write.cpp b/src/helper/png-write.cpp
index 44a977df7..e14d94ddc 100644
--- a/src/helper/png-write.cpp
+++ b/src/helper/png-write.cpp
@@ -28,6 +28,7 @@
#include <sp-item.h>
#include <sp-root.h>
#include <sp-defs.h>
+#include "prefs-utils.h"
/* This is an example of how to use libpng to read and write PNG files.
* The file libpng.txt is much more verbose then this. If you have not
@@ -327,6 +328,10 @@ sp_export_png_file(SPDocument *doc, gchar const *filename,
return FALSE;
}
+ // export with maximum blur rendering quality
+ int saved_quality = prefs_get_int_attribute ("options.blurquality", "value", 0);
+ prefs_set_int_attribute ("options.blurquality", "value", 2);
+
sp_document_ensure_up_to_date(doc);
/* Go to document coordinates */
@@ -403,6 +408,10 @@ sp_export_png_file(SPDocument *doc, gchar const *filename,
/* Free Arena and ArenaItem */
nr_arena_item_unref(ebp.root);
nr_object_unref((NRObject *) arena);
+
+ // restore saved blur quality
+ prefs_set_int_attribute ("options.blurquality", "value", saved_quality);
+
return write_status;
}