Inkscape
Vector Graphics Editor
|
#include <lpe-roughen.h>
Public Member Functions | |
LPERoughen (LivePathEffectObject *lpeobject) | |
~LPERoughen () override | |
void | doOnApply (SPLPEItem const *lpeitem) override |
Is performed a single time when the effect is freshly applied to a path. | |
void | doEffect (Geom::PathVector &curve) override |
virtual double | sign (double randNumber) |
virtual Geom::Point | randomize (double max_length, bool is_node=false) |
void | doBeforeEffect (SPLPEItem const *lpeitem) override |
Is performed each time before the effect is updated. | |
virtual Geom::Point | tPoint (Geom::Point A, Geom::Point B, double t=0.5) |
Gtk::Widget * | newWidget () override |
This creates a managed widget. | |
![]() | |
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 | 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 () |
Private Member Functions | |
Geom::Path | addNodesAndJitter (Geom::Curve const &A, Geom::Point &prev, Geom::Point &last_move, double t, bool last) |
Geom::Path | jitter (Geom::Curve const &A, Geom::Point &prev, Geom::Point &last_move) |
LPERoughen (const LPERoughen &)=delete | |
LPERoughen & | operator= (const LPERoughen &)=delete |
Definition at line 42 of file lpe-roughen.h.
Inkscape::LivePathEffect::LPERoughen::LPERoughen | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 51 of file lpe-roughen.cpp.
References Inkscape::LivePathEffect::Effect::apply_to_clippath_and_mask, displace_x, displace_y, fixed_displacement, global_randomize, handles, max_segment_size, method, Inkscape::LivePathEffect::ScalarParam::param_make_integer(), Inkscape::LivePathEffect::ScalarParam::param_set_digits(), Inkscape::LivePathEffect::ScalarParam::param_set_increments(), Inkscape::LivePathEffect::ScalarParam::param_set_range(), Inkscape::LivePathEffect::RandomParam::param_set_range(), Inkscape::LivePathEffect::Effect::registerParameter(), seed, segments, shift_nodes, and spray_tool_friendly.
|
overridedefault |
|
privatedelete |
|
private |
Definition at line 322 of file lpe-roughen.cpp.
References Geom::Ray::angle(), Geom::Path::appendNew(), Geom::distance(), Geom::Curve::finalPoint(), fixed_displacement, handles, Inkscape::LivePathEffect::HM_ALONG_NODES, Inkscape::LivePathEffect::HM_RAND, Inkscape::LivePathEffect::HM_RETRACT, Inkscape::LivePathEffect::HM_SMOOTH, Geom::Curve::initialPoint(), Geom::length(), Geom::Curve::pointAt(), Geom::Path::pointAt(), randomize(), Geom::Ray::setPoints(), shift_nodes, Geom::Path::start(), and Geom::BezierCurveN< degree >::subdivide().
Referenced by doEffect().
|
overridevirtual |
Is performed each time before the effect is updated.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 124 of file lpe-roughen.cpp.
References displace_x, displace_y, Inkscape::LivePathEffect::RandomParam::get_value(), SPObject::getId(), global_randomize, Inkscape::LivePathEffect::Effect::lpeversion, Inkscape::LivePathEffect::HiddenParam::param_getSVGValue(), Inkscape::LivePathEffect::RandomParam::param_set_randomsign(), Inkscape::LivePathEffect::RandomParam::param_set_value(), Inkscape::LivePathEffect::RandomParam::resetRandomizer(), seed, and spray_tool_friendly.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 212 of file lpe-roughen.cpp.
References addNodesAndJitter(), Geom::Ray::angle(), Geom::Path::appendNew(), Geom::are_near(), Geom::PathVector::back(), backspace(), closepath_current(), Geom::PathVector::curveCount(), Geom::distance(), Inkscape::LivePathEffect::DM_SEGMENTS, Geom::PathVector::finalPoint(), Geom::Curve::finalPoint(), get_first_segment(), get_last_segment(), handles, Inkscape::LivePathEffect::HM_ALONG_NODES, Inkscape::LivePathEffect::HM_SMOOTH, Geom::Curve::initialPoint(), jitter(), Geom::length(), max_segment_size, method, move_endpoints(), Geom::nearest_time(), original, pathv_to_linear_and_cubic_beziers(), pathvector_append(), pathvector_append_continuous(), Geom::Curve::pointAt(), Geom::PathVector::push_back(), Geom::PathVector::reverse(), segments, and Geom::Path::start().
|
overridevirtual |
Is performed a single time when the effect is freshly applied to a path.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 94 of file lpe-roughen.cpp.
References SPItem::bounds(), Inkscape::LivePathEffect::Effect::effectType(), Inkscape::ustring::format_classic(), SPItem::GEOMETRIC_BBOX, Inkscape::Preferences::get(), Inkscape::Preferences::getEntry(), Inkscape::Preferences::Entry::isSet(), Inkscape::LivePathEffect::LPETypeConverter, Inkscape::LivePathEffect::Effect::lpeversion, Inkscape::LivePathEffect::HiddenParam::param_setValue(), Inkscape::LivePathEffect::Effect::param_vector, and Inkscape::LivePathEffect::Effect::writeParamsToSVG().
|
private |
Definition at line 466 of file lpe-roughen.cpp.
References Geom::Ray::angle(), Geom::Path::appendNew(), Geom::distance(), Geom::Curve::finalPoint(), handles, Inkscape::LivePathEffect::HM_ALONG_NODES, Inkscape::LivePathEffect::HM_RAND, Inkscape::LivePathEffect::HM_RETRACT, Inkscape::LivePathEffect::HM_SMOOTH, Geom::Curve::initialPoint(), Inkscape::LivePathEffect::Effect::lpeversion, Inkscape::LivePathEffect::HiddenParam::param_getSVGValue(), Geom::Curve::pointAt(), randomize(), Geom::Ray::setPoints(), shift_nodes, and Geom::Path::start().
Referenced by doEffect().
|
overridevirtual |
This creates a managed widget.
Deletion should be done by the eventual parent, or otherwise the caller.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 142 of file lpe-roughen.cpp.
References Inkscape::UI::expand_widget, Inkscape::UI::pack_start(), Inkscape::LivePathEffect::Parameter::param_getTooltip(), Inkscape::LivePathEffect::Parameter::param_key, Inkscape::LivePathEffect::Parameter::param_newWidget(), and Inkscape::LivePathEffect::Effect::param_vector.
|
privatedelete |
|
virtual |
Definition at line 196 of file lpe-roughen.cpp.
References Geom::Ray::angle(), displace_x, displace_y, fixed_displacement, global_randomize, and sign().
Referenced by addNodesAndJitter(), and jitter().
|
virtual |
Definition at line 186 of file lpe-roughen.cpp.
References Inkscape::LivePathEffect::Effect::lpeversion, and Inkscape::LivePathEffect::HiddenParam::param_getSVGValue().
Referenced by randomize().
|
virtual |
Definition at line 534 of file lpe-roughen.cpp.
|
private |
Definition at line 64 of file lpe-roughen.h.
Referenced by doBeforeEffect(), LPERoughen(), and randomize().
|
private |
Definition at line 65 of file lpe-roughen.h.
Referenced by doBeforeEffect(), LPERoughen(), and randomize().
|
private |
Definition at line 69 of file lpe-roughen.h.
Referenced by addNodesAndJitter(), LPERoughen(), and randomize().
|
private |
Definition at line 66 of file lpe-roughen.h.
Referenced by doBeforeEffect(), LPERoughen(), and randomize().
|
private |
Definition at line 67 of file lpe-roughen.h.
Referenced by addNodesAndJitter(), doEffect(), jitter(), and LPERoughen().
|
private |
Definition at line 62 of file lpe-roughen.h.
Referenced by doEffect(), and LPERoughen().
|
private |
Definition at line 61 of file lpe-roughen.h.
Referenced by doEffect(), and LPERoughen().
|
private |
Definition at line 71 of file lpe-roughen.h.
Referenced by doBeforeEffect(), and LPERoughen().
|
private |
Definition at line 63 of file lpe-roughen.h.
Referenced by doEffect(), and LPERoughen().
|
private |
Definition at line 68 of file lpe-roughen.h.
Referenced by addNodesAndJitter(), jitter(), and LPERoughen().
|
private |
Definition at line 70 of file lpe-roughen.h.
Referenced by doBeforeEffect(), and LPERoughen().