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

#include <lpe-embrodery-stitch.h>

Inheritance diagram for Inkscape::LivePathEffect::LPEEmbroderyStitch:
Inkscape::LivePathEffect::Effect

Public Types

enum  order_method {
  order_method_no_reorder , order_method_zigzag , order_method_zigzag_rev_first , order_method_closest ,
  order_method_closest_rev_first , order_method_tsp_kopt_2 , order_method_tsp_kopt_3 , order_method_tsp_kopt_4 ,
  order_method_tsp_kopt_5 , order_method_count
}
 
enum  connect_method {
  connect_method_line , connect_method_move_point_from , connect_method_move_point_mid , connect_method_move_point_to ,
  connect_method_count
}
 

Public Member Functions

 LPEEmbroderyStitch (LivePathEffectObject *lpeobject)
 
 ~LPEEmbroderyStitch () override
 
Geom::PathVector doEffect_path (Geom::PathVector const &path_in) 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)
 
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
 
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 ()
 

Private Member Functions

 LPEEmbroderyStitch (const LPEEmbroderyStitch &)=delete
 
LPEEmbroderyStitchoperator= (const LPEEmbroderyStitch &)=delete
 
double GetPatternInitialStep (int pattern, int line)
 
Geom::Point GetStartPointInterpolAfterRev (std::vector< OrderingInfo > const &info, unsigned i)
 
Geom::Point GetEndPointInterpolAfterRev (std::vector< OrderingInfo > const &info, unsigned i)
 
Geom::Point GetStartPointInterpolBeforeRev (std::vector< OrderingInfo > const &info, unsigned i)
 
Geom::Point GetEndPointInterpolBeforeRev (std::vector< OrderingInfo > const &info, unsigned i)
 

Private Attributes

EnumParam< order_methodordering
 
EnumParam< connect_methodconnection
 
ScalarParam stitch_length
 
ScalarParam stitch_min_length
 
ScalarParam stitch_pattern
 
BoolParam show_stitches
 
ScalarParam show_stitch_gap
 
ScalarParam jump_if_longer
 

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)
 
- 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
 
- 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 24 of file lpe-embrodery-stitch.h.

Member Enumeration Documentation

◆ connect_method

Enumerator
connect_method_line 
connect_method_move_point_from 
connect_method_move_point_mid 
connect_method_move_point_to 
connect_method_count 

Definition at line 44 of file lpe-embrodery-stitch.h.

◆ order_method

Enumerator
order_method_no_reorder 
order_method_zigzag 
order_method_zigzag_rev_first 
order_method_closest 
order_method_closest_rev_first 
order_method_tsp_kopt_2 
order_method_tsp_kopt_3 
order_method_tsp_kopt_4 
order_method_tsp_kopt_5 
order_method_count 

Definition at line 32 of file lpe-embrodery-stitch.h.

Constructor & Destructor Documentation

◆ LPEEmbroderyStitch() [1/2]

◆ ~LPEEmbroderyStitch()

Inkscape::LivePathEffect::LPEEmbroderyStitch::~LPEEmbroderyStitch ( )
overridedefault

◆ LPEEmbroderyStitch() [2/2]

Inkscape::LivePathEffect::LPEEmbroderyStitch::LPEEmbroderyStitch ( const LPEEmbroderyStitch )
privatedelete

Member Function Documentation

◆ doEffect_path()

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

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 199 of file lpe-embrodery-stitch.cpp.

References Geom::Path::append(), Geom::arc_length_parametrization(), Geom::PathVector::back(), Geom::PathVector::begin(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingInfo::begOrig, Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingInfo::connect, Geom::distance(), Geom::Piecewise< T >::domain(), Geom::PathVector::end(), end, Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingInfo::endOrig, Inkscape::LivePathEffect::EnumParam< E >::get_value(), GetEndPointInterpolBeforeRev(), GetPatternInitialStep(), GetStartPointInterpolAfterRev(), GetStartPointInterpolBeforeRev(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingInfo::index, jump_if_longer, Geom::Piecewise< T >::lastValue(), len, Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), order_method_closest, order_method_closest_rev_first, order_method_no_reorder, order_method_tsp_kopt_2, order_method_tsp_kopt_3, order_method_tsp_kopt_4, order_method_tsp_kopt_5, order_method_zigzag, order_method_zigzag_rev_first, ordering, Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingAdvanced(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingClosest(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingOriginal(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingZigZag(), Geom::path_from_piecewise(), Geom::path_from_sbasis(), Geom::PathVector::push_back(), Geom::Piecewise< T >::push_cut(), Geom::Piecewise< T >::push_seg(), Geom::reverse(), Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingInfo::reverse, Geom::Piecewise< T >::segs, show_stitch_gap, show_stitches, Geom::PathVector::size(), stitch_length, stitch_min_length, stitch_pattern, Inkscape::LivePathEffect::LPEEmbroderyStitchOrdering::OrderingInfo::used, Geom::Piecewise< T >::valueAt(), Geom::X, and Geom::Y.

◆ GetEndPointInterpolAfterRev()

Point Inkscape::LivePathEffect::LPEEmbroderyStitch::GetEndPointInterpolAfterRev ( std::vector< OrderingInfo > const &  info,
unsigned  i 
)
private

◆ GetEndPointInterpolBeforeRev()

Point Inkscape::LivePathEffect::LPEEmbroderyStitch::GetEndPointInterpolBeforeRev ( std::vector< OrderingInfo > const &  info,
unsigned  i 
)
private

◆ GetPatternInitialStep()

double Inkscape::LivePathEffect::LPEEmbroderyStitch::GetPatternInitialStep ( int  pattern,
int  line 
)
private

Definition at line 88 of file lpe-embrodery-stitch.cpp.

Referenced by doEffect_path().

◆ GetStartPointInterpolAfterRev()

Point Inkscape::LivePathEffect::LPEEmbroderyStitch::GetStartPointInterpolAfterRev ( std::vector< OrderingInfo > const &  info,
unsigned  i 
)
private

◆ GetStartPointInterpolBeforeRev()

Point Inkscape::LivePathEffect::LPEEmbroderyStitch::GetStartPointInterpolBeforeRev ( std::vector< OrderingInfo > const &  info,
unsigned  i 
)
private

◆ operator=()

LPEEmbroderyStitch & Inkscape::LivePathEffect::LPEEmbroderyStitch::operator= ( const LPEEmbroderyStitch )
privatedelete

Member Data Documentation

◆ connection

EnumParam<connect_method> Inkscape::LivePathEffect::LPEEmbroderyStitch::connection
private

◆ jump_if_longer

ScalarParam Inkscape::LivePathEffect::LPEEmbroderyStitch::jump_if_longer
private

Definition at line 60 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().

◆ ordering

EnumParam<order_method> Inkscape::LivePathEffect::LPEEmbroderyStitch::ordering
private

Definition at line 53 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().

◆ show_stitch_gap

ScalarParam Inkscape::LivePathEffect::LPEEmbroderyStitch::show_stitch_gap
private

Definition at line 59 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().

◆ show_stitches

BoolParam Inkscape::LivePathEffect::LPEEmbroderyStitch::show_stitches
private

Definition at line 58 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().

◆ stitch_length

ScalarParam Inkscape::LivePathEffect::LPEEmbroderyStitch::stitch_length
private

Definition at line 55 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().

◆ stitch_min_length

ScalarParam Inkscape::LivePathEffect::LPEEmbroderyStitch::stitch_min_length
private

Definition at line 56 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().

◆ stitch_pattern

ScalarParam Inkscape::LivePathEffect::LPEEmbroderyStitch::stitch_pattern
private

Definition at line 57 of file lpe-embrodery-stitch.h.

Referenced by doEffect_path(), and LPEEmbroderyStitch().


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