summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/svg.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2018-09-13 13:37:43 +0000
committerJabiertxof <jabier.arraiza@marker.es>2018-09-13 13:37:43 +0000
commitbda44805f365b0f4757a0f9c940d37d38ab4564b (patch)
treeaa42879fb9f10e7393fc8f457960b987ff06b953 /src/extension/internal/svg.cpp
parentAdd per embed/linked SVG a DPI value (diff)
downloadinkscape-bda44805f365b0f4757a0f9c940d37d38ab4564b.tar.gz
inkscape-bda44805f365b0f4757a0f9c940d37d38ab4564b.zip
Fix DPI wrong code pointed by Mc
Diffstat (limited to 'src/extension/internal/svg.cpp')
-rw-r--r--src/extension/internal/svg.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/extension/internal/svg.cpp b/src/extension/internal/svg.cpp
index d39f5a960..e4586ec5f 100644
--- a/src/extension/internal/svg.cpp
+++ b/src/extension/internal/svg.cpp
@@ -245,8 +245,8 @@ Svg::open (Inkscape::Extension::Input *mod, const gchar *uri)
// Added 11 Feb 2014 as we now honor "preserveAspectRatio" and this is
// what Inkscaper's expect.
image_node->setAttribute("preserveAspectRatio", "none");
- Glib::ustring svgdpi = Glib::ustring::format(mod->get_param_float("svgdpi"));
- image_node->setAttribute("inkscape:svg-dpi", svgdpi.c_str());
+ double svgdpi = mod->get_param_float("svgdpi");
+ image_node->setAttribute("inkscape:svg-dpi", Glib::ustring::format(svgdpi).c_str());
image_node->setAttribute("width", Glib::ustring::format(width));
image_node->setAttribute("height", Glib::ustring::format(height));
Glib::ustring scale = prefs->getString("/dialogs/import/scale");
@@ -258,7 +258,7 @@ Svg::open (Inkscape::Extension::Input *mod, const gchar *uri)
}
// convert filename to uri
if (embed) {
- std::unique_ptr<Inkscape::Pixbuf> pb(Inkscape::Pixbuf::create_from_file(uri, svgdpi.c_str()));
+ std::unique_ptr<Inkscape::Pixbuf> pb(Inkscape::Pixbuf::create_from_file(uri, svgdpi));
if(pb) {
sp_embed_svg(image_node, uri);
}