Inkscape
Vector Graphics Editor
|
#include <lpe-rough-hatches.h>
Public Member Functions | |
LPERoughHatches (LivePathEffectObject *lpeobject) | |
~LPERoughHatches () override | |
Geom::Piecewise< Geom::D2< Geom::SBasis > > | doEffect_pwd2 (Geom::Piecewise< Geom::D2< Geom::SBasis > > const &pwd2_in) override |
void | doOnApply (SPLPEItem const *lpeitem) override |
Is performed a single time when the effect is freshly applied to a path. | |
void | resetDefaults (SPItem const *item) override |
Sets all parameters to their default values and writes them to SVG. | |
void | doBeforeEffect (SPLPEItem const *item) override |
Is performed each time before the effect is updated. | |
std::vector< double > | generateLevels (Geom::Interval const &domain, double x_org) |
std::vector< std::vector< Geom::Point > > | linearSnake (Geom::Piecewise< Geom::D2< Geom::SBasis > > const &f, Geom::Point const &org) |
Geom::Piecewise< Geom::D2< Geom::SBasis > > | smoothSnake (std::vector< std::vector< Geom::Point > > const &linearSnake) |
![]() | |
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. | |
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 () |
Private Member Functions | |
LPERoughHatches (const LPERoughHatches &)=delete | |
LPERoughHatches & | operator= (const LPERoughHatches &)=delete |
Definition at line 27 of file lpe-rough-hatches.h.
Inkscape::LivePathEffect::LPERoughHatches::LPERoughHatches | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 211 of file lpe-rough-hatches.cpp.
References back_thickness, bender, bot_edge_variation, bot_smth_variation, bot_tgt_variation, Inkscape::LivePathEffect::Effect::concatenate_before_pwd2, direction, dist_rdm, do_bend, fat_output, front_thickness, growth, Inkscape::LivePathEffect::ScalarParam::param_set_range(), Inkscape::LivePathEffect::RandomParam::param_set_range(), Inkscape::LivePathEffect::Effect::registerParameter(), scale_bb, scale_bf, scale_tb, scale_tf, Inkscape::LivePathEffect::VectorParam::set_oncanvas_color(), Inkscape::LivePathEffect::Effect::show_orig_path, stroke_width_bot, stroke_width_top, top_edge_variation, top_smth_variation, top_tgt_variation, and Inkscape::LivePathEffect::Parameter::widget_is_visible.
|
overridedefault |
|
privatedelete |
|
overridevirtual |
Is performed each time before the effect is updated.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 534 of file lpe-rough-hatches.cpp.
References bot_edge_variation, bot_smth_variation, bot_tgt_variation, dist_rdm, Inkscape::LivePathEffect::RandomParam::resetRandomizer(), top_edge_variation, top_smth_variation, and top_tgt_variation.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 289 of file lpe-rough-hatches.cpp.
References Inkscape::LivePathEffect::bend(), bender, Geom::bounds_exact(), Geom::Piecewise< T >::cuts, direction, do_bend, end, Inkscape::LivePathEffect::BoolParam::get_value(), Inkscape::LivePathEffect::VectorParam::getOrigin(), Inkscape::LivePathEffect::VectorParam::getVector(), hatch_dist, Geom::Affine::inverse(), Geom::L2(), linearSnake(), Geom::Piecewise< T >::push_cut(), Geom::Piecewise< T >::push_seg(), result, Geom::rot90(), Geom::Piecewise< T >::setDomain(), Geom::shift(), smoothSnake(), start, Geom::unit_vector(), Geom::X, and Geom::Y.
|
overridevirtual |
Is performed a single time when the effect is freshly applied to a path.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 283 of file lpe-rough-hatches.cpp.
References Inkscape::LivePathEffect::Effect::lpeversion, and Inkscape::LivePathEffect::HiddenParam::param_setValue().
std::vector< double > Inkscape::LivePathEffect::LPERoughHatches::generateLevels | ( | Geom::Interval const & | domain, |
double | x_org | ||
) |
Definition at line 344 of file lpe-rough-hatches.cpp.
References dist_rdm, Geom::GenericInterval< C >::extent(), Inkscape::LivePathEffect::RandomParam::get_value(), growth, hatch_dist, Geom::GenericInterval< C >::max(), Geom::GenericInterval< C >::min(), result, and scale.
Referenced by linearSnake().
std::vector< std::vector< Point > > Inkscape::LivePathEffect::LPERoughHatches::linearSnake | ( | Geom::Piecewise< Geom::D2< Geom::SBasis > > const & | f, |
Geom::Point const & | org | ||
) |
Definition at line 367 of file lpe-rough-hatches.cpp.
References Geom::bounds_exact(), Geom::derivative(), generateLevels(), hatch_dist, Geom::make_cuts_independent(), Geom::multi_roots(), result, Inkscape::size, used, and Geom::X.
Referenced by doEffect_pwd2(), and smoothSnake().
|
privatedelete |
|
overridevirtual |
Sets all parameters to their default values and writes them to SVG.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 550 of file lpe-rough-hatches.cpp.
References bender, bot_edge_variation, direction, SPItem::geometricBounds(), hatch_dist, item, Geom::L2(), origin, Inkscape::LivePathEffect::RandomParam::param_set_value(), Inkscape::LivePathEffect::Effect::resetDefaults(), Inkscape::LivePathEffect::VectorParam::set_and_write_new_values(), top_edge_variation, Inkscape::LivePathEffect::Parameter::write_to_SVG(), Geom::X, and Geom::Y.
Piecewise< D2< SBasis > > Inkscape::LivePathEffect::LPERoughHatches::smoothSnake | ( | std::vector< std::vector< Geom::Point > > const & | linearSnake | ) |
Definition at line 429 of file lpe-rough-hatches.cpp.
References Geom::Path::append(), Geom::Path::appendNew(), back_thickness, bot_edge_variation, bot_smth_variation, bot_tgt_variation, fat_output, front_thickness, Inkscape::LivePathEffect::RandomParam::get_value(), Inkscape::LivePathEffect::BoolParam::get_value(), linearSnake(), result, Geom::Path::reversed(), scale_bb, scale_bf, scale_tb, scale_tf, Geom::Path::setStitching(), stroke_width_bot, stroke_width_top, top_edge_variation, top_smth_variation, top_tgt_variation, Geom::Path::toPwSb(), Geom::X, and Geom::Y.
Referenced by doEffect_pwd2().
|
private |
Definition at line 67 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 70 of file lpe-rough-hatches.h.
Referenced by doEffect_pwd2(), LPERoughHatches(), and resetDefaults().
|
private |
Definition at line 58 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), LPERoughHatches(), resetDefaults(), and smoothSnake().
|
private |
Definition at line 62 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 60 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 69 of file lpe-rough-hatches.h.
Referenced by doEffect_pwd2(), LPERoughHatches(), and resetDefaults().
|
private |
Definition at line 52 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), generateLevels(), and LPERoughHatches().
|
private |
Definition at line 64 of file lpe-rough-hatches.h.
Referenced by doEffect_pwd2(), and LPERoughHatches().
|
private |
Definition at line 64 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 67 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 53 of file lpe-rough-hatches.h.
Referenced by generateLevels(), and LPERoughHatches().
|
private |
Definition at line 51 of file lpe-rough-hatches.h.
Referenced by doEffect_pwd2(), generateLevels(), linearSnake(), and resetDefaults().
|
private |
Definition at line 55 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 55 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 55 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 55 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 66 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 65 of file lpe-rough-hatches.h.
Referenced by LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 57 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), LPERoughHatches(), resetDefaults(), and smoothSnake().
|
private |
Definition at line 61 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), LPERoughHatches(), and smoothSnake().
|
private |
Definition at line 59 of file lpe-rough-hatches.h.
Referenced by doBeforeEffect(), LPERoughHatches(), and smoothSnake().