summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/gdkpixbuf-input.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2007-09-26 18:55:41 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2007-09-26 18:55:41 +0000
commit2321a238075c5174e997670de531b07e15af0cac (patch)
tree155c0fadf2ddddb375b26d1ee6dbd18d1825ad48 /src/extension/internal/gdkpixbuf-input.cpp
parentChanged preference to use file chooser button (diff)
downloadinkscape-2321a238075c5174e997670de531b07e15af0cac.tar.gz
inkscape-2321a238075c5174e997670de531b07e15af0cac.zip
remove obsolete import-as-pattern option
(bzr r3807)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
-rw-r--r--src/extension/internal/gdkpixbuf-input.cpp41
1 files changed, 8 insertions, 33 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp
index 4a46b146d..b24bda8e9 100644
--- a/src/extension/internal/gdkpixbuf-input.cpp
+++ b/src/extension/internal/gdkpixbuf-input.cpp
@@ -52,39 +52,14 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri)
}
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
- if (prefs_get_int_attribute("options.importbitmapsasimages", "value", 1) == 1) {
- // import as <image>
- repr = xml_doc->createElement("svg:image");
- // both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs):
- repr->setAttribute("xlink:href", uri);
- repr->setAttribute("sodipodi:absref", uri);
-
- sp_repr_set_svg_double(repr, "width", width);
- sp_repr_set_svg_double(repr, "height", height);
-
- } else {
- // import as pattern-filled rect
- Inkscape::XML::Node *pat = xml_doc->createElement("svg:pattern");
- pat->setAttribute("inkscape:collect", "always");
- pat->setAttribute("patternUnits", "userSpaceOnUse");
- sp_repr_set_svg_double(pat, "width", width);
- sp_repr_set_svg_double(pat, "height", height);
- SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc))->appendChild(pat);
- gchar const *pat_id = pat->attribute("id");
- SPObject *pat_object = doc->getObjectById(pat_id);
-
- Inkscape::XML::Node *im = xml_doc->createElement("svg:image");
- im->setAttribute("xlink:href", uri);
- im->setAttribute("sodipodi:absref", uri);
- sp_repr_set_svg_double(im, "width", width);
- sp_repr_set_svg_double(im, "height", height);
- SP_OBJECT_REPR(pat_object)->addChild(im, NULL);
-
- repr = xml_doc->createElement("svg:rect");
- repr->setAttribute("style", g_strdup_printf("stroke:none;fill:url(#%s)", pat_id));
- sp_repr_set_svg_double(repr, "width", width);
- sp_repr_set_svg_double(repr, "height", height);
- }
+ // import as <image>
+ repr = xml_doc->createElement("svg:image");
+ // both are the same, as we don't know our base dir here and cannot relativate href (importer will fixupHrefs):
+ repr->setAttribute("xlink:href", uri);
+ repr->setAttribute("sodipodi:absref", uri);
+
+ sp_repr_set_svg_double(repr, "width", width);
+ sp_repr_set_svg_double(repr, "height", height);
SP_DOCUMENT_ROOT(doc)->appendChildRepr(repr);
Inkscape::GC::release(repr);