Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
Inkscape::LivePathEffect::LPEPowerStroke Class Reference

#include <lpe-powerstroke.h>

Inheritance diagram for Inkscape::LivePathEffect::LPEPowerStroke:
Inkscape::LivePathEffect::Effect

Public Member Functions

 LPEPowerStroke (LivePathEffectObject *lpeobject)
 
 ~LPEPowerStroke () override
 
 LPEPowerStroke (const LPEPowerStroke &)=delete
 
LPEPowerStrokeoperator= (const LPEPowerStroke &)=delete
 
Geom::PathVector doEffect_path (Geom::PathVector const &path_in) override
 
void doBeforeEffect (SPLPEItem const *lpeItem) override
 Is performed each time before the effect is updated.
 
void doOnApply (SPLPEItem const *lpeitem) override
 Is performed a single time when the effect is freshly applied to a path.
 
void doOnRemove (SPLPEItem const *lpeitem) override
 
void doAfterEffect (SPLPEItem const *lpeitem, Geom::PathVector *curve) override
 Is performed at the end of the LPE only one time per "lpeitem" in paths/shapes is called in middle of the effect so we add the "curve" param to allow updates in the LPE results at this stage for groups dont need to send "curve" parameter because is applied when the LPE process finish, we can update LPE results without "curve" parameter.
 
void transform_multiply (Geom::Affine const &postmul, bool set) override
 Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
 
void applyStyle (SPLPEItem *lpeitem)
 
void adjustForNewPath () override
 
- Public Member Functions inherited from Inkscape::LivePathEffect::Effect
virtual ~Effect ()
 
 Effect (const Effect &)=delete
 
Effectoperator= (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)
 
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
 
SPShapegetCurrentShape () 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::PathVectorgetCanvasIndicators (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::NodegetRepr ()
 
SPDocumentgetSPDoc ()
 
LivePathEffectObjectgetLPEObj ()
 
LivePathEffectObject const * getLPEObj () const
 
ParametergetParameter (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

PowerStrokePointArrayParam offset_points
 
BoolParam not_jump
 
bool knotdragging = false
 
- Public Attributes inherited from Inkscape::LivePathEffect::Effect
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
 
SPLPEItemsp_lpe_item = nullptr
 
SPShapecurrent_shape
 
std::vector< Parameter * > param_vector
 

Private Attributes

BoolParam sort_points
 
EnumParam< unsigned > interpolator_type
 
ScalarParam interpolator_beta
 
ScalarParam scale_width
 
EnumParam< unsigned > start_linecap_type
 
EnumParam< unsigned > linejoin_type
 
ScalarParam miter_limit
 
EnumParam< unsigned > end_linecap_type
 
size_t recusion_limit
 
bool has_recursion
 
Geom::PathVector path_out_prev
 
MessageParam message
 

Additional Inherited Members

- Static Public Member Functions inherited from Inkscape::LivePathEffect::Effect
static EffectNew (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)
 
- Protected Member Functions inherited from Inkscape::LivePathEffect::Effect
 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)
 
ParametergetNextOncanvasEditableParam ()
 
virtual void addKnotHolderEntities (KnotHolder *, SPItem *)
 
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 function should be overwritten by derived effects if they want to provide their own helperpaths.
 
- Protected Attributes inherited from Inkscape::LivePathEffect::Effect
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::PointselectedNodesPoints
 
Inkscape::UI::Widget::Registry wr
 

Detailed Description

Definition at line 36 of file lpe-powerstroke.h.

Constructor & Destructor Documentation

◆ LPEPowerStroke() [1/2]

◆ ~LPEPowerStroke()

Inkscape::LivePathEffect::LPEPowerStroke::~LPEPowerStroke ( )
overridedefault

◆ LPEPowerStroke() [2/2]

Inkscape::LivePathEffect::LPEPowerStroke::LPEPowerStroke ( const LPEPowerStroke )
delete

Member Function Documentation

◆ adjustForNewPath()

void Inkscape::LivePathEffect::LPEPowerStroke::adjustForNewPath ( )
overridevirtual

◆ applyStyle()

void Inkscape::LivePathEffect::LPEPowerStroke::applyStyle ( SPLPEItem lpeitem)

◆ doAfterEffect()

void Inkscape::LivePathEffect::LPEPowerStroke::doAfterEffect ( SPLPEItem const *  lpeitem,
Geom::PathVector curve 
)
overridevirtual

Is performed at the end of the LPE only one time per "lpeitem" in paths/shapes is called in middle of the effect so we add the "curve" param to allow updates in the LPE results at this stage for groups dont need to send "curve" parameter because is applied when the LPE process finish, we can update LPE results without "curve" parameter.

Parameters
lpeitemthe element that has this LPE
curvethe curve to pass when in mode path or shape

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 912 of file lpe-powerstroke.cpp.

References LivePathEffectObject::get_lpe(), SPLPEItem::getFirstPathEffectOfType(), Inkscape::LivePathEffect::Effect::getLPEObj(), has_recursion, Inkscape::LivePathEffect::ScalarParam::param_set_value(), Inkscape::LivePathEffect::Effect::pathvector_after_effect, Inkscape::LivePathEffect::Effect::pathvector_before_effect, recusion_limit, Inkscape::LivePathEffect::SIMPLIFY, Inkscape::size, Inkscape::LivePathEffect::Effect::sp_lpe_item, Inkscape::LivePathEffect::LPESimplify::threshold, and Inkscape::LivePathEffect::Parameter::write_to_SVG().

◆ doBeforeEffect()

void Inkscape::LivePathEffect::LPEPowerStroke::doBeforeEffect ( SPLPEItem const *  lpeitem)
overridevirtual

Is performed each time before the effect is updated.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 201 of file lpe-powerstroke.cpp.

References adjustForNewPath(), has_recursion, offset_points, scale_width, and Inkscape::LivePathEffect::PowerStrokePointArrayParam::set_scale_width().

◆ doEffect_path()

Geom::PathVector Inkscape::LivePathEffect::LPEPowerStroke::doEffect_path ( Geom::PathVector const &  path_in)
overridevirtual

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 589 of file lpe-powerstroke.cpp.

References Inkscape::LivePathEffect::Effect::_adjust_path, Geom::Path::append(), Geom::Path::appendNew(), Geom::PathVector::clear(), Geom::Path::close(), Inkscape::LivePathEffect::compare_offsets(), Geom::compose(), count_pathvector_curves(), Geom::Interpolate::Interpolator::create(), Inkscape::LivePathEffect::PowerStrokePointArrayParam::current_path, Geom::Path::curveAt(), Inkscape::LivePathEffect::ArrayParam< StorageType >::data(), Geom::derivative(), Geom::distance(), Geom::Piecewise< T >::domain(), Geom::PathVector::empty(), Geom::Piecewise< T >::empty(), end, end_linecap_type, Geom::Path::finalPoint(), Geom::Piecewise< T >::firstValue(), Inkscape::LivePathEffect::EnumParam< E >::get_value(), Geom::Path::initialPoint(), Geom::Interpolate::Interpolator::interpolateToPath(), interpolator_beta, interpolator_type, knotdragging, Geom::Piecewise< T >::lastValue(), Geom::Curve::length(), Geom::length(), Inkscape::LivePathEffect::LINECAP_BUTT, Inkscape::LivePathEffect::LINECAP_PEAK, Inkscape::LivePathEffect::LINECAP_ROUND, Inkscape::LivePathEffect::LINECAP_SQUARE, Inkscape::LivePathEffect::LINECAP_ZERO_WIDTH, linejoin_type, Inkscape::LivePathEffect::Effect::lpeversion, Geom::make_cuts_independent(), Geom::GenericInterval< C >::max(), Geom::max(), Geom::middle_point(), Geom::GenericInterval< C >::min(), Geom::min(), miter_limit, Geom::nearest_time(), offset_points, Inkscape::LivePathEffect::HiddenParam::param_getSVGValue(), Inkscape::LivePathEffect::path_from_piecewise_fix_cusps(), path_out_prev, Geom::paths_to_pw(), pathv_to_linear_and_cubic_beziers(), Geom::Path::pointAt(), Geom::portion(), Geom::Path::portion(), Geom::PathVector::push_back(), Inkscape::LivePathEffect::PowerStrokePointArrayParam::recalculate_controlpoints(), Geom::reverse(), Geom::roots(), Geom::rot90(), scale_width, Geom::Piecewise< T >::segs, Inkscape::LivePathEffect::PowerStrokePointArrayParam::set_pwd2(), Geom::sign(), Geom::PathVector::size(), Geom::Path::size_open(), smooth, sort_points, start, start_linecap_type, Geom::Path::toPwSb(), Geom::unitTangentAt(), Geom::unitVector(), Inkscape::LivePathEffect::PowerStrokePointArrayParam::unplaced, Geom::X, and Geom::Y.

◆ doOnApply()

◆ doOnRemove()

void Inkscape::LivePathEffect::LPEPowerStroke::doOnRemove ( SPLPEItem const *  lpeitem)
overridevirtual

◆ operator=()

LPEPowerStroke & Inkscape::LivePathEffect::LPEPowerStroke::operator= ( const LPEPowerStroke )
delete

◆ transform_multiply()

void Inkscape::LivePathEffect::LPEPowerStroke::transform_multiply ( Geom::Affine const &  postmul,
bool  set 
)
overridevirtual

Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 905 of file lpe-powerstroke.cpp.

References offset_points, Inkscape::LivePathEffect::PowerStrokePointArrayParam::param_transform_multiply(), Inkscape::LivePathEffect::Effect::sp_lpe_item, and SPItem::unoptimized().

Member Data Documentation

◆ end_linecap_type

EnumParam<unsigned> Inkscape::LivePathEffect::LPEPowerStroke::end_linecap_type
private

Definition at line 64 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().

◆ has_recursion

bool Inkscape::LivePathEffect::LPEPowerStroke::has_recursion
private

Definition at line 66 of file lpe-powerstroke.h.

Referenced by doAfterEffect(), doBeforeEffect(), and LPEPowerStroke().

◆ interpolator_beta

ScalarParam Inkscape::LivePathEffect::LPEPowerStroke::interpolator_beta
private

Definition at line 59 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().

◆ interpolator_type

EnumParam<unsigned> Inkscape::LivePathEffect::LPEPowerStroke::interpolator_type
private

Definition at line 58 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().

◆ knotdragging

bool Inkscape::LivePathEffect::LPEPowerStroke::knotdragging = false

◆ linejoin_type

EnumParam<unsigned> Inkscape::LivePathEffect::LPEPowerStroke::linejoin_type
private

Definition at line 62 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().

◆ message

MessageParam Inkscape::LivePathEffect::LPEPowerStroke::message
private

Definition at line 68 of file lpe-powerstroke.h.

Referenced by LPEPowerStroke().

◆ miter_limit

ScalarParam Inkscape::LivePathEffect::LPEPowerStroke::miter_limit
private

Definition at line 63 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().

◆ not_jump

BoolParam Inkscape::LivePathEffect::LPEPowerStroke::not_jump

◆ offset_points

◆ path_out_prev

Geom::PathVector Inkscape::LivePathEffect::LPEPowerStroke::path_out_prev
private

Definition at line 67 of file lpe-powerstroke.h.

Referenced by doEffect_path().

◆ recusion_limit

size_t Inkscape::LivePathEffect::LPEPowerStroke::recusion_limit
private

Definition at line 65 of file lpe-powerstroke.h.

Referenced by doAfterEffect(), and LPEPowerStroke().

◆ scale_width

ScalarParam Inkscape::LivePathEffect::LPEPowerStroke::scale_width
private

Definition at line 60 of file lpe-powerstroke.h.

Referenced by doBeforeEffect(), doEffect_path(), doOnApply(), and LPEPowerStroke().

◆ sort_points

BoolParam Inkscape::LivePathEffect::LPEPowerStroke::sort_points
private

Definition at line 57 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().

◆ start_linecap_type

EnumParam<unsigned> Inkscape::LivePathEffect::LPEPowerStroke::start_linecap_type
private

Definition at line 61 of file lpe-powerstroke.h.

Referenced by doEffect_path(), and LPEPowerStroke().


The documentation for this class was generated from the following files: