diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-02-11 11:39:53 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-02-11 11:39:53 +0000 |
| commit | 4c52ed01caef79ee62c965ac22bbfffa4d42b375 (patch) | |
| tree | 365def34a47a37c232927b21ca2933955e7c22e1 /src/extension/internal/gdkpixbuf-input.cpp | |
| parent | update to trunk (diff) | |
| parent | Set 'preserveAspectRatio' to 'none' when importing an image. (diff) | |
| download | inkscape-4c52ed01caef79ee62c965ac22bbfffa4d42b375.tar.gz inkscape-4c52ed01caef79ee62c965ac22bbfffa4d42b375.zip | |
update to trunk
(bzr r11950.1.253)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index d7d692091..ec04b1dad 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -95,6 +95,11 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) Inkscape::XML::Node *image_node = xml_doc->createElement("svg:image"); sp_repr_set_svg_double(image_node, "width", width); sp_repr_set_svg_double(image_node, "height", height); + + // Added 11 Feb 2014 as we now honor "preserveAspectRatio" and this is + // what Inkscaper's expect. + image_node->setAttribute("preserveAspectRatio", "none"); + if( scale.compare( "auto" ) != 0 ) { SPCSSAttr *css = sp_repr_css_attr_new(); sp_repr_css_set_property(css, "image-rendering", scale.c_str()); @@ -122,6 +127,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) // Set viewBox if it doesn't exist if (!doc->getRoot()->viewBox_set) { + std::cout << "Viewbox not set, setting" << std::endl; doc->setViewBox(Geom::Rect::from_xywh(0, 0, doc->getWidth().value(doc->getDefaultUnit()), doc->getHeight().value(doc->getDefaultUnit()))); } |
