index 3ae78b91fcbdb23750acc6c7932dbb6353649c8b..678e492ee414257cf36f5582e42b990323da6143 100644 (file)
* Released under GNU GPL, read the file 'COPYING' for more information
*/
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <vector>
#include "desktop.h"
#include "selection.h"
#include "helper/action.h"
#include "desktop.h"
#include "selection.h"
#include "helper/action.h"
items.insert<GSListConstIterator<SPItem *> >(items.end(), selection->itemList(), NULL);
selection->clear();
items.insert<GSListConstIterator<SPItem *> >(items.end(), selection->itemList(), NULL);
selection->clear();
- std::list<SPItem *> new_items;
for(std::list<SPItem *>::iterator item = items.begin();
item != items.end(); item++) {
SPItem * spitem = *item;
for(std::list<SPItem *>::iterator item = items.begin();
item != items.end(); item++) {
SPItem * spitem = *item;
- Inkscape::XML::Node * new_items[steps];
+ std::vector<Inkscape::XML::Node *> new_items(steps);
Inkscape::XML::Node * new_group = sp_repr_new("svg:g");
(SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group);
Inkscape::XML::Node * new_group = sp_repr_new("svg:g");
(SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group);
- /** \todo Need to figure out how to get from XML::Node to SPItem */
- /* new_items.push_back(); */
double orig_opacity = sp_repr_css_double_property(sp_repr_css_attr(SP_OBJECT_REPR(spitem), "style"), "opacity", 1.0);
char opacity_string[64];
double orig_opacity = sp_repr_css_double_property(sp_repr_css_attr(SP_OBJECT_REPR(spitem), "style"), "opacity", 1.0);
char opacity_string[64];
offset *= -1.0;
prefs_set_double_attribute("options.defaultoffsetwidth", "value", offset);
sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(document), NULL);
offset *= -1.0;
prefs_set_double_attribute("options.defaultoffsetwidth", "value", offset);
sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(document), NULL);
- } else if (offset == 0.0) {
- } else {
+ } else if (offset > 0.0) {
prefs_set_double_attribute("options.defaultoffsetwidth", "value", offset);
sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(document), NULL);
}
prefs_set_double_attribute("options.defaultoffsetwidth", "value", offset);
sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(document), NULL);
}
selection->clear();
selection->add(items.begin(), items.end());
selection->clear();
selection->add(items.begin(), items.end());
- selection->add(new_items.begin(), new_items.end());
return;
}
return;
}
Gtk::Widget *
BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view)
{
Gtk::Widget *
BlurEdge::prefs_effect(Inkscape::Extension::Effect * module, Inkscape::UI::View::View * view)
{
- return module->autogui();
+ return module->autogui(NULL, NULL);
}
#include "clear-n_.h"
}
#include "clear-n_.h"
"<inkscape-extension>\n"
"<name>" N_("Blur Edge") "</name>\n"
"<id>org.inkscape.effect.bluredge</id>\n"
"<inkscape-extension>\n"
"<name>" N_("Blur Edge") "</name>\n"
"<id>org.inkscape.effect.bluredge</id>\n"
- "<param name=\"blur-width\" gui-text=\"" N_("Blur Width") "\" type=\"float\" min=\"1.0\" max=\"50.0\">1.0</param>\n"
- "<param name=\"num-steps\" gui-text=\"" N_("Number of Steps") "\" type=\"int\" min=\"5\" max=\"100\">11</param>\n"
+ "<param name=\"blur-width\" gui-text=\"" N_("Blur Width") "\" gui-description=\"" N_("Width in pixels of the blurred area") "\" scope=\"document\" type=\"float\" min=\"1.0\" max=\"50.0\">1.0</param>\n"
+ "<param name=\"num-steps\" gui-text=\"" N_("Number of Steps") "\" gui-description=\"" N_("Number of copies of the object to make to simulate the blur") "\" scope=\"document\" type=\"int\" min=\"5\" max=\"100\">11</param>\n"
"<effect>\n"
"<object-type>all</object-type>\n"
"<effects-menu>\n"
"<effect>\n"
"<object-type>all</object-type>\n"
"<effects-menu>\n"
- "<submenu name=\"" N_("Enhance Path") "\" />\n"
+ "<submenu name=\"" N_("Generate from Path") "\" />\n"
"</effects-menu>\n"
"</effect>\n"
"</inkscape-extension>\n" , new BlurEdge());
"</effects-menu>\n"
"</effect>\n"
"</inkscape-extension>\n" , new BlurEdge());