Inkscape
Vector Graphics Editor
|
#include <lpe-knot.h>
Public Member Functions | |
LPEKnot (LivePathEffectObject *lpeobject) | |
~LPEKnot () override | |
void | doBeforeEffect (SPLPEItem const *lpeitem) override |
Is performed each time before the effect is updated. | |
Geom::PathVector | doEffect_path (Geom::PathVector const &input_path) override |
void | addKnotHolderEntities (KnotHolder *knotholder, SPItem *item) override |
![]() | |
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 | doEffect (Geom::PathVector &curve) |
virtual Gtk::Widget * | newWidget () |
This creates a managed widget. | |
virtual void | resetDefaults (SPItem const *item) |
Sets all parameters to their default values and writes them to SVG. | |
bool | providesKnotholder () const |
virtual LPEPathFlashType | pathFlashType () 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 () |
Protected Member Functions | |
void | addCanvasIndicators (SPLPEItem const *lpeitem, 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. | |
![]() | |
Effect (LivePathEffectObject *lpeobject) | |
virtual Geom::Piecewise< Geom::D2< Geom::SBasis > > | doEffect_pwd2 (Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in) |
void | registerParameter (Parameter *param) |
Parameter * | getNextOncanvasEditableParam () |
Protected Attributes | |
Geom::PathVector | supplied_path |
![]() | |
bool | _adjust_path = false |
bool | _provides_knotholder_entities |
bool | _provides_path_adjustment = false |
LPEAction | _lpe_action = LPE_NONE |
int | oncanvasedit_it |
bool | show_orig_path |
bool | concatenate_before_pwd2 |
double | current_zoom |
std::vector< Geom::Point > | selectedNodesPoints |
Inkscape::UI::Widget::Registry | wr |
Private Member Functions | |
void | updateSwitcher () |
LPEKnot (const LPEKnot &)=delete | |
LPEKnot & | operator= (const LPEKnot &)=delete |
![]() | |
Geom::OptRect | clip_mask_bbox (SPLPEItem *item, Geom::Affine transform) |
Updates the boundingbox_X and boundingbox_Y values from the geometric bounding box of lpeitem . | |
void | original_bbox (SPLPEItem const *lpeitem, bool absolute=false, bool clip_mask=false, Geom::Affine base_transform=Geom::identity()) |
Private Attributes | |
ScalarParam | interruption_width |
BoolParam | prop_to_stroke_width |
BoolParam | both |
BoolParam | inverse_width |
HiddenParam | add_stroke_width |
HiddenParam | add_other_stroke_width |
ScalarParam | switcher_size |
ArrayParam< double > | crossing_points_vector |
LPEKnotNS::CrossingPoints | crossing_points |
Geom::PathVector | gpaths |
std::vector< double > | gstroke_widths |
unsigned | selectedCrossing |
Geom::Point | switcher |
![]() | |
Geom::Interval | boundingbox_X |
Geom::Interval | boundingbox_Y |
Friends | |
class | KnotHolderEntityCrossingSwitcher |
Additional Inherited Members | |
![]() | |
static Effect * | New (EffectType lpenr, LivePathEffectObject *lpeobj) |
static void | createAndApply (const char *name, SPDocument *doc, SPItem *item) |
static void | createAndApply (EffectType type, SPDocument *doc, SPItem *item) |
static int | acceptsNumClicks (EffectType type) |
![]() | |
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 |
Definition at line 58 of file lpe-knot.h.
Inkscape::LivePathEffect::LPEKnot::LPEKnot | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 345 of file lpe-knot.cpp.
References Inkscape::LivePathEffect::Effect::_provides_knotholder_entities, add_other_stroke_width, add_stroke_width, both, crossing_points_vector, interruption_width, inverse_width, prop_to_stroke_width, Inkscape::LivePathEffect::Effect::registerParameter(), and switcher_size.
|
overridedefault |
|
privatedelete |
|
overrideprotectedvirtual |
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 632 of file lpe-knot.cpp.
References crossing_points, selectedCrossing, Geom::sign(), sp_svg_read_pathv(), switcher, and switcher_size.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 653 of file lpe-knot.cpp.
References KnotHolder::add(), Inkscape::CANVAS_ITEM_CTRL_TYPE_LPE, KnotHolderEntity::create(), item, and KnotHolderEntityCrossingSwitcher.
|
overridevirtual |
Is performed each time before the effect is updated.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 567 of file lpe-knot.cpp.
References Geom::PathVector::clear(), Inkscape::LivePathEffect::collectPathsAndWidths(), crossing_points, crossing_points_vector, Inkscape::LivePathEffect::ArrayParam< StorageType >::data(), gpaths, gstroke_widths, Inkscape::LivePathEffect::LPEKnotNS::CrossingPoints::inherit_signs(), Inkscape::LivePathEffect::GroupBBoxEffect::original_bbox(), Inkscape::LivePathEffect::ArrayParam< StorageType >::param_setValue(), supplied_path, Inkscape::LivePathEffect::LPEKnotNS::CrossingPoints::to_vector(), and updateSwitcher().
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 401 of file lpe-knot.cpp.
References add_other_stroke_width, add_stroke_width, Geom::Path::append(), Geom::PathVector::at(), both, Inkscape::LivePathEffect::complementOf(), Geom::cross(), crossing_points, Inkscape::LivePathEffect::findShadowedTime(), Inkscape::Preferences::get(), Inkscape::LivePathEffect::BoolParam::get_value(), Inkscape::LivePathEffect::HiddenParam::get_value(), Inkscape::Preferences::getInt(), gpaths, gstroke_widths, interruption_width, inverse_width, Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), pathv_to_linear_and_cubic_beziers(), Geom::portion(), prop_to_stroke_width, Geom::PathVector::push_back(), Inkscape::Preferences::setInt(), Geom::Path::setStitching(), Geom::PathVector::size(), Inkscape::LivePathEffect::size_nondegenerate(), sp_svg_write_path(), and width.
|
private |
Definition at line 386 of file lpe-knot.cpp.
References crossing_points, Geom::infinity(), selectedCrossing, and switcher.
Referenced by doBeforeEffect().
|
friend |
Definition at line 67 of file lpe-knot.h.
Referenced by addKnotHolderEntities().
|
private |
Definition at line 84 of file lpe-knot.h.
Referenced by doEffect_path(), and LPEKnot().
|
private |
Definition at line 83 of file lpe-knot.h.
Referenced by doEffect_path(), and LPEKnot().
|
private |
Definition at line 79 of file lpe-knot.h.
Referenced by doEffect_path(), and LPEKnot().
|
private |
Definition at line 88 of file lpe-knot.h.
Referenced by addCanvasIndicators(), doBeforeEffect(), doEffect_path(), and updateSwitcher().
|
private |
Definition at line 86 of file lpe-knot.h.
Referenced by doBeforeEffect(), and LPEKnot().
|
private |
Definition at line 90 of file lpe-knot.h.
Referenced by doBeforeEffect(), and doEffect_path().
|
private |
Definition at line 91 of file lpe-knot.h.
Referenced by doBeforeEffect(), and doEffect_path().
|
private |
Definition at line 77 of file lpe-knot.h.
Referenced by doEffect_path(), and LPEKnot().
|
private |
Definition at line 80 of file lpe-knot.h.
Referenced by doEffect_path(), and LPEKnot().
|
private |
Definition at line 78 of file lpe-knot.h.
Referenced by doEffect_path(), and LPEKnot().
|
private |
Definition at line 94 of file lpe-knot.h.
Referenced by addCanvasIndicators(), and updateSwitcher().
|
protected |
Definition at line 72 of file lpe-knot.h.
Referenced by doBeforeEffect().
|
private |
Definition at line 95 of file lpe-knot.h.
Referenced by addCanvasIndicators(), and updateSwitcher().
|
private |
Definition at line 85 of file lpe-knot.h.
Referenced by addCanvasIndicators(), and LPEKnot().