effect.cpp revision b802808a0226a87371021393c4f1da776aa6a6ad
19823N/A#include "live_effects/effect.h"
19823N/A#include "display/display-forward.h"
19823N/A#include "xml/node-event-vector.h"
19823N/A#include "sp-object.h"
19823N/A#include "attributes.h"
19823N/A#include "message-stack.h"
19823N/A#include "inkscape.h"
19823N/A#include "document.h"
19823N/A#include "document-private.h"
19823N/A#include "xml/document.h"
19823N/A#include "pen-context.h"
19823N/A#include "tools-switch.h"
19823N/A#include "live_effects/lpeobject.h"
19823N/A#include "live_effects/parameter/parameter.h"
19823N/A#include "libnr/n-art-bpath-2geom.h"
19823N/A#include "live_effects/lpe-patternalongpath.h"
19823N/A#include "live_effects/lpe-bendpath.h"
19823N/A#include "live_effects/lpe-sketch.h"
19823N/A#include "live_effects/lpe-vonkoch.h"
19823N/A#include "live_effects/lpe-knot.h"
19823N/A#include "live_effects/lpe-test-doEffect-stack.h"
19823N/A#include "live_effects/lpe-gears.h"
19823N/A#include "live_effects/lpe-curvestitch.h"
19823N/A#include "live_effects/lpe-circle_with_radius.h"
19823N/A#include "live_effects/lpe-perspective_path.h"
19823N/A#include "live_effects/lpe-spiro.h"
19823N/A#include "live_effects/lpe-lattice.h"
19823N/A#include "live_effects/lpe-envelope.h"
19823N/A#include "live_effects/lpe-constructgrid.h"
19823N/A#include "live_effects/lpe-perp_bisector.h"
19823N/A#include "live_effects/lpe-tangent_to_curve.h"
19823N/A#include "live_effects/lpe-mirror_reflect.h"
19823N/A#include "nodepath.h"
19823N/Anamespace LivePathEffect {
19823N/A {PATTERN_ALONG_PATH, N_("Pattern Along Path"), "skeletal"}, // for historic reasons, this effect is called skeletal(strokes) in Inkscape:SVG
19823N/A case PATTERN_ALONG_PATH:
19823N/A case DOEFFECTSTACK_TEST:
19823N/A case CURVE_STITCH:
19823N/A case CIRCLE_WITH_RADIUS:
19823N/A case PERSPECTIVE_PATH:
19823N/A case CONSTRUCT_GRID:
19823N/A case PERP_BISECTOR:
19823N/A case TANGENT_TO_CURVE:
19823N/A case MIRROR_REFLECT:
19823N/A SP_OBJECT_REPR(SP_DOCUMENT_DEFS(doc))->addChild(repr, NULL); // adds to <defs> and assigns the 'id' attribute
: oncanvasedit_it(0),
is_visible(_("Is visible?"), _("If unchecked, the effect remains applied to the object but is temporarily disabled on canvas"), "is_visible", &wr, this, true),
done_pathparam_set(false),
concatenate_before_pwd2(false)
SPDesktop *desktop = inkscape_active_desktop(); // TODO: Is there a better method to find the item's desktop?
(*p)->write_to_SVG();
done_pathparam_set = true;
if ( !concatenate_before_pwd2 ) {
return path_out;
return pwd2_in;
if (value) {
if (!accepted) {
it++;
if (param) {
if (new_value) {
if (!accepted) {
using namespace std;
// use manage here, because after deletion of Effect object, others might still be pointing to this widget.
if (widg) {
it++;
return param;
it++;
return NULL;
return NULL;
oncanvasedit_it = 0;
return param;
oncanvasedit_it = 0;
return NULL;
if (!desktop) return;
if (param) {
/* This function should reset the defaults and is used for example to initialize an effect right after it has been applied to a path
* The nice thing about this is that this function can use knowledge of the original path and set things accordingly for example to the size or origin of the original path!
// cycle through all parameters. Most parameters will not need transformation, but path and point params do.