summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 00b090b)
raw | patch | inline | side by side (parent: 00b090b)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 28 Mar 2008 20:49:55 +0000 (20:49 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 28 Mar 2008 20:49:55 +0000 (20:49 +0000) |
src/path-chemistry.cpp | patch | blob | history | |
src/path-chemistry.h | patch | blob | history | |
src/ui/dialog/livepatheffect-editor.cpp | patch | blob | history |
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 49c1a1063adeeda6235e0ba4ebdacbb7c768d276..cfdbc0b54d276472e500be1762e1ffb3e6047da8 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
/* This function is an entry point from GUI */
void
-sp_selected_path_to_curves(void)
+sp_selected_path_to_curves(bool interactive)
{
- sp_selected_path_to_curves0(TRUE, SP_TOCURVE_INTERACTIVE);
+ if (interactive) {
+ sp_selected_path_to_curves0(TRUE, SP_TOCURVE_INTERACTIVE);
+ } else {
+ sp_selected_path_to_curves0(false, 0);
+ }
}
static void
diff --git a/src/path-chemistry.h b/src/path-chemistry.h
index 52b3b189d31d4bb4cc89c4d8ecbd6ac41a5c3d06..a715833d052d2085a06623454169ae95fdfeace8 100644 (file)
--- a/src/path-chemistry.h
+++ b/src/path-chemistry.h
void sp_selected_path_combine (void);
void sp_selected_path_break_apart (void);
-void sp_selected_path_to_curves (void);
+void sp_selected_path_to_curves (bool interactive = true);
Inkscape::XML::Node *sp_selected_item_to_curved_repr(SPItem *item, guint32 text_grouping_policy);
void sp_selected_path_reverse ();
index 2394adc6f03fc973cf0cf5ae983ec956b0c413e5..f62556d23ae64306b3f03509f33aa623431f8e34 100644 (file)
#include "sp-shape.h"
#include "sp-item-group.h"
#include "sp-path.h"
+#include "sp-rect.h"
+#include "path-chemistry.h"
#include "live_effects/effect.h"
#include "live_effects/lpeobject.h"
#include "gtkmm/widget.h"
const Util::EnumData<LivePathEffect::EffectType>* data = combo_effecttype.get_active_data();
if (!data) return;
+ // If item is a SPRect, convert it to path first:
+ if ( SP_IS_RECT(item) ) {
+ sp_selected_path_to_curves(false);
+ item = sel->singleItem(); // get new item
+ }
+
// Path effect definition
Inkscape::XML::Document *xml_doc = sp_document_repr_doc(doc);
Inkscape::XML::Node *repr = xml_doc->createElement("inkscape:path-effect");