effect.cpp revision f4db63be4e929f4706410914295deccaceea19cd
#define INKSCAPE_LIVEPATHEFFECT_CPP
/*
* Copyright (C) Johan Engelen 2007 <j.b.c.engelen@utwente.nl>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "live_effects/effect.h"
#include "display/display-forward.h"
#include "xml/node-event-vector.h"
#include "sp-object.h"
#include "attributes.h"
#include "message-stack.h"
#include "desktop.h"
#include "inkscape.h"
#include "document.h"
#include "live_effects/lpeobject.h"
#include "live_effects/parameter/parameter.h"
#include "libnr/n-art-bpath-2geom.h"
#include <gtkmm.h>
#include <exception>
// include effects:
#include "live_effects/lpe-patternalongpath.h"
#include "live_effects/lpe-bendpath.h"
#include "live_effects/lpe-sketch.h"
#include "live_effects/lpe-vonkoch.h"
#include "live_effects/lpe-knot.h"
#include "live_effects/lpe-test-doEffect-stack.h"
#include "live_effects/lpe-gears.h"
#include "live_effects/lpe-curvestitch.h"
#include "live_effects/lpe-circle_with_radius.h"
#include "live_effects/lpe-perspective_path.h"
#include "live_effects/lpe-spiro.h"
#include "live_effects/lpe-constructgrid.h"
#include "live_effects/lpe-envelope.h"
#include "live_effects/lpe-perp_bisector.h"
// end of includes
#include "nodepath.h"
namespace Inkscape {
namespace LivePathEffect {
// {constant defined in effect.h, N_("name of your effect"), "name of your effect in SVG"}
{PATTERN_ALONG_PATH, N_("Pattern Along Path"), "skeletal"}, // for historic reasons, this effect is called skeletal(strokes) in Inkscape:SVG
#ifdef LPE_ENABLE_TEST_EFFECTS
#endif
};
{
switch (lpenr) {
case PATTERN_ALONG_PATH:
break;
case BEND_PATH:
break;
case SKETCH:
break;
case VONKOCH:
break;
case KNOT:
break;
#ifdef LPE_ENABLE_TEST_EFFECTS
case DOEFFECTSTACK_TEST:
break;
#endif
case GEARS:
break;
case CURVE_STITCH:
break;
case CIRCLE_WITH_RADIUS:
break;
case PERSPECTIVE_PATH:
break;
case SPIRO:
break;
case CONSTRUCT_GRID:
break;
case ENVELOPE:
break;
case PERP_BISECTOR:
break;
default:
break;
}
if (neweffect) {
}
return neweffect;
}
: oncanvasedit_it(0),
concatenate_before_pwd2(false)
{
}
{
}
{
else
}
void
{
//Do nothing for simple effects
}
/*
* Here be the doEffect function chain:
*/
void
{
}
{
try {
return new_bpath;
}
_("An exception occurred during execution of the Path Effect.") );
unsigned ret = 0;
++ret;
}
return path_out;
}
}
{
if ( !concatenate_before_pwd2 ) {
// default behavior
// add the output path vector to the already accumulated vector:
}
}
} else {
// concatenate the path into possibly discontinuous pwd2
}
}
return path_out;
}
{
g_warning("Effect has no doEffect implementation");
return pwd2_in;
}
void
{
if (value) {
if (!accepted) {
}
} else {
// set default value
}
it++;
}
}
/* This function does not and SHOULD NOT write to XML */
void
{
if (param) {
if (new_value) {
if (!accepted) {
}
} else {
// set default value
}
}
}
void
{
}
/**
* This *creates* a new widget, management of deletion should be done by the caller
*/
{
// use manage here, because after deletion of Effect object, others might still be pointing to this widget.
if (widg) {
}
}
it++;
}
}
{
return SP_OBJECT_REPR(lpeobj);
}
{
return SP_OBJECT_DOCUMENT(lpeobj);
}
{
return param;
}
it++;
}
return NULL;
}
{
return NULL;
oncanvasedit_it = 0;
}
int old_it = oncanvasedit_it;
do {
return param;
} else {
oncanvasedit_it = 0;
}
}
return NULL;
}
void
{
if (!desktop) return;
if (param) {
} else {
_("None of the applied path effect's parameters can be edited on-canvas.") );
}
}
/* 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!
*/
void
{
// do nothing for simple effects
}
void
{
}
void
{
// cycle through all parameters. Most parameters will not need transformation, but path and point params do.
for (std::vector<Parameter *>::iterator it = param_vector.begin(); it != param_vector.end(); it++) {
}
}
} /* namespace LivePathEffect */
} /* namespace Inkscape */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :