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

#include <lpe-taperstroke.h>

Inheritance diagram for Inkscape::LivePathEffect::LPETaperStroke:
Inkscape::LivePathEffect::Effect

Public Member Functions

 LPETaperStroke (LivePathEffectObject *lpeobject)
 
 ~LPETaperStroke () override
 
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 doBeforeEffect (SPLPEItem const *lpeitem) override
 Is performed each time before the effect is updated.
 
Geom::PathVector doEffect_path (Geom::PathVector const &path_in) override
 
Geom::PathVector doEffect_simplePath (Geom::Path const &path, size_t index, double start, double end)
 
void transform_multiply (Geom::Affine const &postmul, bool set) override
 Overridden function to apply transforms for example to powerstroke, jointtype or tapperstroke.
 
void addKnotHolderEntities (KnotHolder *knotholder, SPItem *item) 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 ()
 

Protected Attributes

ScalarArrayParam attach_start
 
ScalarArrayParam attach_end
 
ScalarArrayParam start_smoothing
 
ScalarArrayParam end_smoothing
 
- 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
 

Private Member Functions

 LPETaperStroke (const LPETaperStroke &)=delete
 
LPETaperStrokeoperator= (const LPETaperStroke &)=delete
 

Private Attributes

ScalarParam subpath
 
ScalarParam line_width
 
EnumParam< unsigned > join_type
 
EnumArrayParam start_shape
 
EnumArrayParam end_shape
 
ScalarParam miter_limit
 
size_t previous_size = 1
 
std::vector< Geom::Pointstart_attach_point
 
std::vector< Geom::Pointend_attach_point
 
size_t prev_subpath = Glib::ustring::npos
 
Geom::PathVector pathv_out
 

Friends

class TpS::KnotHolderEntityAttachBegin
 
class TpS::KnotHolderEntityAttachEnd
 

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 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.
 

Detailed Description

Definition at line 30 of file lpe-taperstroke.h.

Constructor & Destructor Documentation

◆ LPETaperStroke() [1/2]

◆ ~LPETaperStroke()

Inkscape::LivePathEffect::LPETaperStroke::~LPETaperStroke ( )
overridedefault

◆ LPETaperStroke() [2/2]

Inkscape::LivePathEffect::LPETaperStroke::LPETaperStroke ( const LPETaperStroke )
privatedelete

Member Function Documentation

◆ addKnotHolderEntities()

void Inkscape::LivePathEffect::LPETaperStroke::addKnotHolderEntities ( KnotHolder knotholder,
SPItem item 
)
overridevirtual

◆ doBeforeEffect()

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

Is performed each time before the effect is updated.

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 337 of file lpe-taperstroke.cpp.

References Inkscape::LivePathEffect::ArrayParam< StorageType >::_vector, Geom::Path::append(), Geom::Path::appendNew(), Geom::are_near(), attach_end, attach_start, Geom::PathVector::clear(), Geom::Path::close(), Geom::Piecewise< T >::concat(), Inkscape::LivePathEffect::ArrayParam< StorageType >::data(), doEffect_simplePath(), Geom::PathVector::empty(), end_attach_point, end_shape, end_smoothing, Geom::Path::finalPoint(), Inkscape::Util::EnumDataConverter< E >::get_id_from_key(), Inkscape::LivePathEffect::EnumParam< E >::get_value(), Inkscape::half_outline(), index, Geom::Path::initialPoint(), Inkscape::LivePathEffect::Effect::is_load, join_type, line_width, miter_limit, Inkscape::LivePathEffect::ScalarParam::param_readSVGValue(), Inkscape::LivePathEffect::ArrayParam< StorageType >::param_set_and_write_new_value(), Inkscape::LivePathEffect::EnumArrayParam::param_set_default(), Inkscape::LivePathEffect::ScalarArrayParam::param_set_default(), Inkscape::LivePathEffect::ScalarParam::param_set_range(), Inkscape::LivePathEffect::EnumArrayParam::param_setActive(), Inkscape::LivePathEffect::ScalarArrayParam::param_setActive(), Geom::path_from_piecewise(), pathv_out, pathv_to_linear_and_cubic_beziers(), Inkscape::LivePathEffect::Effect::pathvector_before_effect, prev_subpath, previous_size, Geom::PathVector::push_back(), Inkscape::LivePathEffect::Effect::refresh_widgets, Inkscape::LivePathEffect::return_at_first_cusp(), Geom::Path::setFinal(), Geom::Path::size(), Geom::PathVector::size(), Inkscape::size, sp_svg_read_pathv(), start_attach_point, start_shape, start_smoothing, Inkscape::LivePathEffect::stretch_along(), subpath, Inkscape::LivePathEffect::TAPER_CLAMP, Inkscape::LivePathEffect::TAPER_LEFT, Inkscape::LivePathEffect::TAPER_RIGHT, Inkscape::LivePathEffect::TaperShapeTypeConverter(), Inkscape::LivePathEffect::ArrayParam< StorageType >::valid_index(), and withinRange().

◆ doEffect_path()

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

Reimplemented from Inkscape::LivePathEffect::Effect.

Definition at line 230 of file lpe-taperstroke.cpp.

References pathv_out.

◆ doEffect_simplePath()

Geom::PathVector Inkscape::LivePathEffect::LPETaperStroke::doEffect_simplePath ( Geom::Path const &  path,
size_t  index,
double  start,
double  end 
)
Returns
Always returns a PathVector with three elements.

The positions of the effect knots are accessed to determine where exactly the input path should be split.

Definition at line 241 of file lpe-taperstroke.cpp.

References end, Geom::Path::portion(), Geom::PathVector::push_back(), Geom::Path::size(), and start.

Referenced by doBeforeEffect().

◆ doOnApply()

◆ doOnRemove()

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

◆ operator=()

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

◆ transform_multiply()

void Inkscape::LivePathEffect::LPETaperStroke::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 157 of file lpe-taperstroke.cpp.

References Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), line_width, Inkscape::LivePathEffect::ScalarParam::param_transform_multiply(), Inkscape::LivePathEffect::Effect::sp_lpe_item, and SPItem::unoptimized().

Friends And Related Symbol Documentation

◆ TpS::KnotHolderEntityAttachBegin

friend class TpS::KnotHolderEntityAttachBegin
friend

Definition at line 44 of file lpe-taperstroke.h.

Referenced by addKnotHolderEntities().

◆ TpS::KnotHolderEntityAttachEnd

friend class TpS::KnotHolderEntityAttachEnd
friend

Definition at line 45 of file lpe-taperstroke.h.

Referenced by addKnotHolderEntities().

Member Data Documentation

◆ attach_end

ScalarArrayParam Inkscape::LivePathEffect::LPETaperStroke::attach_end
protected

Definition at line 47 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ attach_start

ScalarArrayParam Inkscape::LivePathEffect::LPETaperStroke::attach_start
protected

Definition at line 46 of file lpe-taperstroke.h.

Referenced by addKnotHolderEntities(), doBeforeEffect(), and LPETaperStroke().

◆ end_attach_point

std::vector<Geom::Point> Inkscape::LivePathEffect::LPETaperStroke::end_attach_point
private

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

Referenced by doBeforeEffect().

◆ end_shape

EnumArrayParam Inkscape::LivePathEffect::LPETaperStroke::end_shape
private

Definition at line 55 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ end_smoothing

ScalarArrayParam Inkscape::LivePathEffect::LPETaperStroke::end_smoothing
protected

Definition at line 49 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ join_type

EnumParam<unsigned> Inkscape::LivePathEffect::LPETaperStroke::join_type
private

Definition at line 53 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ line_width

ScalarParam Inkscape::LivePathEffect::LPETaperStroke::line_width
private

◆ miter_limit

ScalarParam Inkscape::LivePathEffect::LPETaperStroke::miter_limit
private

Definition at line 56 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ pathv_out

Geom::PathVector Inkscape::LivePathEffect::LPETaperStroke::pathv_out
private

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

Referenced by doBeforeEffect(), and doEffect_path().

◆ prev_subpath

size_t Inkscape::LivePathEffect::LPETaperStroke::prev_subpath = Glib::ustring::npos
private

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

Referenced by doBeforeEffect().

◆ previous_size

size_t Inkscape::LivePathEffect::LPETaperStroke::previous_size = 1
private

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

Referenced by doBeforeEffect().

◆ start_attach_point

std::vector<Geom::Point> Inkscape::LivePathEffect::LPETaperStroke::start_attach_point
private

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

Referenced by doBeforeEffect().

◆ start_shape

EnumArrayParam Inkscape::LivePathEffect::LPETaperStroke::start_shape
private

Definition at line 54 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ start_smoothing

ScalarArrayParam Inkscape::LivePathEffect::LPETaperStroke::start_smoothing
protected

Definition at line 48 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().

◆ subpath

ScalarParam Inkscape::LivePathEffect::LPETaperStroke::subpath
private

Definition at line 51 of file lpe-taperstroke.h.

Referenced by doBeforeEffect(), and LPETaperStroke().


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