summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2009-04-30 21:09:18 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2009-04-30 21:09:18 +0000
commit84239fe38ae3819eaa06ffa32772ad54182bd23d (patch)
tree17cf0303f6edb19c8ab493544712f6bf488550c3 /src
parentFix infinite loop as reported in bug #365034 (diff)
downloadinkscape-84239fe38ae3819eaa06ffa32772ad54182bd23d.tar.gz
inkscape-84239fe38ae3819eaa06ffa32772ad54182bd23d.zip
allow --export-dpi to be used for setting the filter rasterization resolution in PS/EPS/PDF export
(bzr r7801)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 05cfc8578..d6da78a97 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -291,7 +291,7 @@ struct poptOption options[] = {
{"export-dpi", 'd',
POPT_ARG_STRING, &sp_export_dpi, SP_ARG_EXPORT_DPI,
- N_("The resolution used for exporting SVG into bitmap (default 90)"),
+ N_("Resolution for exporting to bitmap and for rasterization of filters in PS/EPS/PDF (default 90)"),
N_("DPI")},
{"export-area", 'a',
@@ -1477,6 +1477,17 @@ static void do_export_ps_pdf(SPDocument* doc, gchar const* uri, char const* mime
(*i)->set_param_bool("blurToBitmap", FALSE);
} else {
(*i)->set_param_bool("blurToBitmap", TRUE);
+
+ gdouble dpi = 90.0;
+ if (sp_export_dpi) {
+ dpi = atof(sp_export_dpi);
+ if ((dpi < 72) || (dpi > 2400.0)) {
+ g_warning("DPI value %s out of range [72 - 2400]. Using 90 dpi instead.", sp_export_dpi);
+ dpi = 90;
+ }
+ }
+
+ (*i)->set_param_int("resolution", (int) dpi);
}
(*i)->save(doc, uri);