summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06c7f19)
raw | patch | inline | side by side (parent: 06c7f19)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 30 Apr 2009 21:09:18 +0000 (21:09 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Thu, 30 Apr 2009 21:09:18 +0000 (21:09 +0000) |
inkscape.pod | patch | blob | history | |
src/main.cpp | patch | blob | history |
diff --git a/inkscape.pod b/inkscape.pod
index afc364ec912c91c8bd3580ff1c7a5e109b2e1e79..720a111b646ef0e67ba240f9a3f1caf7ed4b8de6 100644 (file)
--- a/inkscape.pod
+++ b/inkscape.pod
=item B<-d> I<DPI>, B<--export-dpi>=I<DPI>
The resolution used for PNG export.
-The default is 90, which corresponds to 1 SVG user unit
+It is also used for fallback rasterization of filtered objects
+when exporting to PS, EPS, or PDF (unless you specify --export-ignore-filters to suppress
+rasterization). The default is 90 dpi, which corresponds to 1 SVG user unit
(px, also called "user unit") exporting to 1 bitmap pixel.
This value overrides the DPI hint if used with --export-use-hints.
=item B<--export-ignore-filters>
-Export filtered objects (e.g. those with blur) as vectors, ignoring the filters (for PS, EPS, and PDF export). By default, all filtered objects are rasterized, preserving the appearance.
+Export filtered objects (e.g. those with blur) as vectors, ignoring the filters (for PS, EPS, and PDF export).
+By default, all filtered objects are rasterized at --export-dpi (default 90 dpi), preserving the appearance.
=item B<-I>, B<--query-id>
diff --git a/src/main.cpp b/src/main.cpp
index 05cfc85787a117035c5141debe49cf6699fc6772..d6da78a9791473137af7190b91cd7e4613f22232 100644 (file)
--- a/src/main.cpp
+++ b/src/main.cpp
{"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);