9#ifndef INKSCAPE_LIVEPATHEFFECT_H
10#define INKSCAPE_LIVEPATHEFFECT_H
17#include <glibmm/ustring.h>
20#define LPE_CONVERSION_TOLERANCE 0.01
42namespace LivePathEffect {
67 return !(*
this == other);
71 os <<
"Number of child shapes:" << lpeitemnumbers.
nchildshapes << std::endl;
72 os <<
"Number of subpaths:" << lpeitemnumbers.
nsubpaths << std::endl;
73 os <<
"Number of curves:" << lpeitemnumbers.
ncurves;
3x3 matrix representing an affine transformation.
Adaptor that creates 2D functions from 1D ones.
Function defined as discrete pieces.
Two-dimensional point that doubles as a vector.
void doBeforeEffect_impl(SPLPEItem const *lpeitem)
virtual void doOnVisibilityToggled(SPLPEItem const *lpeitem)
std::vector< Parameter * > param_vector
gint spinbutton_width_chars
int acceptsNumClicks() const
void registerParameter(Parameter *param)
virtual void addCanvasIndicators(SPLPEItem const *lpeitem, std::vector< Geom::PathVector > &hp_vec)
Add possible canvas indicators (i.e., helperpaths other than the original path) to hp_vec This functi...
virtual void resetDefaults(SPItem const *item)
Sets all parameters to their default values and writes them to SVG.
virtual Gtk::Widget * newWidget()
This creates a managed widget.
LivePathEffectObject const * getLPEObj() const
void setReady(bool ready=true)
static void createAndApply(const char *name, SPDocument *doc, SPItem *item)
virtual void doOnRemove(SPLPEItem const *)
bool providesOwnFlashPaths() const
void setParameter(const gchar *key, const gchar *new_value)
bool hasDefaultParameters()
Get LPE has defaults.
void transform_multiply_impl(Geom::Affine const &postmul, SPLPEItem *)
void editNextParamOncanvas(SPItem *item, SPDesktop *desktop)
bool apply_to_clippath_and_mask
std::vector< Geom::PathVector > getCanvasIndicators(SPLPEItem const *lpeitem)
Return a vector of PathVectors which contain all canvas indicators for this effect.
virtual void doOnApply(SPLPEItem const *lpeitem)
Is performed a single time when the effect is freshly applied to a path.
static Effect * New(EffectType lpenr, LivePathEffectObject *lpeobj)
Parameter * getParameter(const char *key)
void setCurrentZoom(double cZ)
LivePathEffectObject * lpeobj
void setLPEAction(LPEAction lpe_action)
void setDefaultParam(Glib::ustring pref_path, Parameter *param)
Effect(const Effect &)=delete
bool provides_own_flash_paths
virtual void processObjects(LPEAction lpe_action)
std::vector< SPObject * > effect_get_satellites(bool force=true)
sigc::connection _before_commit_connection
Inkscape::XML::Node * getRepr()
void addHandles(KnotHolder *knotholder, SPItem *item)
Add all registered LPE knotholder handles to the knotholder.
SPShape * getCurrentShape() const
Effect & operator=(const Effect &)=delete
bool isOnClipboard()
The lpe is on clipboard.
bool _provides_path_adjustment
virtual bool getHolderRemove()
Parameter * getNextOncanvasEditableParam()
void doAfterEffect_impl(SPLPEItem const *lpeitem, SPCurve *curve)
void unsetDefaultParam(Glib::ustring pref_path, Parameter *param)
bool isNodePointSelected(Geom::Point const &nodePoint) const
bool showOrigPath() const
std::vector< SPLPEItem * > getCurrrentLPEItems() const
virtual void doOnException(SPLPEItem const *lpeitem)
void setDefaultParameters()
Set this LPE defaults.
Geom::PathVector pathvector_before_effect
Glib::ustring getName() const
void doOnOpen_impl()
Is performed on document open allow things like fix legacy LPE in a undo insensitive way.
void setSelectedNodePoints(std::vector< Geom::Point > sNP)
EffectType effectType() const
void makeUndoDone(Glib::ustring message)
virtual void doBeforeEffect(SPLPEItem const *lpeitem)
Is performed each time before the effect is updated.
LPEItemShapesNumbers _lpenumbers
void update_helperpath()
Call to a method on nodetool to update the helper path from the effect.
Geom::PathVector pathvector_after_effect
virtual void doEffect(SPCurve *curve)
void doOnRemove_impl(SPLPEItem const *lpeitem)
virtual void transform_multiply(Geom::Affine const &postmul, bool set)
Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
virtual void doAfterEffect(SPLPEItem const *lpeitem, SPCurve *curve)
Is performed at the end of the LPE only one time per "lpeitem" in paths/shapes is called in middle of...
std::vector< Geom::Point > selectedNodesPoints
void readallParameters(Inkscape::XML::Node const *repr)
bool _provides_knotholder_entities
bool concatenate_before_pwd2
void doOnApply_impl(SPLPEItem const *lpeitem)
void setCurrentShape(SPShape *shape)
void resetDefaultParameters()
Reset this LPE defaults.
LivePathEffectObject * getLPEObj()
virtual LPEPathFlashType pathFlashType() const
virtual Geom::PathVector doEffect_path(Geom::PathVector const &path_in)
virtual bool doOnOpen(SPLPEItem const *lpeitem)
Is performed on load document or revert If the item is fixed legacy return true.
virtual void adjustForNewPath()
bool helperLineSatellites
virtual void acceptParamPath(SPPath const *param_path)
If the effect expects a path parameter (specified by a number of mouse clicks) before it is applied,...
virtual Geom::Piecewise< Geom::D2< Geom::SBasis > > doEffect_pwd2(Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in)
Inkscape::UI::Widget::Registry wr
bool satellitestoclipboard
bool providesKnotholder() const
virtual void addKnotHolderEntities(KnotHolder *, SPItem *)
Interface for refcounted XML nodes.
KnotHolderEntity definition.
Wrapper around a Geom::PathVector object.
To do: update description of desktop.
Typed SVG document implementation.
Base class for visual SVG elements.
SVG <path> implementation.
Base class for shapes, including <path> element.
Contains forward declarations of 2geom types.
std::ostream & operator<<(std::ostream &os, const Bezier &b)
Helper class to stream background task notifications as a series of messages.
static cairo_user_data_key_t key
bool operator==(LPEItemShapesNumbers const &other) const =default
bool operator!=(LPEItemShapesNumbers other) const