Inkscape
Vector Graphics Editor
|
#include <lpe-bspline.h>
Public Member Functions | |
LPEBSpline (LivePathEffectObject *lpeobject) | |
~LPEBSpline () override | |
LPEBSpline (const LPEBSpline &)=delete | |
LPEBSpline & | operator= (const LPEBSpline &)=delete |
LPEPathFlashType | pathFlashType () const override |
void | doOnApply (SPLPEItem const *lpeitem) override |
Is performed a single time when the effect is freshly applied to a path. | |
void | doEffect (Geom::PathVector &curve) override |
void | doBeforeEffect (SPLPEItem const *lpeitem) override |
Is performed each time before the effect is updated. | |
void | doBSplineFromWidget (Geom::PathVector &curve, double value) |
void | addCanvasIndicators (SPLPEItem const *, std::vector< Geom::PathVector > &hp_vec) override |
Add possible canvas indicators (i.e., helperpaths other than the original path) to hp_vec This function should be overwritten by derived effects if they want to provide their own helperpaths. | |
Gtk::Widget * | newWidget () override |
This creates a managed widget. | |
void | changeWeight (double weightValue) |
void | toDefaultWeight () |
void | toMakeCusp () |
void | toWeight () |
![]() | |
virtual | ~Effect () |
Effect (const Effect &)=delete | |
Effect & | operator= (const Effect &)=delete |
EffectType | effectType () const |
void | doAfterEffect_impl (SPLPEItem const *lpeitem, Geom::PathVector *curve) |
void | doOnApply_impl (SPLPEItem const *lpeitem) |
void | doBeforeEffect_impl (SPLPEItem const *lpeitem) |
void | doOnOpen_impl () |
Is performed on document open allow things like fix legacy LPE in a undo insensitive way. | |
void | doOnRemove_impl (SPLPEItem const *lpeitem) |
void | transform_multiply_impl (Geom::Affine const &postmul, SPLPEItem *) |
void | doOnBeforeCommit () |
void | read_from_SVG () |
void | setCurrentZoom (double cZ) |
void | setSelectedNodePoints (std::vector< Geom::Point > sNP) |
bool | isNodePointSelected (Geom::Point const &nodePoint) const |
bool | isOnClipboard () |
The lpe is on clipboard. | |
std::vector< SPLPEItem * > | getCurrrentLPEItems () const |
void | update_satellites () |
virtual void | doOnException (SPLPEItem const *lpeitem) |
virtual void | doOnVisibilityToggled (SPLPEItem const *lpeitem) |
virtual void | adjustForNewPath () |
void | writeParamsToSVG () |
std::vector< SPObject * > | effect_get_satellites (bool force=true) |
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, this is the method that processes the resulting path. | |
int | acceptsNumClicks () const |
SPShape * | getCurrentShape () const |
void | setCurrentShape (SPShape *shape) |
virtual void | processObjects (LPEAction lpe_action) |
void | makeUndoDone (Glib::ustring message) |
bool | isReady () const |
void | setReady (bool ready=true) |
virtual void | resetDefaults (SPItem const *item) |
Sets all parameters to their default values and writes them to SVG. | |
bool | providesKnotholder () const |
void | addHandles (KnotHolder *knotholder, SPItem *item) |
Add all registered LPE knotholder handles to the knotholder. | |
std::vector< Geom::PathVector > | getCanvasIndicators (SPLPEItem const *lpeitem) |
Return a vector of PathVectors which contain all canvas indicators for this effect. | |
void | update_helperpath () |
Call to a method on nodetool to update the helper path from the effect. | |
bool | providesOwnFlashPaths () const |
bool | showOrigPath () const |
Glib::ustring | getName () const |
Inkscape::XML::Node * | getRepr () |
SPDocument * | getSPDoc () |
LivePathEffectObject * | getLPEObj () |
LivePathEffectObject const * | getLPEObj () const |
Parameter * | getParameter (const char *key) |
void | readallParameters (Inkscape::XML::Node const *repr) |
void | setParameter (const gchar *key, const gchar *new_value) |
bool | isVisible () const |
void | editNextParamOncanvas (SPItem *item, SPDesktop *desktop) |
void | setLPEAction (LPEAction lpe_action) |
void | setDefaultParameters () |
Set this LPE defaults. | |
void | resetDefaultParameters () |
Reset this LPE defaults. | |
bool | hasDefaultParameters () |
Get LPE has defaults. | |
virtual bool | getHolderRemove () |
Public Attributes | |
ScalarParam | steps |
BoolParam | uniform |
![]() | |
bool | has_exception |
bool | apply_to_clippath_and_mask |
bool | keep_paths |
bool | is_load |
bool | is_applied |
bool | on_remove_all |
bool | refresh_widgets |
bool | finishiddle = false |
bool | satellitestoclipboard = false |
bool | helperLineSatellites = false |
gint | spinbutton_width_chars = 7 |
BoolParam | is_visible |
HiddenParam | lpeversion |
Geom::PathVector | pathvector_before_effect |
Geom::PathVector | pathvector_after_effect |
SPLPEItem * | sp_lpe_item = nullptr |
SPShape * | current_shape |
std::vector< Parameter * > | param_vector |
Private Attributes | |
ScalarParam | helper_size |
BoolParam | apply_no_weight |
BoolParam | apply_with_weight |
BoolParam | only_selected |
ScalarParam | weight |
Geom::PathVector | hp |
Definition at line 17 of file lpe-bspline.h.
Inkscape::LivePathEffect::LPEBSpline::LPEBSpline | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 33 of file lpe-bspline.cpp.
References apply_no_weight, apply_with_weight, helper_size, Inkscape::LivePathEffect::NO_POWER, only_selected, Inkscape::LivePathEffect::ScalarParam::param_set_digits(), Inkscape::LivePathEffect::ScalarParam::param_set_increments(), Inkscape::LivePathEffect::ScalarParam::param_set_range(), Inkscape::LivePathEffect::Effect::registerParameter(), steps, uniform, and weight.
|
overridedefault |
|
delete |
|
overridevirtual |
Add possible canvas indicators (i.e., helperpaths other than the original path) to hp_vec This function should be overwritten by derived effects if they want to provide their own helperpaths.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 84 of file lpe-bspline.cpp.
References hp.
void Inkscape::LivePathEffect::LPEBSpline::changeWeight | ( | double | weightValue | ) |
Definition at line 157 of file lpe-bspline.cpp.
References doBSplineFromWidget(), Inkscape::LivePathEffect::Effect::sp_lpe_item, and sp_svg_write_path().
Referenced by toDefaultWeight(), toMakeCusp(), and toWeight().
|
overridevirtual |
Is performed each time before the effect is updated.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 66 of file lpe-bspline.cpp.
References Geom::PathVector::clear(), Geom::PathVector::empty(), and hp.
void Inkscape::LivePathEffect::LPEBSpline::doBSplineFromWidget | ( | Geom::PathVector & | curve, |
double | value | ||
) |
Definition at line 349 of file lpe-bspline.cpp.
References apply_no_weight, apply_with_weight, Geom::are_near(), Inkscape::LivePathEffect::BSPLINE_TOL, closepath_current(), Geom::Curve::finalPoint(), Geom::Curve::initialPoint(), Inkscape::LivePathEffect::Effect::isNodePointSelected(), move_endpoints(), Inkscape::LivePathEffect::NO_POWER, only_selected, Geom::X, and Geom::Y.
Referenced by changeWeight().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 167 of file lpe-bspline.cpp.
References helper_size, hp, Inkscape::LivePathEffect::sp_bspline_do_effect(), and uniform.
|
overridevirtual |
Is performed a single time when the effect is freshly applied to a path.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 73 of file lpe-bspline.cpp.
References item, Inkscape::LivePathEffect::Effect::lpeversion, and Inkscape::LivePathEffect::HiddenParam::param_setValue().
|
overridevirtual |
This creates a managed widget.
Deletion should be done by the eventual parent, or otherwise the caller.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 89 of file lpe-bspline.cpp.
References Inkscape::UI::pack_start(), Inkscape::LivePathEffect::Effect::param_vector, Inkscape::UI::Widget::Scalar::signal_value_changed(), toDefaultWeight(), toMakeCusp(), and toWeight().
|
delete |
|
inlineoverridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 24 of file lpe-bspline.h.
References Inkscape::LivePathEffect::SUPPRESS_FLASH.
void Inkscape::LivePathEffect::LPEBSpline::toDefaultWeight | ( | ) |
Definition at line 136 of file lpe-bspline.cpp.
References changeWeight(), Inkscape::LivePathEffect::DEFAULT_START_POWER, Inkscape::LivePathEffect::Effect::makeUndoDone(), Inkscape::LivePathEffect::Effect::sp_lpe_item, and sp_lpe_item_update_patheffect().
Referenced by newWidget().
void Inkscape::LivePathEffect::LPEBSpline::toMakeCusp | ( | ) |
Definition at line 143 of file lpe-bspline.cpp.
References changeWeight(), Inkscape::LivePathEffect::Effect::makeUndoDone(), Inkscape::LivePathEffect::NO_POWER, Inkscape::LivePathEffect::Effect::sp_lpe_item, and sp_lpe_item_update_patheffect().
Referenced by newWidget().
void Inkscape::LivePathEffect::LPEBSpline::toWeight | ( | ) |
Definition at line 150 of file lpe-bspline.cpp.
References changeWeight(), Inkscape::LivePathEffect::Effect::makeUndoDone(), Inkscape::LivePathEffect::Effect::sp_lpe_item, sp_lpe_item_update_patheffect(), and weight.
Referenced by newWidget().
|
private |
Definition at line 45 of file lpe-bspline.h.
Referenced by doBSplineFromWidget(), and LPEBSpline().
|
private |
Definition at line 46 of file lpe-bspline.h.
Referenced by doBSplineFromWidget(), and LPEBSpline().
|
private |
Definition at line 44 of file lpe-bspline.h.
Referenced by doEffect(), and LPEBSpline().
|
private |
Definition at line 49 of file lpe-bspline.h.
Referenced by addCanvasIndicators(), doBeforeEffect(), and doEffect().
|
private |
Definition at line 47 of file lpe-bspline.h.
Referenced by doBSplineFromWidget(), and LPEBSpline().
ScalarParam Inkscape::LivePathEffect::LPEBSpline::steps |
Definition at line 40 of file lpe-bspline.h.
Referenced by Inkscape::UI::PathManipulator::_bsplineGetSteps(), and LPEBSpline().
BoolParam Inkscape::LivePathEffect::LPEBSpline::uniform |
Definition at line 41 of file lpe-bspline.h.
Referenced by doEffect(), and LPEBSpline().
|
private |
Definition at line 48 of file lpe-bspline.h.
Referenced by LPEBSpline(), and toWeight().