Inkscape
Vector Graphics Editor
|
#include <lpe-powerstroke.h>
Public Member Functions | |
LPEPowerStroke (LivePathEffectObject *lpeobject) | |
~LPEPowerStroke () override | |
LPEPowerStroke (const LPEPowerStroke &)=delete | |
LPEPowerStroke & | operator= (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 |
![]() | |
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) |
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. | |
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 () |
Public Attributes | |
PowerStrokePointArrayParam | offset_points |
BoolParam | not_jump |
bool | knotdragging = false |
![]() | |
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 |
SPLPEItem * | sp_lpe_item = nullptr |
SPShape * | current_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 |
Definition at line 36 of file lpe-powerstroke.h.
Inkscape::LivePathEffect::LPEPowerStroke::LPEPowerStroke | ( | LivePathEffectObject * | lpeobject | ) |
Definition at line 153 of file lpe-powerstroke.cpp.
References Inkscape::LivePathEffect::Effect::_provides_path_adjustment, Inkscape::LivePathEffect::ScalarParam::addSlider(), end_linecap_type, has_recursion, interpolator_beta, interpolator_type, linejoin_type, message, miter_limit, not_jump, offset_points, Inkscape::LivePathEffect::ScalarParam::param_set_digits(), Inkscape::LivePathEffect::ScalarParam::param_set_increments(), Inkscape::LivePathEffect::ScalarParam::param_set_range(), recusion_limit, Inkscape::LivePathEffect::Effect::registerParameter(), scale_width, Inkscape::LivePathEffect::Effect::show_orig_path, sort_points, start_linecap_type, and Inkscape::LivePathEffect::Parameter::write_to_SVG().
|
overridedefault |
|
delete |
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 273 of file lpe-powerstroke.cpp.
References Inkscape::LivePathEffect::Effect::_adjust_path.
Referenced by Inkscape::UI::PathManipulator::_createGeometryFromControlPoints(), and doBeforeEffect().
void Inkscape::LivePathEffect::LPEPowerStroke::applyStyle | ( | SPLPEItem * | lpeitem | ) |
Definition at line 210 of file lpe-powerstroke.cpp.
References Inkscape::LivePathEffect::lpe_shape_convert_stroke_and_fill().
Referenced by doOnApply().
|
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.
lpeitem | the element that has this LPE |
curve | the 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().
|
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().
|
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.
|
overridevirtual |
Is performed a single time when the effect is freshly applied to a path.
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 216 of file lpe-powerstroke.cpp.
References applyStyle(), count_pathvector_curves(), Inkscape::LivePathEffect::ArrayParam< StorageType >::data(), Geom::PathVector::empty(), Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), item, Inkscape::LivePathEffect::Effect::lpeversion, offset_points, Inkscape::LivePathEffect::ArrayParam< StorageType >::param_set_and_write_new_value(), Inkscape::LivePathEffect::HiddenParam::param_setValue(), pathv_to_linear_and_cubic_beziers(), scale_width, Inkscape::LivePathEffect::PowerStrokePointArrayParam::set_scale_width(), SPStyle::stroke_width, SPObject::style, SPObject::updateRepr(), and width.
|
overridevirtual |
Reimplemented from Inkscape::LivePathEffect::Effect.
Definition at line 261 of file lpe-powerstroke.cpp.
References Inkscape::LivePathEffect::Effect::keep_paths, Inkscape::LivePathEffect::lpe_shape_revert_stroke_and_fill(), Inkscape::LivePathEffect::PowerStrokePointArrayParam::median_width(), and offset_points.
|
delete |
|
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().
|
private |
Definition at line 64 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().
|
private |
Definition at line 66 of file lpe-powerstroke.h.
Referenced by doAfterEffect(), doBeforeEffect(), and LPEPowerStroke().
|
private |
Definition at line 59 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().
|
private |
Definition at line 58 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().
bool Inkscape::LivePathEffect::LPEPowerStroke::knotdragging = false |
Definition at line 55 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set().
|
private |
Definition at line 62 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().
|
private |
Definition at line 68 of file lpe-powerstroke.h.
Referenced by LPEPowerStroke().
|
private |
Definition at line 63 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().
BoolParam Inkscape::LivePathEffect::LPEPowerStroke::not_jump |
Definition at line 54 of file lpe-powerstroke.h.
Referenced by Inkscape::LivePathEffect::PowerStrokePointArrayParamKnotHolderEntity::knot_set(), and LPEPowerStroke().
PowerStrokePointArrayParam Inkscape::LivePathEffect::LPEPowerStroke::offset_points |
Definition at line 53 of file lpe-powerstroke.h.
Referenced by Inkscape::UI::Tools::PencilTool::addPowerStrokePencil(), doBeforeEffect(), doEffect_path(), doOnApply(), doOnRemove(), LPEPowerStroke(), and transform_multiply().
|
private |
Definition at line 67 of file lpe-powerstroke.h.
Referenced by doEffect_path().
|
private |
Definition at line 65 of file lpe-powerstroke.h.
Referenced by doAfterEffect(), and LPEPowerStroke().
|
private |
Definition at line 60 of file lpe-powerstroke.h.
Referenced by doBeforeEffect(), doEffect_path(), doOnApply(), and LPEPowerStroke().
|
private |
Definition at line 57 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().
|
private |
Definition at line 61 of file lpe-powerstroke.h.
Referenced by doEffect_path(), and LPEPowerStroke().