summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 91505f1)
raw | patch | inline | side by side (parent: 91505f1)
author | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 14 Aug 2008 21:30:51 +0000 (21:30 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 14 Aug 2008 21:30:51 +0000 (21:30 +0000) |
index f8f2f57bdbbd1f219bdef6860ffd42c7829aebed..cf133407a33b024a97b3850ba4e2ae56a0dc8315 100644 (file)
/**
\brief This actually blurs the edge.
\param module The effect that was called (unused)
- \param document What should be edited.
+ \param desktop What should be edited.
*/
void
-BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
+BlurEdge::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *desktop, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
{
- Inkscape::Selection * selection = ((SPDesktop *)document)->selection;
+ Inkscape::Selection * selection = static_cast<SPDesktop *>(desktop)->selection;
float width = module->get_param_float("blur-width");
int steps = module->get_param_int("num-steps");
SPItem * spitem = *item;
std::vector<Inkscape::XML::Node *> new_items(steps);
- Inkscape::XML::Document *xml_doc = sp_document_repr_doc(document->doc());
+ Inkscape::XML::Document *xml_doc = sp_document_repr_doc(desktop->doc());
Inkscape::XML::Node * new_group = xml_doc->createElement("svg:g");
(SP_OBJECT_REPR(spitem)->parent())->appendChild(new_group);
new_group->appendChild(new_items[i]);
selection->add(new_items[i]);
- sp_selected_path_to_curves();
+ sp_selected_path_to_curves(static_cast<SPDesktop *>(desktop));
if (offset < 0.0) {
/* Doing an inset here folks */
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);
+ sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_INSET)->get_action(desktop), NULL);
} 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);
+ sp_action_perform(Inkscape::Verb::get(SP_VERB_SELECTION_OFFSET)->get_action(desktop), NULL);
}
selection->clear();
diff --git a/src/node-context.cpp b/src/node-context.cpp
index 96b562a3fb2e46b70a001d164454b60dafa497fb..b205b86d5d8973fb1d7f8bb6e4c77cb5a5a9eb3b 100644 (file)
--- a/src/node-context.cpp
+++ b/src/node-context.cpp
case GDK_r:
if (MOD__SHIFT_ONLY) {
// FIXME: add top panel button
- sp_selected_path_reverse();
+ sp_selected_path_reverse(desktop);
ret = TRUE;
}
break;
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index c4855e7d38980239adafd20c7d0568c84116c20b..4c459ba64dc563b2b76ea151ed3335203cf9efda 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
#include "libnr/nr-path.h"
#include "text-editing.h"
#include "style.h"
-#include "inkscape.h"
#include "desktop.h"
#include "document.h"
#include "message-stack.h"
#include "path-chemistry.h"
/* Helper functions for sp_selected_path_to_curves */
-static void sp_selected_path_to_curves0(gboolean do_document_done, guint32 text_grouping_policy);
+static void sp_selected_path_to_curves0(SPDesktop *desktop, bool do_document_done, guint32 text_grouping_policy);
static bool sp_item_list_to_curves(const GSList *items, GSList **selected, GSList **to_select);
enum {
};
void
-sp_selected_path_combine(void)
+sp_selected_path_combine(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
SPDocument *doc = sp_desktop_document(desktop);
}
void
-sp_selected_path_break_apart(void)
+sp_selected_path_break_apart(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
/* This function is an entry point from GUI */
void
-sp_selected_path_to_curves(bool interactive)
+sp_selected_path_to_curves(SPDesktop *desktop, bool interactive)
{
- if (interactive) {
- sp_selected_path_to_curves0(TRUE, SP_TOCURVE_INTERACTIVE);
- } else {
- sp_selected_path_to_curves0(false, 0);
- }
+ sp_selected_path_to_curves0(desktop, interactive, interactive ? SP_TOCURVE_INTERACTIVE : 0);
}
static void
-sp_selected_path_to_curves0(gboolean interactive, guint32 /*text_grouping_policy*/)
+sp_selected_path_to_curves0(SPDesktop *desktop, bool interactive, guint32 /*text_grouping_policy*/)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
@@ -476,10 +466,8 @@ sp_selected_item_to_curved_repr(SPItem *item, guint32 /*text_grouping_policy*/)
// FIXME: THIS DOES NOT REVERSE THE NODETYPES ORDER!
void
-sp_selected_path_reverse()
+sp_selected_path_reverse(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(desktop);
GSList *items = (GSList *) selection->itemList();
diff --git a/src/path-chemistry.h b/src/path-chemistry.h
index a715833d052d2085a06623454169ae95fdfeace8..27c3b868016381a21f5e76fa61da34addd4ff6ce 100644 (file)
--- a/src/path-chemistry.h
+++ b/src/path-chemistry.h
#include "forward.h"
-void sp_selected_path_combine (void);
-void sp_selected_path_break_apart (void);
-void sp_selected_path_to_curves (bool interactive = true);
+void sp_selected_path_combine (SPDesktop *desktop);
+void sp_selected_path_break_apart (SPDesktop *desktop);
+void sp_selected_path_to_curves (SPDesktop *desktop, bool interactive = true);
Inkscape::XML::Node *sp_selected_item_to_curved_repr(SPItem *item, guint32 text_grouping_policy);
-void sp_selected_path_reverse ();
+void sp_selected_path_reverse (SPDesktop *desktop);
#endif
diff --git a/src/verbs.cpp b/src/verbs.cpp
index f96d0a4f019e856cacc2601050b5ddc9bb43deb9..c60ba6a5fe7c983f9a015feba63063587b673800 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
sp_selected_path_simplify();
break;
case SP_VERB_SELECTION_REVERSE:
- sp_selected_path_reverse();
+ sp_selected_path_reverse(dt);
break;
case SP_VERB_SELECTION_TRACE:
inkscape_dialogs_unhide();
break;
case SP_VERB_SELECTION_COMBINE:
- sp_selected_path_combine();
+ sp_selected_path_combine(dt);
break;
case SP_VERB_SELECTION_BREAK_APART:
- sp_selected_path_break_apart();
+ sp_selected_path_break_apart(dt);
break;
case SP_VERB_SELECTION_GRIDTILE:
inkscape_dialogs_unhide();
sp_selection_remove_transform();
break;
case SP_VERB_OBJECT_TO_CURVE:
- sp_selected_path_to_curves();
+ sp_selected_path_to_curves(dt);
break;
case SP_VERB_OBJECT_FLOW_TEXT:
text_flow_into_shape();