effect.h revision 76addc201c409e81eaaa73fe27cc0f79c4db097c
#ifndef INKSCAPE_LIVEPATHEFFECT_H
#define INKSCAPE_LIVEPATHEFFECT_H
/*
* Copyright (C) Johan Engelen 2007-2012 <j.b.c.engelen@alumnus.utwente.nl>
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "ui/widget/registry.h"
#include "effect-enum.h"
}
}
enum LPEPathFlashType {
// PERMANENT_FLASH,
};
EffectType effectType() const;
//basically, to get this method called before the derived classes, a bit
//of indirection is needed. We first call these methods, then the below.
void setCurrentZoom(double cZ);
void writeParamsToSVG();
/*
* isReady() indicates whether all preparations which are necessary to apply the LPE are done,
* e.g., waiting for a parameter path either before the effect is created or when it needs a
* path as argument. This is set in SPLPEItem::addPathEffect().
*/
/**
* Sets all parameters to their default values and writes them to SVG.
*/
/// /todo: is this method really necessary? it causes UI inconsistensies... (johan)
// /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() const;
// /TODO: in view of providesOwnFlashPaths() below, this is somewhat redundant
// (but spiro lpe still needs it!)
inline bool providesOwnFlashPaths() const {
return provides_own_flash_paths || show_orig_path;
}
inline bool showOrigPath() const { return show_orig_path; }
SPDocument * getSPDoc();
inline bool isVisible() const { 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(Geom::PathVector )
virtual void addKnotHolderEntities(KnotHolder * /*knotholder*/, SPDesktop * /*desktop*/, SPItem * /*item*/) {};
int oncanvasedit_it;
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 and calling doEffect_pwd2 for each.
bool concatenate_before_pwd2;
SPLPEItem * sp_lpe_item; // these get stored in doBeforeEffect_impl, and derived classes may do as they please with them.
Glib::ustring defaultUnit; // these get stored in doBeforeEffect_impl, and derived classes may do as they please with them.
double current_zoom;
bool provides_own_flash_paths; // if true, the standard flash path is suppressed
bool is_ready;
};
} //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 :