effect.h revision 42ba1b712b7b430669fc49aa9facb439181081be
#ifndef INKSCAPE_LIVEPATHEFFECT_H
#define INKSCAPE_LIVEPATHEFFECT_H
/*
* Inkscape::LivePathEffect
*
* Copyright (C) Johan Engelen 2007-2008 <j.b.c.engelen@utwente.nl>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "display/display-forward.h"
#include <map>
#include "ui/widget/registry.h"
#include "sp-lpe-item.h"
#include "knotholder.h"
#define LPE_ENABLE_TEST_EFFECTS
struct SPDocument;
struct SPDesktop;
struct SPItem;
struct LivePathEffectObject;
}
}
}
}
enum EffectType {
BEND_PATH = 0,
KNOT,
#ifdef LPE_ENABLE_TEST_EFFECTS
#endif
INVALID_LPE // This must be last
};
enum LPEPathFlashType {
// PERMANENT_FLASH,
};
EffectType effectType ();
void writeParamsToSVG();
virtual int acceptsNumParams() { return 0; }
inline bool pathParamAccepted() { return done_pathparam_set; }
// TODO: providesKnotholder() is currently used as an indicator of whether a nodepath is
// created for an item or not. When we allow both at the same time, this needs rethinking!
bool providesKnotholder();
// TODO: in view of providesOwnFlashPaths() below, this is somewhat redundant
// (but spiro lpe still needs it!)
inline bool providesOwnFlashPaths() {
return provides_own_flash_paths || show_orig_path;
}
inline bool showOrigPath() { return show_orig_path; }
SPDocument * getSPDoc();
inline bool isVisible() { return is_visible; }
// provide a set of doEffect functions so the developer has a choice
// the order in which they appear is the order in which they are
// called by this base class. (i.e. doEffect(SPCurve * curve) defaults to calling
// doEffect(std::vector<Geom::Path> )
int oncanvasedit_it;
bool done_pathparam_set;
bool show_orig_path; // set this to true in derived effects to automatically have the original
// path displayed as helperpath
// this boolean defaults to false, it concatenates the input path to one pwd2,
// instead of normally 'splitting' the path into continuous pwd2 paths.
bool concatenate_before_pwd2;
bool provides_own_flash_paths; // if true, the standard flash path is suppressed
};
} //namespace LivePathEffect
} //namespace Inkscape
#endif
/*
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 :