effect.cpp revision f9504c822b72a774b910958446fd1e730235b7cb
#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 "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/effect.h"
#include "live_effects/lpeobject.h"
#include "live_effects/parameter/parameter.h"
#include "live_effects/n-art-bpath-2geom.h"
#include <gtkmm.h>
#include <exception>
// include effects:
#include "live_effects/lpe-skeletalstrokes.h"
#include "live_effects/lpe-pathalongpath.h"
#include "live_effects/lpe-slant.h"
#include "live_effects/lpe-test-doEffect-stack.h"
#include "live_effects/lpe-gears.h"
#include "live_effects/lpe-curvestitch.h"
#include "nodepath.h"
namespace Inkscape {
namespace LivePathEffect {
// {constant defined in effect.h, N_("name of your effect"), "name of your effect in SVG"}
#ifdef LPE_ENABLE_TEST_EFFECTS
#endif
};
{
switch (lpenr) {
case SKELETAL_STROKES:
break;
case PATH_ALONG_PATH:
break;
#ifdef LPE_ENABLE_TEST_EFFECTS
case SLANT:
break;
case DOEFFECTSTACK_TEST:
break;
#endif
case GEARS:
break;
case CURVE_STITCH:
break;
default:
break;
}
if (neweffect) {
}
return neweffect;
}
{
oncanvasedit_it = 0;
}
{
if (tooltips) {
delete tooltips;
}
}
{
else
}
/*
* Here be the doEffect function chain:
*/
void
{
if (new_bpath && new_bpath != SP_CURVE_BPATH(curve)) { // FIXME, add function to SPCurve to change bpath? or a copy function?
}
}
}
{
try {
return new_bpath;
}
_("An exception occurred during execution of the Path Effect.") );
unsigned ret = 0;
++ret;
}
return path_out;
}
}
{
}
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
{
}
{
if (!vbox) {
vbox = Gtk::manage( new Gtk::VBox() ); // use manage here, because after deletion of Effect object, others might still be pointing to this widget.
//if (!tooltips)
if (widg) {
}
}
it++;
}
}
}
{
return SP_OBJECT_REPR(lpeobj);
}
{
return SP_OBJECT_DOCUMENT(lpeobj);
}
{
return param;
}
it++;
}
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
{
np->show_helperpath = true;
}
} /* 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 :