X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fextension%2Finternal%2Fbluredge.cpp;h=4a732fb495c193e67828fddbe302ac22e8decbaa;hb=5422ba934bd17d7f2578fda78ddc61df933a8113;hp=16c6d0eb9fe15df4047e5d7f000d5aa7b8d3ea2f;hpb=959dc6d3d1e30fc32fa164d0b540cc8188df02ef;p=inkscape.git diff --git a/src/extension/internal/bluredge.cpp b/src/extension/internal/bluredge.cpp index 16c6d0eb9..4a732fb49 100644 --- a/src/extension/internal/bluredge.cpp +++ b/src/extension/internal/bluredge.cpp @@ -39,7 +39,7 @@ namespace Internal { \return Whether the load was sucessful */ bool -BlurEdge::load (Inkscape::Extension::Extension *module) +BlurEdge::load (Inkscape::Extension::Extension */*module*/) { // std::cout << "Hey, I'm Blur Edge, I'm loading!" << std::endl; return TRUE; @@ -51,7 +51,7 @@ BlurEdge::load (Inkscape::Extension::Extension *module) \param document What should be edited. */ void -BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document) +BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { Inkscape::Selection * selection = ((SPDesktop *)document)->selection; @@ -71,7 +71,8 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View SPItem * spitem = *item; std::vector new_items(steps); - Inkscape::XML::Node * new_group = sp_repr_new("svg:g"); + Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document->doc()); + Inkscape::XML::Node * new_group = xml_doc->createElement("svg:g"); (SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group); double orig_opacity = sp_repr_css_double_property(sp_repr_css_attr(SP_OBJECT_REPR(spitem), "style"), "opacity", 1.0); @@ -82,7 +83,7 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View for (int i = 0; i < steps; i++) { double offset = (width / (float)(steps - 1) * (float)i) - (width / 2.0); - new_items[i] = (SP_OBJECT_REPR(spitem))->duplicate(); + new_items[i] = (SP_OBJECT_REPR(spitem))->duplicate(xml_doc); SPCSSAttr * css = sp_repr_css_attr(new_items[i], "style"); sp_repr_css_set_property(css, "opacity", opacity_string); @@ -116,9 +117,9 @@ BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View } Gtk::Widget * -BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view) +BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * /*view*/, sigc::signal * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/) { - return module->autogui(NULL, NULL); + return module->autogui(NULL, NULL, changeSignal); } #include "clear-n_.h"