From ffc52c97574da45ce09843063c40d3774b0fcce6 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Mon, 9 Oct 2006 08:12:24 +0000 Subject: [PATCH] export bitmap at maximum blur rendering quality --- src/helper/png-write.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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 #include #include +#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; } -- 2.30.2